Statement-based replication. When using statement-based replication, a simple rule of thumb to
follow is, “If the statement run on the master would also execute successfully on the slave, it should
also replicate successfully”. In other words, if the statement uses a value that is compatible with the
type of a given column on the slave, the statement can be replicated. For example, you can insert any
value that fits in a TINYINT column into a BIGINT column as well; it follows that, even if you change
the type of a TINYINT column in the slave's copy of a table to BIGINT, any insert into that column
on the master that succeeds should also succeed on the slave, since it is impossible to have a legal
TINYINT value that is large enough to exceed a BIGINT column.
Prior to MySQL 5.6.10, when using statement-based replication, AUTO_INCREMENT columns were
required to be the same on both the master and the slave; otherwise, updates could be applied to the
wrong table on the slave. (Bug #12669186)
... zobacz całą notatkę
Komentarze użytkowników (0)