Below is the list of changes that have just been committed into a local
5.1 repository of mats. When mats does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2007-11-09 11:02:51+01:00, mats@stripped +4 -0
BUG#31552 (Replication breaks when deleting rows from out-of-sync table without PK):
Pushing test case for bug only. Bug already fixed as a result of the patch for
BUG#19958.
mysql-test/extra/rpl_tests/rpl_row_basic.test@stripped, 2007-11-09 11:02:45+01:00,
mats@stripped +31 -5
Adding test to see that no error is given on slave when deleting
rows that don't exist on table without primary key.
mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result@stripped, 2007-11-09 11:02:45+01:00,
mats@stripped +19 -0
Result change.
mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result@stripped, 2007-11-09 11:02:45+01:00,
mats@stripped +19 -0
Result change.
mysql-test/suite/rpl_ndb/r/rpl_row_basic_7ndb.result@stripped, 2007-11-09 11:02:45+01:00,
mats@stripped +19 -0
Result change.
diff -Nrup a/mysql-test/extra/rpl_tests/rpl_row_basic.test
b/mysql-test/extra/rpl_tests/rpl_row_basic.test
--- a/mysql-test/extra/rpl_tests/rpl_row_basic.test 2007-06-18 23:51:07 +02:00
+++ b/mysql-test/extra/rpl_tests/rpl_row_basic.test 2007-11-09 11:02:45 +01:00
@@ -215,11 +215,36 @@ sync_slave_with_master;
--echo --- on slave ---
SELECT * FROM t8 ORDER BY a;
-#
-# Test conflicting operations when changing in a table referenced by a
-# foreign key. We'll reuse the above table and just add a table that
-# references it.
-#
+# BUG#31552: Replication breaks when deleting rows from out-of-sync
+# table without PK
+
+--echo **** Test for BUG#31552 ****
+
+--echo **** On Master ****
+# Clean up t1 so that we can use it.
+connection master;
+DELETE FROM t1;
+sync_slave_with_master;
+
+# Just to get a clean binary log
+source include/reset_master_and_slave.inc;
+
+--echo **** On Master ****
+connection master;
+INSERT INTO t1 VALUES ('K','K'), ('L','L'), ('M','M');
+--echo **** On Master ****
+sync_slave_with_master;
+DELETE FROM t1 WHERE C1 = 'L';
+
+connection master;
+DELETE FROM t1;
+query_vertical SELECT COUNT(*) FROM t1 ORDER BY c1,c2;
+sync_slave_with_master;
+let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Errno, 1);
+disable_query_log;
+eval SELECT "$last_error" AS Last_SQL_Error;
+enable_query_log;
+query_vertical SELECT COUNT(*) FROM t1 ORDER BY c1,c2;
#
# cleanup
@@ -227,3 +252,4 @@ SELECT * FROM t8 ORDER BY a;
connection master;
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8;
+sync_slave_with_master;
diff -Nrup a/mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result
b/mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result
--- a/mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result 2007-06-27 14:27:28 +02:00
+++ b/mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result 2007-11-09 11:02:45 +01:00
@@ -415,4 +415,23 @@ a b c
2 4 8
3 6 9
99 99 99
+**** Test for BUG#31552 ****
+**** On Master ****
+DELETE FROM t1;
+**** Resetting master and slave ****
+STOP SLAVE;
+RESET SLAVE;
+RESET MASTER;
+START SLAVE;
+**** On Master ****
+INSERT INTO t1 VALUES ('K','K'), ('L','L'), ('M','M');
+**** On Master ****
+DELETE FROM t1 WHERE C1 = 'L';
+DELETE FROM t1;
+SELECT COUNT(*) FROM t1 ORDER BY c1,c2;
+COUNT(*) 0
+Last_SQL_Error
+0
+SELECT COUNT(*) FROM t1 ORDER BY c1,c2;
+COUNT(*) 0
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8;
diff -Nrup a/mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result
b/mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result
--- a/mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result 2007-06-27 14:27:32 +02:00
+++ b/mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result 2007-11-09 11:02:45 +01:00
@@ -415,4 +415,23 @@ a b c
2 4 8
3 6 9
99 99 99
+**** Test for BUG#31552 ****
+**** On Master ****
+DELETE FROM t1;
+**** Resetting master and slave ****
+STOP SLAVE;
+RESET SLAVE;
+RESET MASTER;
+START SLAVE;
+**** On Master ****
+INSERT INTO t1 VALUES ('K','K'), ('L','L'), ('M','M');
+**** On Master ****
+DELETE FROM t1 WHERE C1 = 'L';
+DELETE FROM t1;
+SELECT COUNT(*) FROM t1 ORDER BY c1,c2;
+COUNT(*) 0
+Last_SQL_Error
+0
+SELECT COUNT(*) FROM t1 ORDER BY c1,c2;
+COUNT(*) 0
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8;
diff -Nrup a/mysql-test/suite/rpl_ndb/r/rpl_row_basic_7ndb.result
b/mysql-test/suite/rpl_ndb/r/rpl_row_basic_7ndb.result
--- a/mysql-test/suite/rpl_ndb/r/rpl_row_basic_7ndb.result 2007-06-27 14:27:31 +02:00
+++ b/mysql-test/suite/rpl_ndb/r/rpl_row_basic_7ndb.result 2007-11-09 11:02:45 +01:00
@@ -415,4 +415,23 @@ a b c
2 4 8
3 6 9
99 99 99
+**** Test for BUG#31552 ****
+**** On Master ****
+DELETE FROM t1;
+**** Resetting master and slave ****
+STOP SLAVE;
+RESET SLAVE;
+RESET MASTER;
+START SLAVE;
+**** On Master ****
+INSERT INTO t1 VALUES ('K','K'), ('L','L'), ('M','M');
+**** On Master ****
+DELETE FROM t1 WHERE C1 = 'L';
+DELETE FROM t1;
+SELECT COUNT(*) FROM t1 ORDER BY c1,c2;
+COUNT(*) 0
+Last_SQL_Error
+0
+SELECT COUNT(*) FROM t1 ORDER BY c1,c2;
+COUNT(*) 0
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8;
| Thread |
|---|
| • bk commit into 5.1 tree (mats:1.2616) BUG#31552 | Mats Kindahl | 9 Nov |