pt-online-schema-change should error if server is a slave in row based replication
Bug #1221372 reported by
Rolf
This bug affects 4 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Toolkit moved to https://jira.percona.com/projects/PT |
Fix Released
|
Undecided
|
Carlos Salguero |
Bug Description
It would be nice if pt-online-
tags: | added: binlog-format pt-online-schema-change |
Changed in percona-toolkit: | |
status: | New → Triaged |
tags: | added: i68249 |
Changed in percona-toolkit: | |
assignee: | nobody → Carlos Salguero (carlos-salguero) |
Changed in percona-toolkit: | |
milestone: | none → 2.2.19 |
status: | Triaged → In Progress |
Changed in percona-toolkit: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
@rolf, wouldn't this also be true for mixed-mode replication as well? (where non-deterministic inserts / updates use row-based replication instead of statement-based replication)?
and wouldn't this also impact same-engine replication?
http:// dev.mysql. com/doc/ refman/ 5.5/en/ replication- features- triggers. html dev.mysql. com/doc/ refman/ 5.5/en/ replication- features- auto-increment. html
http://
[quote]
"A statement invoking a trigger (or function) that causes an update to an AUTO_INCREMENT column is not replicated correctly using statement-based replication. MySQL 5.5 marks such statements as unsafe [and replicates using row-based replication]. (Bug #45677)"
[/quote]
http:// dev.mysql. com/doc/ refman/ 5.5/en/ faqs-triggers. html
[quote]
"A.5.14: How are actions carried out through triggers on a master replicated to a slave?
...
Row-based replication. When you use row-based replication, the changes caused by executing the trigger on the master are applied on the slave. However, the triggers themselves are not actually executed on the slave under row-based replication. This is because, if both the master and the slave applied the changes from the master and—in addition—the trigger causing these changes were applied on the slave, the changes would in effect be applied twice on the slave, leading to different data on the master and the slave.
In most cases, the outcome is the same for both row-based and statement-based replication. However, if you use different triggers on the master and slave, you cannot use row-based replication. (This is because the row-based format replicates the changes made by triggers executing on the master to the slaves, rather than the statements that caused the triggers to execute, and the corresponding triggers on the slave are not executed.) Instead, any statements causing such triggers to be executed must be replicated using statement-based replication."
[/quote]
on a related note, SQL_MODE should also be checked on both slave and master. if they differ, row ordering could be an issue...
Replication and Server SQL Mode dev.mysql. com/doc/ refman/ 5.5/en/ replication- features- sql-mode. html
http://