List:Commits« Previous MessageNext Message »
From:Alfranio Correia Date:November 12 2010 7:42pm
Subject:bzr commit into mysql-next-mr.crash-safe branch (alfranio.correia:3058)
WL#4801
View as plain text  
#At file:///home/acorreia/workspace.sun/repository.mysql.new/bzrwork/wl-2775/mysql-next-mr-rpl-merge.crash-safe.2775/ based on revid:alfranio.correia@stripped

 3058 Alfranio Correia	2010-11-12
      WL#4801
      
      Changed rpl_change_master to run it with with master-info-repository=TABLE
      enabled to increase gcov numbers.

    added:
      mysql-test/extra/rpl_tests/rpl_change_master.test
      mysql-test/suite/rpl/r/rpl_change_master_crash_safe.result
      mysql-test/suite/rpl/t/rpl_change_master_crash_safe-slave.opt
      mysql-test/suite/rpl/t/rpl_change_master_crash_safe.test
    modified:
      mysql-test/suite/rpl/r/rpl_change_master.result
      mysql-test/suite/rpl/t/rpl_change_master.test
=== added file 'mysql-test/extra/rpl_tests/rpl_change_master.test'
--- a/mysql-test/extra/rpl_tests/rpl_change_master.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/extra/rpl_tests/rpl_change_master.test	2010-11-12 19:41:49 +0000
@@ -0,0 +1,282 @@
+# Verify that after CHANGE MASTER, replication (I/O thread and SQL
+# thread) restart from where SQL thread left, not from where
+# I/O thread left (some old bug fixed in 4.0.17)
+
+connection master;
+# Make SQL slave thread advance a bit
+create table t1(n int);
+sync_slave_with_master;
+select * from t1;
+# Now stop it and make I/O slave thread be ahead
+stop slave sql_thread;
+connection master;
+insert into t1 values(1);
+insert into t1 values(2);
+save_master_pos;
+let $slave_param= Read_Master_Log_Pos;
+let $slave_param_value= query_get_value(SHOW MASTER STATUS, Position, 1);
+connection slave;
+source include/wait_for_slave_param.inc;
+source include/stop_slave.inc;
+
+let $read_pos= query_get_value(SHOW SLAVE STATUS, Read_Master_Log_Pos, 1);
+let $exec_pos= query_get_value(SHOW SLAVE STATUS, Exec_Master_Log_Pos, 1);
+if (`SELECT $read_pos = $exec_pos`)
+{
+  source include/show_rpl_debug_info.inc;
+  echo 'Read_Master_Log_Pos: $read_pos' == 'Exec_Master_Log_Pos: $exec_pos';
+  die Failed because Read_Master_Log_Pos is equal to Exec_Master_Log_Pos;
+} 
+change master to master_user='root';
+let $read_pos= query_get_value(SHOW SLAVE STATUS, Read_Master_Log_Pos, 1);
+let $exec_pos= query_get_value(SHOW SLAVE STATUS, Exec_Master_Log_Pos, 1);
+if (`SELECT $read_pos <> $exec_pos`)
+{
+  source include/show_rpl_debug_info.inc;
+  echo 'Read_Master_Log_Pos: $read_pos' <> 'Exec_Master_Log_Pos: $exec_pos';
+  die Failed because Read_Master_Log_Pos is not equal to Exec_Master_Log_Pos;
+}
+
+start slave;
+sync_with_master;
+select * from t1;
+connection master;
+drop table t1;
+sync_slave_with_master;
+
+# End of 4.1 tests
+
+#
+# BUG#12190 CHANGE MASTER has differ path requiremts on MASTER_LOG_FILE and RELAY_LOG_FILE
+#
+
+source include/master-slave-reset.inc;
+
+connection master;
+create table t1 (a int);
+insert into t1 values (1);
+flush logs;
+insert into t1 values (2);
+
+# Note: the master positon saved by this will also be used by the
+# 'sync_with_master' below.
+sync_slave_with_master;
+
+# Check if the table t1 and t2 are identical on master and slave;
+let $diff_table_1= master:test.t1
+let $diff_table_2= slave:test.t1
+source include/diff_tables.inc;
+
+connection slave;
+source include/stop_slave.inc;
+delete from t1 where a=2;
+
+# start replication from the second insert, after fix of BUG#12190,
+# relay_log_file does not use absolute path, only the filename is
+# required
+#
+# Note: the follow change master will automatically reset
+# relay_log_purge to false, save the old value to restore
+let $relay_log_purge= `select @@global.relay_log_purge`;
+CHANGE MASTER TO relay_log_file='slave-relay-bin.000005', relay_log_pos=4;
+start slave sql_thread;
+source include/wait_for_slave_sql_to_start.inc;
+
+# Sync to the same position saved by the 'sync_slave_with_master' above.
+sync_with_master;
+
+# Check if the table t1 and t2 are identical on master and slave;
+let $diff_table_1= master:test.t1
+let $diff_table_2= slave:test.t1
+source include/diff_tables.inc;
+
+# clean up
+connection slave;
+start slave io_thread;
+source include/wait_for_slave_io_to_start.inc;
+eval set global relay_log_purge=$relay_log_purge;
+connection master;
+drop table t1;
+sync_slave_with_master;
+
+#
+# BUG#44209: MASTER_CONNECT_RETRY and --master-retry-count disconnected from each other
+#
+
+-- connection master
+-- source include/master-slave-reset.inc
+
+-- connection slave
+-- let $retry_count0= query_get_value(SHOW SLAVE STATUS, Master_Retry_Count, 1)
+
+# assertion: show that the command line is still valid (MTR sets it to 10)
+-- echo Master_Retry_Count: $retry_count
+
+-- source include/stop_slave.inc
+
+# action: change the initial value to some other value
+-- let $retry_count1= `SELECT $retry_count0+10`
+-- eval CHANGE MASTER TO master_retry_count=$retry_count1
+
+-- source include/start_slave.inc
+
+-- let $retry_count1= query_get_value(SHOW SLAVE STATUS, Master_Retry_Count, 1)
+# assertion: it shows the new value -- retry_count0 +10
+if (`SELECT $retry_count1 <> ($retry_count0+10)`)
+{
+  -- let $expected= `SELECT $retry_count0+10`
+  -- echo Unexpected retry count value! Got: $retry_count1, expected: $expected
+  -- die
+}
+
+-- source include/stop_slave.inc
+
+# action: change master_retry_count to zero will set it to zero.
+-- let $retry_count1= 0
+-- eval CHANGE MASTER TO master_retry_count=$retry_count1
+
+-- source include/start_slave.inc
+
+-- let $retry_count2= query_get_value(SHOW SLAVE STATUS, Master_Retry_Count, 1)
+# assertion: it shows no changes
+if (`SELECT $retry_count2 <> $retry_count1`)
+{
+  -- echo Unexpected retry count value! Got: $retry_count2, expected: $retry_count1
+  -- die
+}
+
+-- source include/stop_slave.inc
+
+# action: change the value to the smallest value possible
+CHANGE MASTER TO master_retry_count=1;
+
+-- source include/start_slave.inc
+
+-- let $retry_count3= query_get_value(SHOW SLAVE STATUS, Master_Retry_Count, 1)
+# assertion: it should show 1
+if (`SELECT $retry_count3 <> 1`)
+{
+  -- echo Unexpected retry count value! Got: $retry_count3, expected: 1
+  -- die
+}
+
+-- source include/stop_slave.inc
+
+# action: change the value back to the original one
+-- eval CHANGE MASTER TO master_retry_count=$retry_count0
+
+-- source include/start_slave.inc
+
+-- let $retry_count4= query_get_value(SHOW SLAVE STATUS, Master_Retry_Count, 1)
+# assertion: it should show 1
+if (`SELECT $retry_count4 <> $retry_count0`)
+{
+  -- echo Unexpected retry count value! Got: $retry_count4, expected: $retry_count0
+  -- die
+}
+
+## Now lets change master_retry_count to the maximum value possible
+## and stop and restart the slave to check that (in the middle of it 
+## we also check that when issueing CHANGE MASTER TO without specifying
+## master_retry_count will not affect its current value):
+##   1. master_retry_count persists after restart
+##   2. setting a value higher than the max will make the max to be set.
+##   3. maximum value is accepted and persists after serialization 
+##      and de-serialization
+-- source include/stop_slave.inc
+-- let $retry_count_set= 18446744073709551616
+-- replace_result 18446744073709551616 RETRY_COUNT_SET
+-- eval CHANGE MASTER TO master_retry_count=$retry_count_set
+-- let $retry_count_expected= query_get_value(SHOW SLAVE STATUS, Master_Retry_Count, 1)
+-- replace_result 18446744073709551615 RETRY_COUNT_EXPECTED 4294967295 RETRY_COUNT_EXPECTED 9223372036854775807 RETRY_COUNT_EXPECTED
+-- eval SELECT $retry_count_expected AS current_retry_count
+
+## assert that issuing CHANGE MASTER without changing master_retry_count
+## does not affect the existing value for master_retry_count
+-- let $connect_retry_old= query_get_value(SHOW SLAVE STATUS, Connect_Retry, 1)
+-- let $connect_retry_new= `SELECT $connect_retry_old + 1`
+-- let $retry_count_before= query_get_value(SHOW SLAVE STATUS, Master_Retry_Count, 1)
+-- eval CHANGE MASTER TO master_connect_retry= $connect_retry_new
+-- let $retry_count_after= query_get_value(SHOW SLAVE STATUS, Master_Retry_Count, 1)
+if (`SELECT $retry_count_before <> $retry_count_after`)
+{
+  -- echo Unexpected retry count value! Got: $retry_count_after, expected: $retry_count_before
+  -- die
+}
+-- eval CHANGE MASTER TO master_connect_retry= $connect_retry_old
+
+## Server restart persisting test
+--echo ### stop slave server
+--write_file $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
+wait
+EOF
+--shutdown_server 10
+--source include/wait_until_disconnected.inc
+  
+--echo ### start slave server
+--append_file $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
+restart
+EOF
+--enable_reconnect
+--source include/wait_until_connected_again.inc
+
+-- connection slave
+-- source include/start_slave.inc
+
+-- let $retry_count5= query_get_value(SHOW SLAVE STATUS, Master_Retry_Count, 1)
+if (`SELECT $retry_count5 <> $retry_count_expected`)
+{
+  -- echo Unexpected retry count value! Got: $retry_count5, expected: $retry_count_expected
+  -- die
+}
+
+## assert that there is a parse error if not using a numerical value
+-- error ER_PARSE_ERROR
+CHANGE MASTER TO master_retry_count='a';
+
+## assert that there is a parse error if using a negative number
+-- error ER_PARSE_ERROR
+CHANGE MASTER TO master_retry_count=-1;
+
+## Checks if Replicate_Ignore_Server_Ids is correctly written to a repository.
+
+--connection slave
+-- source include/stop_slave.inc
+
+-- let $connect_old_value= query_get_value(SHOW SLAVE STATUS, Connect_Retry, 1)
+-- let $ignore_old_value= query_get_value(SHOW SLAVE STATUS, Replicate_Ignore_Server_Ids, 1)
+
+-- eval CHANGE MASTER TO master_connect_retry= 200, IGNORE_SERVER_IDS= (100, 200, 300, 400, 500)
+
+-- let $connect_new_value= query_get_value(SHOW SLAVE STATUS, Connect_Retry, 1)
+-- let $ignore_new_value= query_get_value(SHOW SLAVE STATUS, Replicate_Ignore_Server_Ids, 1)
+
+--echo ### stop slave server
+--write_file $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
+wait
+EOF
+--shutdown_server 10
+--source include/wait_until_disconnected.inc
+
+--echo ### start slave server
+--append_file $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
+restart
+EOF
+--enable_reconnect
+--source include/wait_until_connected_again.inc
+
+-- connection slave
+-- source include/start_slave.inc
+
+-- let $connect_crash_value= query_get_value(SHOW SLAVE STATUS, Connect_Retry, 1)
+-- let $ignore_crash_value= query_get_value(SHOW SLAVE STATUS, Replicate_Ignore_Server_Ids, 1)
+
+-- echo Eexpected values: "$ignore_new_value" == "$ignore_crash_value" or $connect_new_value == $connect_crash_value
+if (`SELECT "$ignore_new_value" <> "$ignore_crash_value" || $connect_new_value <> $connect_crash_value`)
+{
+  -- echo Unexpected values: "$ignore_new_value" <> "$ignore_crash_value" or $connect_new_value <> $connect_crash_value
+  -- die
+}
+
+-- source include/master-slave-reset.inc
+-- source include/master-slave-end.inc

=== modified file 'mysql-test/suite/rpl/r/rpl_change_master.result'
--- a/mysql-test/suite/rpl/r/rpl_change_master.result	2010-08-05 17:45:25 +0000
+++ b/mysql-test/suite/rpl/r/rpl_change_master.result	2010-11-12 19:41:49 +0000
@@ -68,6 +68,12 @@ CHANGE MASTER TO master_retry_count='a';
 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''a'' at line 1
 CHANGE MASTER TO master_retry_count=-1;
 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-1' at line 1
+include/stop_slave.inc
+CHANGE MASTER TO master_connect_retry= 200, IGNORE_SERVER_IDS= (100, 200, 300, 400, 500);
+### stop slave server
+### start slave server
+include/start_slave.inc
+Eexpected values: "100, 200, 300, 400, 500" == "100, 200, 300, 400, 500" or 200 == 200
 stop slave;
 drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
 reset master;

=== added file 'mysql-test/suite/rpl/r/rpl_change_master_crash_safe.result'
--- a/mysql-test/suite/rpl/r/rpl_change_master_crash_safe.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/rpl/r/rpl_change_master_crash_safe.result	2010-11-12 19:41:49 +0000
@@ -0,0 +1,82 @@
+stop slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+reset master;
+reset slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+start slave;
+create table t1(n int);
+select * from t1;
+n
+stop slave sql_thread;
+insert into t1 values(1);
+insert into t1 values(2);
+include/stop_slave.inc
+change master to master_user='root';
+start slave;
+select * from t1;
+n
+1
+2
+drop table t1;
+stop slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+reset master;
+reset slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+start slave;
+create table t1 (a int);
+insert into t1 values (1);
+flush logs;
+insert into t1 values (2);
+include/stop_slave.inc
+delete from t1 where a=2;
+CHANGE MASTER TO relay_log_file='slave-relay-bin.000005', relay_log_pos=4;
+start slave sql_thread;
+start slave io_thread;
+set global relay_log_purge=1;
+drop table t1;
+stop slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+reset master;
+reset slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+start slave;
+Master_Retry_Count: 
+include/stop_slave.inc
+CHANGE MASTER TO master_retry_count=20;
+include/start_slave.inc
+include/stop_slave.inc
+CHANGE MASTER TO master_retry_count=0;
+include/start_slave.inc
+include/stop_slave.inc
+CHANGE MASTER TO master_retry_count=1;
+include/start_slave.inc
+include/stop_slave.inc
+CHANGE MASTER TO master_retry_count=10;
+include/start_slave.inc
+include/stop_slave.inc
+CHANGE MASTER TO master_retry_count=RETRY_COUNT_SET;
+SELECT RETRY_COUNT_EXPECTED AS current_retry_count;
+current_retry_count
+RETRY_COUNT_EXPECTED
+CHANGE MASTER TO master_connect_retry= 2;
+CHANGE MASTER TO master_connect_retry= 1;
+### stop slave server
+### start slave server
+include/start_slave.inc
+CHANGE MASTER TO master_retry_count='a';
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''a'' at line 1
+CHANGE MASTER TO master_retry_count=-1;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-1' at line 1
+include/stop_slave.inc
+CHANGE MASTER TO master_connect_retry= 200, IGNORE_SERVER_IDS= (100, 200, 300, 400, 500);
+### stop slave server
+### start slave server
+include/start_slave.inc
+Eexpected values: "100, 200, 300, 400, 500" == "100, 200, 300, 400, 500" or 200 == 200
+stop slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+reset master;
+reset slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+start slave;

=== modified file 'mysql-test/suite/rpl/t/rpl_change_master.test'
--- a/mysql-test/suite/rpl/t/rpl_change_master.test	2010-10-07 16:39:57 +0000
+++ b/mysql-test/suite/rpl/t/rpl_change_master.test	2010-11-12 19:41:49 +0000
@@ -1,244 +1,9 @@
-# Verify that after CHANGE MASTER, replication (I/O thread and SQL
-# thread) restart from where SQL thread left, not from where
-# I/O thread left (some old bug fixed in 4.0.17)
-
-source include/master-slave.inc;
-
-connection master;
-# Make SQL slave thread advance a bit
-create table t1(n int);
-sync_slave_with_master;
-select * from t1;
-# Now stop it and make I/O slave thread be ahead
-stop slave sql_thread;
-connection master;
-insert into t1 values(1);
-insert into t1 values(2);
-save_master_pos;
-let $slave_param= Read_Master_Log_Pos;
-let $slave_param_value= query_get_value(SHOW MASTER STATUS, Position, 1);
-connection slave;
-source include/wait_for_slave_param.inc;
-source include/stop_slave.inc;
-
-let $read_pos= query_get_value(SHOW SLAVE STATUS, Read_Master_Log_Pos, 1);
-let $exec_pos= query_get_value(SHOW SLAVE STATUS, Exec_Master_Log_Pos, 1);
-if (`SELECT $read_pos = $exec_pos`)
-{
-  source include/show_rpl_debug_info.inc;
-  echo 'Read_Master_Log_Pos: $read_pos' == 'Exec_Master_Log_Pos: $exec_pos';
-  die Failed because Read_Master_Log_Pos is equal to Exec_Master_Log_Pos;
-} 
-change master to master_user='root';
-let $read_pos= query_get_value(SHOW SLAVE STATUS, Read_Master_Log_Pos, 1);
-let $exec_pos= query_get_value(SHOW SLAVE STATUS, Exec_Master_Log_Pos, 1);
-if (`SELECT $read_pos <> $exec_pos`)
-{
-  source include/show_rpl_debug_info.inc;
-  echo 'Read_Master_Log_Pos: $read_pos' <> 'Exec_Master_Log_Pos: $exec_pos';
-  die Failed because Read_Master_Log_Pos is not equal to Exec_Master_Log_Pos;
-}
-
-start slave;
-sync_with_master;
-select * from t1;
-connection master;
-drop table t1;
-sync_slave_with_master;
-
-# End of 4.1 tests
-
 #
-# BUG#12190 CHANGE MASTER has differ path requiremts on MASTER_LOG_FILE and RELAY_LOG_FILE
+# This test calls CHANGE MASTER in order to check if replication can
+# restart from where SQL thread left, not from where I/O thread left.
+#  
+# File is used as repository.
 #
 
-source include/master-slave-reset.inc;
-
-connection master;
-create table t1 (a int);
-insert into t1 values (1);
-flush logs;
-insert into t1 values (2);
-
-# Note: the master positon saved by this will also be used by the
-# 'sync_with_master' below.
-sync_slave_with_master;
-
-# Check if the table t1 and t2 are identical on master and slave;
-let $diff_table_1= master:test.t1
-let $diff_table_2= slave:test.t1
-source include/diff_tables.inc;
-
-connection slave;
-source include/stop_slave.inc;
-delete from t1 where a=2;
-
-# start replication from the second insert, after fix of BUG#12190,
-# relay_log_file does not use absolute path, only the filename is
-# required
-#
-# Note: the follow change master will automatically reset
-# relay_log_purge to false, save the old value to restore
-let $relay_log_purge= `select @@global.relay_log_purge`;
-CHANGE MASTER TO relay_log_file='slave-relay-bin.000005', relay_log_pos=4;
-start slave sql_thread;
-source include/wait_for_slave_sql_to_start.inc;
-
-# Sync to the same position saved by the 'sync_slave_with_master' above.
-sync_with_master;
-
-# Check if the table t1 and t2 are identical on master and slave;
-let $diff_table_1= master:test.t1
-let $diff_table_2= slave:test.t1
-source include/diff_tables.inc;
-
-# clean up
-connection slave;
-start slave io_thread;
-source include/wait_for_slave_io_to_start.inc;
-eval set global relay_log_purge=$relay_log_purge;
-connection master;
-drop table t1;
-sync_slave_with_master;
-
-#
-# BUG#44209: MASTER_CONNECT_RETRY and --master-retry-count disconnected from each other
-#
-
--- connection master
--- source include/master-slave-reset.inc
-
--- connection slave
--- let $retry_count0= query_get_value(SHOW SLAVE STATUS, Master_Retry_Count, 1)
-
-# assertion: show that the command line is still valid (MTR sets it to 10)
--- echo Master_Retry_Count: $retry_count
-
--- source include/stop_slave.inc
-
-# action: change the initial value to some other value
--- let $retry_count1= `SELECT $retry_count0+10`
--- eval CHANGE MASTER TO master_retry_count=$retry_count1
-
--- source include/start_slave.inc
-
--- let $retry_count1= query_get_value(SHOW SLAVE STATUS, Master_Retry_Count, 1)
-# assertion: it shows the new value -- retry_count0 +10
-if (`SELECT $retry_count1 <> ($retry_count0+10)`)
-{
-  -- let $expected= `SELECT $retry_count0+10`
-  -- echo Unexpected retry count value! Got: $retry_count1, expected: $expected
-  -- die
-}
-
--- source include/stop_slave.inc
-
-# action: change master_retry_count to zero will set it to zero.
--- let $retry_count1= 0
--- eval CHANGE MASTER TO master_retry_count=$retry_count1
-
--- source include/start_slave.inc
-
--- let $retry_count2= query_get_value(SHOW SLAVE STATUS, Master_Retry_Count, 1)
-# assertion: it shows no changes
-if (`SELECT $retry_count2 <> $retry_count1`)
-{
-  -- echo Unexpected retry count value! Got: $retry_count2, expected: $retry_count1
-  -- die
-}
-
--- source include/stop_slave.inc
-
-# action: change the value to the smallest value possible
-CHANGE MASTER TO master_retry_count=1;
-
--- source include/start_slave.inc
-
--- let $retry_count3= query_get_value(SHOW SLAVE STATUS, Master_Retry_Count, 1)
-# assertion: it should show 1
-if (`SELECT $retry_count3 <> 1`)
-{
-  -- echo Unexpected retry count value! Got: $retry_count3, expected: 1
-  -- die
-}
-
--- source include/stop_slave.inc
-
-# action: change the value back to the original one
--- eval CHANGE MASTER TO master_retry_count=$retry_count0
-
--- source include/start_slave.inc
-
--- let $retry_count4= query_get_value(SHOW SLAVE STATUS, Master_Retry_Count, 1)
-# assertion: it should show 1
-if (`SELECT $retry_count4 <> $retry_count0`)
-{
-  -- echo Unexpected retry count value! Got: $retry_count4, expected: $retry_count0
-  -- die
-}
-
-## Now lets change master_retry_count to the maximum value possible
-## and stop and restart the slave to check that (in the middle of it 
-## we also check that when issueing CHANGE MASTER TO without specifying
-## master_retry_count will not affect its current value):
-##   1. master_retry_count persists after restart
-##   2. setting a value higher than the max will make the max to be set.
-##   3. maximum value is accepted and persists after serialization 
-##      and de-serialization
--- source include/stop_slave.inc
--- let $retry_count_set= 18446744073709551616
--- replace_result 18446744073709551616 RETRY_COUNT_SET
--- eval CHANGE MASTER TO master_retry_count=$retry_count_set
--- let $retry_count_expected= query_get_value(SHOW SLAVE STATUS, Master_Retry_Count, 1)
--- replace_result 18446744073709551615 RETRY_COUNT_EXPECTED 4294967295 RETRY_COUNT_EXPECTED 9223372036854775807 RETRY_COUNT_EXPECTED
--- eval SELECT $retry_count_expected AS current_retry_count
-
-## assert that issuing CHANGE MASTER without changing master_retry_count
-## does not affect the existing value for master_retry_count
--- let $connect_retry_old= query_get_value(SHOW SLAVE STATUS, Connect_Retry, 1)
--- let $connect_retry_new= `SELECT $connect_retry_old + 1`
--- let $retry_count_before= query_get_value(SHOW SLAVE STATUS, Master_Retry_Count, 1)
--- eval CHANGE MASTER TO master_connect_retry= $connect_retry_new
--- let $retry_count_after= query_get_value(SHOW SLAVE STATUS, Master_Retry_Count, 1)
-if (`SELECT $retry_count_before <> $retry_count_after`)
-{
-  -- echo Unexpected retry count value! Got: $retry_count_after, expected: $retry_count_before
-  -- die
-}
--- eval CHANGE MASTER TO master_connect_retry= $connect_retry_old
-
-## Server restart persisting test
---echo ### stop slave server
---write_file $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
-wait
-EOF
---shutdown_server 10
---source include/wait_until_disconnected.inc
-  
---echo ### start slave server
---append_file $MYSQLTEST_VARDIR/tmp/mysqld.2.expect
-restart
-EOF
---enable_reconnect
---source include/wait_until_connected_again.inc
-
--- connection slave
--- source include/start_slave.inc
-
--- let $retry_count5= query_get_value(SHOW SLAVE STATUS, Master_Retry_Count, 1)
-if (`SELECT $retry_count5 <> $retry_count_expected`)
-{
-  -- echo Unexpected retry count value! Got: $retry_count5, expected: $retry_count_expected
-  -- die
-}
-
-## assert that there is a parse error if not using a numerical value
--- error ER_PARSE_ERROR
-CHANGE MASTER TO master_retry_count='a';
-
-## assert that there is a parse error if using a negative number
--- error ER_PARSE_ERROR
-CHANGE MASTER TO master_retry_count=-1;
-
--- source include/master-slave-reset.inc
--- source include/master-slave-end.inc
+--source include/master-slave.inc
+--source extra/rpl_tests/rpl_change_master.test

=== added file 'mysql-test/suite/rpl/t/rpl_change_master_crash_safe-slave.opt'
--- a/mysql-test/suite/rpl/t/rpl_change_master_crash_safe-slave.opt	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/rpl/t/rpl_change_master_crash_safe-slave.opt	2010-11-12 19:41:49 +0000
@@ -0,0 +1 @@
+--master-info-repository=TABLE

=== added file 'mysql-test/suite/rpl/t/rpl_change_master_crash_safe.test'
--- a/mysql-test/suite/rpl/t/rpl_change_master_crash_safe.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/rpl/t/rpl_change_master_crash_safe.test	2010-11-12 19:41:49 +0000
@@ -0,0 +1,9 @@
+#
+# This test calls CHANGE MASTER in order to check if replication can
+# restart from where SQL thread left, not from where I/O thread left.
+#  
+# Table is used as repository.
+#
+
+--source include/master-slave.inc
+--source extra/rpl_tests/rpl_change_master.test


Attachment: [text/bzr-bundle] bzr/alfranio.correia@oracle.com-20101112194149-ognaowhvdxdrekhw.bundle
Thread
bzr commit into mysql-next-mr.crash-safe branch (alfranio.correia:3058)WL#4801Alfranio Correia12 Nov