MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Serge Kozlov Date:March 6 2009 10:49am
Subject:bzr push into mysql-6.0-bugteam branch (Serge.Kozlov:3108 to 3109) Bug#41614
View as plain text  
 3109 Serge Kozlov	2009-03-06
      Bug#41614: error 2 for diff_files means RESULT_LENGTH_MISMATCH.
      It can happen if slave did not sync'ed with master properly and dump of DB on slave happens too early. The patch add sync with master for all engines (NDB and non-NDB) and clean up for dumped files.
      modified:
        mysql-test/extra/rpl_tests/rpl_row_func003.test

 3108 Kristofer Pettersson	2009-03-06 [merge]
      merge 5.1-bugteam => 6.0-bugteam

=== modified file 'mysql-test/extra/rpl_tests/rpl_row_func003.test'
--- a/mysql-test/extra/rpl_tests/rpl_row_func003.test	2008-12-05 17:56:03 +0000
+++ b/mysql-test/extra/rpl_tests/rpl_row_func003.test	2009-03-06 10:46:23 +0000
@@ -3,10 +3,7 @@
 # Original Date: Aug/15/2005                                                #
 # Update: 08/29/2005 Comment out sleep. Only needed for debugging           #
 #############################################################################
-# Note: Many lines are commented out in this test case. These were used for #
-#       creating the test case and debugging and are being left for         #
-#       debugging, but they can not be used for the regular testing as the  #
-#       Time changes and is not deteministic, so instead we dump both the   #
+# Note: Time changes and is not deteministic, so instead we dump both the   #
 #       master and slave and diff the dumps. If the dumps differ then the   #
 #       test case will fail. To run during diff failuers, comment out the   #
 #       diff.                                                               #
@@ -26,7 +23,6 @@ DROP TABLE IF EXISTS test.t1;
 
 --enable_warnings
 
-
 eval CREATE TABLE test.t1 (a INT NOT NULL AUTO_INCREMENT, c CHAR(16),PRIMARY KEY(a))ENGINE=$engine_type;
 
 delimiter |;
@@ -44,34 +40,24 @@ END|
 delimiter ;|
 
 INSERT INTO test.t1 VALUES (null,test.f1()),(null,test.f1()),(null,test.f1());
-let $wait_time= 6;
---source include/wait_for_ndb_to_binlog.inc
 INSERT INTO test.t1 VALUES (null,test.f1()),(null,test.f1()),(null,test.f1());
---source include/wait_for_ndb_to_binlog.inc
-
-#Select in this test are used for debugging
-#select * from test.t1;
-#connection slave;
-#select * from test.t1;
 
-connection master;
 SET AUTOCOMMIT=0;
 START TRANSACTION;
 INSERT INTO test.t1 VALUES (null,test.f1());
 ROLLBACK;
 SET AUTOCOMMIT=1;
-#select * from test.t1;
-#sleep 6;
-
-#connection slave;
-#select * from test.t1;
-
-#connection master;
 
-#used for debugging
-#show binlog events;
+# Sync master and slave for all engines except NDB
+if (`SELECT UPPER(LEFT('$engine_type', 3)) != 'NDB'`) {
+  sync_slave_with_master;
+  connection master;
+}
+# Sync master and slave for NDB engine
+let $wait_time= 6;
+--source include/wait_for_ndb_to_binlog.inc
 
-# time to dump the databases and so we can see if they match
+# Time to dump the databases and so we can see if they match
 
 --exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/func003_master.sql
 --exec $MYSQL_DUMP_SLAVE --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/func003_slave.sql
@@ -88,5 +74,8 @@ DROP TABLE test.t1;
 
 diff_files $MYSQLTEST_VARDIR/tmp/func003_master.sql $MYSQLTEST_VARDIR/tmp/func003_slave.sql;
 
+# Clean up
+remove_file $MYSQLTEST_VARDIR/tmp/func003_master.sql;
+remove_file $MYSQLTEST_VARDIR/tmp/func003_slave.sql;
 
 # End of 5.0 test case

Thread
bzr push into mysql-6.0-bugteam branch (Serge.Kozlov:3108 to 3109) Bug#41614Serge Kozlov6 Mar