List:Commits« Previous MessageNext Message »
From:Nuno Carvalho Date:August 23 2012 10:56am
Subject:bzr push into mysql-5.6 branch (nuno.carvalho:4155 to 4156) Bug#14116526
View as plain text  
 4156 Nuno Carvalho	2012-08-23
      BUG#14116526: RPL.RPL_GTID_SQL_UNTIL_BEFORE_AFTER FAILS WITH RESULT LENGTH MISMATCH ON TRUNK.
      
      Changed rpl_gtid_sql_until_before_after test case to use assertions
      instead of result listing, this way if test fails all servers' state
      will be logged.
      Removed unneeded disable_query_log command.

    modified:
      mysql-test/suite/rpl/r/rpl_gtid_sql_until_before_after.result
      mysql-test/suite/rpl/t/rpl_gtid_sql_until_before_after.test
 4155 Georgi Kodinov	2012-08-23 [merge]
      merge

    modified:
      mysys_ssl/my_getopt.cc
=== modified file 'mysql-test/suite/rpl/r/rpl_gtid_sql_until_before_after.result'
--- a/mysql-test/suite/rpl/r/rpl_gtid_sql_until_before_after.result	2012-08-21 10:27:20 +0000
+++ b/mysql-test/suite/rpl/r/rpl_gtid_sql_until_before_after.result	2012-08-23 10:52:43 +0000
@@ -36,92 +36,37 @@ include/stop_slave_io.inc
 SQL thread must stop *before* INSERT 4
 START SLAVE SQL_THREAD UNTIL SQL_BEFORE_GTIDS= "MASTER_UUID:4-5";
 include/wait_for_slave_sql_to_stop.inc
-SELECT * FROM t1;
-c1
-2
-3
+include/assert.inc [Rows until 3 in t1 must be replicated now]
 SQL thread must stop *after* INSERT 5
 START SLAVE SQL_THREAD UNTIL SQL_AFTER_GTIDS= "MASTER_UUID:4-5";
 include/wait_for_slave_sql_to_stop.inc
-SELECT * FROM t1;
-c1
-2
-3
-4
-5
+include/assert.inc [Rows until 5 in t1 must be replicated now]
 SQL thread must stop *before* INSERT 6
 START SLAVE SQL_THREAD, IO_THREAD UNTIL SQL_BEFORE_GTIDS= "MASTER_UUID:2-7";
 include/wait_for_slave_sql_to_stop.inc
-SELECT * FROM t1;
-c1
-2
-3
-4
-5
+include/assert.inc [Rows until 5 in t1 must be replicated now]
 SQL thread must stop *after* INSERT 5
 1-5 are already applied so it will stop immediately
 START SLAVE SQL_THREAD, IO_THREAD UNTIL SQL_AFTER_GTIDS= "MASTER_UUID:1-5";
 include/wait_for_slave_sql_to_stop.inc
-SELECT * FROM t1;
-c1
-2
-3
-4
-5
+include/assert.inc [Rows until 5 in t1 must be replicated now]
 SQL thread must stop *before* INSERT 10
 START SLAVE UNTIL SQL_BEFORE_GTIDS= "MASTER_UUID:10";
 include/wait_for_slave_sql_to_stop.inc
-SELECT * FROM t1;
-c1
-2
-3
-4
-5
-6
-7
-8
-9
+include/assert.inc [Rows until 9 in t1 must be replicated now]
 SQL thread must stop *before* INSERT 3-6
 3-6 is already applied so it will stop immediately
 START SLAVE UNTIL SQL_BEFORE_GTIDS= "MASTER_UUID:3-6";
 include/wait_for_slave_sql_to_stop.inc
-SELECT * FROM t1;
-c1
-2
-3
-4
-5
-6
-7
-8
-9
+include/assert.inc [Rows until 9 in t1 must be replicated now]
 SQL thread must stop *before* INSERT 9
 9 is already applied so it will stop immediately
 START SLAVE UNTIL SQL_BEFORE_GTIDS= "MASTER_UUID:9";
 include/wait_for_slave_sql_to_stop.inc
-SELECT * FROM t1;
-c1
-2
-3
-4
-5
-6
-7
-8
-9
+include/assert.inc [Rows until 9 in t1 must be replicated now]
 Sync slave with master
 include/start_slave.inc
 SELECT SQL_THREAD_WAIT_AFTER_GTIDS('MASTER_UUID:10');
-SELECT * FROM t1;
-c1
-2
-3
-4
-5
-6
-7
-8
-9
-10
+include/assert.inc [Rows until 10 in t1 must be replicated now]
 DROP TABLE t1;
 include/rpl_end.inc

=== modified file 'mysql-test/suite/rpl/t/rpl_gtid_sql_until_before_after.test'
--- a/mysql-test/suite/rpl/t/rpl_gtid_sql_until_before_after.test	2012-08-21 10:27:20 +0000
+++ b/mysql-test/suite/rpl/t/rpl_gtid_sql_until_before_after.test	2012-08-23 10:52:43 +0000
@@ -34,38 +34,28 @@ while ($i != 11)
 --echo [connection slave]
 
 # Incorrect START SLAVE UNTIL SQL_BEFORE_GTIDS
---disable_query_log
 --replace_result $master_uuid MASTER_UUID
---enable_query_log
 --error ER_BAD_SLAVE_UNTIL_COND
 --eval START SLAVE UNTIL SQL_BEFORE_GTIDS= "$master_uuid:4-5", MASTER_LOG_FILE= 'foo.bin', MASTER_LOG_POS= 100
 
 # Incorrect START SLAVE UNTIL SQL_BEFORE_GTIDS
---disable_query_log
 --replace_result $master_uuid MASTER_UUID
---enable_query_log
 --error ER_BAD_SLAVE_UNTIL_COND
 --eval START SLAVE SQL_THREAD UNTIL SQL_BEFORE_GTIDS= "$master_uuid:4-5", MASTER_LOG_FILE= 'foo.bin', MASTER_LOG_POS= 100
 
 # Incorrect START SLAVE UNTIL SQL_BEFORE_GTIDS
---disable_query_log
 --replace_result $master_uuid MASTER_UUID
---enable_query_log
 --error ER_BAD_SLAVE_UNTIL_COND
 --eval START SLAVE IO_THREAD UNTIL SQL_BEFORE_GTIDS= "$master_uuid:4-5", MASTER_LOG_FILE= 'foo.bin', MASTER_LOG_POS= 100
 
 # Incorrect START SLAVE UNTIL SQL_BEFORE_GTIDS
---disable_query_log
 --replace_result $master_uuid MASTER_UUID
---enable_query_log
 --error ER_PARSE_ERROR
 --eval START SLAVE FOO UNTIL SQL_BEFORE_GTIDS= "$master_uuid:4-5"
 
 # UNTIL GTID
 --echo Check that START SLAVE IO_THREAD UNTIL ... maintains old behaviour, condition is ignored.
---disable_query_log
 --replace_result $master_uuid MASTER_UUID
---enable_query_log
 --eval START SLAVE IO_THREAD UNTIL SQL_BEFORE_GTIDS= "$master_uuid:4-5"
 
 --echo Wait until IO Thread reads all master binlog and stop slave.
@@ -75,73 +65,74 @@ while ($i != 11)
 --source include/stop_slave_io.inc
 
 --echo SQL thread must stop *before* INSERT 4
---disable_query_log
 --replace_result $master_uuid MASTER_UUID
---enable_query_log
 --eval START SLAVE SQL_THREAD UNTIL SQL_BEFORE_GTIDS= "$master_uuid:4-5"
 --source include/wait_for_slave_sql_to_stop.inc
-SELECT * FROM t1;
+--let $assert_cond= MAX(c1)=3 FROM t1
+--let $assert_text= Rows until 3 in t1 must be replicated now
+--source include/assert.inc
 
 --echo SQL thread must stop *after* INSERT 5
---disable_query_log
 --replace_result $master_uuid MASTER_UUID
---enable_query_log
 --eval START SLAVE SQL_THREAD UNTIL SQL_AFTER_GTIDS= "$master_uuid:4-5"
 --source include/wait_for_slave_sql_to_stop.inc
-SELECT * FROM t1;
+--let $assert_cond= MAX(c1)=5 FROM t1
+--let $assert_text= Rows until 5 in t1 must be replicated now
+--source include/assert.inc
 
 --echo SQL thread must stop *before* INSERT 6
---disable_query_log
 --replace_result $master_uuid MASTER_UUID
---enable_query_log
 --eval START SLAVE SQL_THREAD, IO_THREAD UNTIL SQL_BEFORE_GTIDS= "$master_uuid:2-7"
 --source include/wait_for_slave_sql_to_stop.inc
-SELECT * FROM t1;
+--let $assert_cond= MAX(c1)=5 FROM t1
+--let $assert_text= Rows until 5 in t1 must be replicated now
+--source include/assert.inc
 
 --echo SQL thread must stop *after* INSERT 5
 --echo 1-5 are already applied so it will stop immediately
---disable_query_log
 --replace_result $master_uuid MASTER_UUID
---enable_query_log
 --eval START SLAVE SQL_THREAD, IO_THREAD UNTIL SQL_AFTER_GTIDS= "$master_uuid:1-5"
 --source include/wait_for_slave_sql_to_stop.inc
-SELECT * FROM t1;
+--let $assert_cond= MAX(c1)=5 FROM t1
+--let $assert_text= Rows until 5 in t1 must be replicated now
+--source include/assert.inc
 
 --echo SQL thread must stop *before* INSERT 10
---disable_query_log
 --replace_result $master_uuid MASTER_UUID
 --enable_query_log
 --eval START SLAVE UNTIL SQL_BEFORE_GTIDS= "$master_uuid:10"
 --source include/wait_for_slave_sql_to_stop.inc
-SELECT * FROM t1;
+--let $assert_cond= MAX(c1)=9 FROM t1
+--let $assert_text= Rows until 9 in t1 must be replicated now
+--source include/assert.inc
 
 --echo SQL thread must stop *before* INSERT 3-6
 --echo 3-6 is already applied so it will stop immediately
---disable_query_log
 --replace_result $master_uuid MASTER_UUID
---enable_query_log
 --eval START SLAVE UNTIL SQL_BEFORE_GTIDS= "$master_uuid:3-6"
 --source include/wait_for_slave_sql_to_stop.inc
-SELECT * FROM t1;
+--let $assert_cond= MAX(c1)=9 FROM t1
+--let $assert_text= Rows until 9 in t1 must be replicated now
+--source include/assert.inc
 
 --echo SQL thread must stop *before* INSERT 9
 --echo 9 is already applied so it will stop immediately
---disable_query_log
 --replace_result $master_uuid MASTER_UUID
---enable_query_log
 --eval START SLAVE UNTIL SQL_BEFORE_GTIDS= "$master_uuid:9"
 --source include/wait_for_slave_sql_to_stop.inc
-SELECT * FROM t1;
+--let $assert_cond= MAX(c1)=9 FROM t1
+--let $assert_text= Rows until 9 in t1 must be replicated now
+--source include/assert.inc
 
 --echo Sync slave with master
 --source include/start_slave.inc
---disable_query_log
 --replace_result $master_uuid MASTER_UUID
---enable_query_log
 --disable_result_log
 --eval SELECT SQL_THREAD_WAIT_AFTER_GTIDS('$master_uuid:10')
 --enable_result_log
-SELECT * FROM t1;
+--let $assert_cond= MAX(c1)=10 FROM t1
+--let $assert_text= Rows until 10 in t1 must be replicated now
+--source include/assert.inc
 
 # Cleanup
 --connection master

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.6 branch (nuno.carvalho:4155 to 4156) Bug#14116526Nuno Carvalho23 Aug