summaryrefslogtreecommitdiff
path: root/mysql-test/t/rpl_multi_delete.test
diff options
context:
space:
mode:
authorunknown <guilhem@mysql.com>2005-09-20 17:41:47 +0200
committerunknown <guilhem@mysql.com>2005-09-20 17:41:47 +0200
commit03045ee70ab6a3adf93c2a7506a3281f411d66fa (patch)
treea1843ec4af67e94bc6f5c15e3952b7ad581513a3 /mysql-test/t/rpl_multi_delete.test
parent2b24a2b5b57177db854cd93991afc3229f1a69cc (diff)
downloadmariadb-git-03045ee70ab6a3adf93c2a7506a3281f411d66fa.tar.gz
Fix fur BUG#13348: "multi-table updates and deletes are not logged if no rows were affected".
Not fixed in 4.1 as not critical. Also I'm correcting error checking of multi-UPDATE/DELETE when it comes to binlogging, to make it consistent with when we rollback the statement. mysql-test/r/rpl_multi_delete.result: result update mysql-test/r/rpl_multi_update.result: result update mysql-test/t/rpl_multi_delete.test: test for BUG#13348 mysql-test/t/rpl_multi_update.test: test of BUG#13348 sql/sql_delete.cc: We now binlog multi-DELETE even if no row was updated (like we do for DELETE). I'm also correcting some error checking (< instead of <=), basing myself on when we rollback. sql/sql_update.cc: we now binlog multi-UPDATE even if no row was updated (like we do for UPDATE). Adding to existing tests to test new behaviour. I'm also correcting some error checking (< instead of <=), basing myself on when we rollback.
Diffstat (limited to 'mysql-test/t/rpl_multi_delete.test')
-rw-r--r--mysql-test/t/rpl_multi_delete.test24
1 files changed, 20 insertions, 4 deletions
diff --git a/mysql-test/t/rpl_multi_delete.test b/mysql-test/t/rpl_multi_delete.test
index 2fd7b820b1a..0538d0d7bae 100644
--- a/mysql-test/t/rpl_multi_delete.test
+++ b/mysql-test/t/rpl_multi_delete.test
@@ -16,10 +16,26 @@ sync_with_master;
select * from t1;
select * from t2;
+# End of 4.1 tests
+
+# Check if deleting 0 rows is binlogged (BUG#13348)
+
connection master;
-drop table t1,t2;
-save_master_pos;
+delete from t1;
+delete from t2;
+
connection slave;
-sync_with_master;
+# force a difference to see if master's multi-DELETE will correct it
+insert into t1 values(1);
+insert into t2 values(1);
-# End of 4.1 tests
+connection master;
+DELETE t1.*, t2.* from t1, t2;
+
+sync_slave_with_master;
+select * from t1;
+select * from t2;
+
+connection master;
+drop table t1,t2;
+sync_slave_with_master;