1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

BUG#46130 Slave does not correctly handle "expected errors"

In STATEMENT based replication, a statement that failed on the master but that
updated non-transactional tables is written to binary log with the error code
appended to it. On the slave, the statement is executed and the same error is
expected. However, when an "expected error" did not happen on the slave and was
either ignored or was related to a concurrency issue on the master, the slave
did not rollback the effects of the statement and as such inconsistencies might
happen.

To fix the problem, we automatically rollback a statement that should have
failed on a slave but succeded and whose expected failure is either ignored or
stems from a concurrency issue on the master.
This commit is contained in:
Alfranio Correia
2009-08-13 17:21:01 +01:00
parent ad2b506384
commit 78585a25ff
3 changed files with 19 additions and 9 deletions

View File

@ -125,14 +125,13 @@ while ($type)
connection master;
sync_slave_with_master;
# Re-enable this after fixing BUG#46130
#connection master;
#let $diff_statement= SELECT * FROM t order by i;
#source include/diff_master_slave.inc;
connection master;
let $diff_statement= SELECT * FROM t order by i;
source include/diff_master_slave.inc;
#connection master;
#let $diff_statement= SELECT * FROM n order by d, f;
#source include/diff_master_slave.inc;
connection master;
let $diff_statement= SELECT * FROM n order by d, f;
source include/diff_master_slave.inc;
--echo ########################################################################
--echo # Cleanup