@
demos 看了下确实 mixed 模式下默认是 statement 模式。官方的解释是这样的:
“ With statement-based replication, there may be issues with replicating nondeterministic statements. In deciding whether or not a given statement is safe for statement-based replication, MySQL determines whether it can guarantee that the statement can be replicated using statement-based logging. If MySQL cannot make this guarantee, it marks the statement as potentially unreliable and issues the warning, Statement may not be safe to log in statement format.
You can avoid these issues by using MySQL's row-based replication instead.”
也就是说用 MIXED 的模式或者 statement 模式不能保证两边数据是没问题的,像你这种场景还是 row 模式复制比较合适