From 5babac539d03b4bb9aff2f74965b98c8506726e5 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 26 Jul 2007 11:31:10 +0300 Subject: Bug #29571: INSERT DELAYED IGNORE written to binary log on the master but on the slave MySQL can decide to "downgrade" a INSERT DELAYED statement to normal insert in certain situations. One such situation is when the slave is replaying a replication feed. However INSERT DELAYED is logged even if there're no updates whereas the NORMAL INSERT is not logged in such cases. Fixed by always logging a "downgraded" INSERT DELAYED: even if there were no updates. mysql-test/r/rpl_insert_delayed.result: Bug #29571: test case mysql-test/t/rpl_insert_delayed.test: Bug #29571: test case sql/sql_insert.cc: Bug #29571: log INSERT DELAYED even if it was "downgraded" to INSERT (and there were no updates) --- mysql-test/r/rpl_insert_delayed.result | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'mysql-test/r') diff --git a/mysql-test/r/rpl_insert_delayed.result b/mysql-test/r/rpl_insert_delayed.result index 38e2cddd650..ddf6e9c2165 100644 --- a/mysql-test/r/rpl_insert_delayed.result +++ b/mysql-test/r/rpl_insert_delayed.result @@ -29,3 +29,23 @@ id name 10 my name 20 is Bond drop table t1; +CREATE TABLE t1(a int, UNIQUE(a)); +INSERT DELAYED IGNORE INTO t1 VALUES(1); +INSERT DELAYED IGNORE INTO t1 VALUES(1); +show binlog events limit 11,100; +Log_name Pos Event_type Server_id End_log_pos Info +x x x x x use `test`; INSERT DELAYED IGNORE INTO t1 VALUES(1) +x x x x x use `test`; INSERT DELAYED IGNORE INTO t1 VALUES(1) +select * from t1; +a +1 +On slave +show binlog events limit 12,100; +Log_name Pos Event_type Server_id End_log_pos Info +x x x x x use `test`; INSERT DELAYED IGNORE INTO t1 VALUES(1) +x x x x x use `test`; INSERT DELAYED IGNORE INTO t1 VALUES(1) +select * from t1; +a +1 +drop table t1; +End of 5.0 tests -- cgit v1.2.1