Just got Bug#16993 closed, which provides a good lesson
into the complications of replication. The original title was
RBR: ALTER TABLE ZEROFILL AUTO_INCREMENT is not replicated
correctly, but the problem is not related to row-based
replication (RBR) nor to ZEROFILL
. The culprit is
adding an AUTO_INCREMENT
column to a table, and it
is not actually a bug (to be frank, it depends on your point of
view, but "fixing" this bug causes more headaces than it solves
as you'll see in a moment).
What the example code in the bug description does is creating a
table on the slave and the master, but inserting (identical) rows
into the tables in different order on the slave and the
master; for example in this way:
master> CREATE TABLE ages(name CHAR(30), age INT);
master> SET SQL_LOG_BIN=FALSE;
master> INSERT INTO ages SET …
[Read more]