mysql的binlog文档在介绍XID_EVENT时有这么一段
XID_EVENT Generated for a commit of a transaction that modifies one or more tables of an XA-capable storage engine. Normal transactions are implemented by sending a QUERY_EVENT containing a BEGIN statement and a QUERY_EVENT containing a COMMIT statement (or a ROLLBACK statement if the transaction is rolled back).
但是我看canal1.24代码中解析QUERY_EVENT时,只考虑了BEGIN和COMMIT,并没有考虑ROLLBACK,请问这样做的原因是什么呢?
https://dev.mysql.com/doc/refman/5.7/en/innodb-and-mysql-replication.html 这里又有这么一段叙述:
Transactions that fail on the master do not affect replication at all. MySQL replication is based on the binary log where MySQL writes SQL statements that modify data. A transaction that fails (for example, because of a foreign key violation, or because it is rolled back) is not written to the binary log,
貌似并不会记录回滚的binlog...有没有特别清楚的人呢
原提问者GitHub用户whyliyu
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。