List:Commits« Previous MessageNext Message »
From:He Zhenxing Date:December 29 2008 12:36pm
Subject:bzr push into mysql-6.0-rpl branch (zhenxing.he:2774 to 2775) Bug#40459
View as plain text  
 2775 He Zhenxing	2008-12-29 [merge]
      Merge patch for BUG#40459
modified:
  sql/slave.cc

 2774 He Zhenxing	2008-12-29 [merge]
      Auto merge
modified:
  client/CMakeLists.txt
  libmysqld/examples/CMakeLists.txt

=== modified file 'mysql-test/include/wait_for_slave_io_to_stop.inc'
--- a/mysql-test/include/wait_for_slave_io_to_stop.inc	2008-07-10 16:09:39 +0000
+++ b/mysql-test/include/wait_for_slave_io_to_stop.inc	2008-12-26 08:20:29 +0000
@@ -11,8 +11,14 @@
 # $slave_keep_connection. See wait_for_slave_param.inc for
 # descriptions.
 
-let $slave_param= Slave_IO_Running;
-let $slave_param_value= No;
-let $slave_error_message= Failed while waiting for slave IO thread to stop;
-source include/wait_for_slave_param.inc;
-let $slave_error_message= ;
+# if server has not used CHANGE MASTER to initiate slave, SHOW SLAVE
+# STATUS will return an empty set.
+let $_slave_io_running= query_get_value("SHOW SLAVE STATUS", Slave_IO_Running, 1);
+if (`SELECT '$_slave_io_running' != 'No such row'`)
+{
+  let $slave_param= Slave_IO_Running;
+  let $slave_param_value= No;
+  let $slave_error_message= Failed while waiting for slave IO thread to stop;
+  source include/wait_for_slave_param.inc;
+  let $slave_error_message= ;
+}

=== modified file 'mysql-test/include/wait_for_slave_sql_to_stop.inc'
--- a/mysql-test/include/wait_for_slave_sql_to_stop.inc	2008-07-10 16:09:39 +0000
+++ b/mysql-test/include/wait_for_slave_sql_to_stop.inc	2008-12-26 08:20:29 +0000
@@ -11,8 +11,14 @@
 # $slave_keep_connection. See wait_for_slave_param.inc for
 # descriptions.
 
-let $slave_param= Slave_SQL_Running;
-let $slave_param_value= No;
-let $slave_error_message= Failed while waiting for slave SQL thread to stop;
-source include/wait_for_slave_param.inc;
-let $slave_error_message= ;
+# if server has not used CHANGE MASTER to initiate slave, SHOW SLAVE
+# STATUS will return an empty set.
+let $_slave_io_running= query_get_value("SHOW SLAVE STATUS", Slave_IO_Running, 1);
+if (`SELECT '$_slave_io_running' != 'No such row'`)
+{
+  let $slave_param= Slave_SQL_Running;
+  let $slave_param_value= No;
+  let $slave_error_message= Failed while waiting for slave SQL thread to stop;
+  source include/wait_for_slave_param.inc;
+  let $slave_error_message= ;
+}

=== modified file 'mysql-test/include/wait_for_slave_to_stop.inc'
--- a/mysql-test/include/wait_for_slave_to_stop.inc	2008-08-04 14:30:50 +0000
+++ b/mysql-test/include/wait_for_slave_to_stop.inc	2008-12-29 09:58:13 +0000
@@ -11,14 +11,20 @@
 # $slave_keep_connection. See wait_for_slave_param.inc for
 # descriptions.
 
-let $slave_error_message= Failed while waiting for slave to stop;
+# if server has not used CHANGE MASTER to initiate slave, SHOW SLAVE
+# STATUS will return an empty set.
+let $_slave_io_running= query_get_value("SHOW SLAVE STATUS", Slave_IO_Running, 1);
+if (`SELECT '$_slave_io_running' != 'No such row'`)
+{
+  let $slave_error_message= Failed while waiting for slave to stop;
 
-let $slave_param= Slave_IO_Running;
-let $slave_param_value= No;
-source include/wait_for_slave_param.inc;
+  let $slave_param= Slave_IO_Running;
+  let $slave_param_value= No;
+  source include/wait_for_slave_param.inc;
 
-let $slave_param= Slave_SQL_Running;
-let $slave_param_value= No;
-source include/wait_for_slave_param.inc;
+  let $slave_param= Slave_SQL_Running;
+  let $slave_param_value= No;
+  source include/wait_for_slave_param.inc;
 
-let $slave_error_message= ;
+  let $slave_error_message= ;
+}

=== modified file 'mysql-test/suite/rpl/r/rpl_row_until.result'
--- a/mysql-test/suite/rpl/r/rpl_row_until.result	2008-12-24 10:48:24 +0000
+++ b/mysql-test/suite/rpl/r/rpl_row_until.result	2008-12-29 10:03:03 +0000
@@ -12,7 +12,7 @@ create table t2(n int not null auto_incr
 insert into t2 values (1),(2);
 insert into t2 values (3),(4);
 drop table t2;
-start slave until master_log_file='master-bin.000001', master_log_pos=311;
+start slave until master_log_file='master-bin.000001', master_log_pos=455;
 select * from t1;
 n
 1
@@ -45,7 +45,7 @@ Exec_Master_Log_Pos	455
 Relay_Log_Space	#
 Until_Condition	Master
 Until_Log_File	master-bin.000001
-Until_Log_Pos	311
+Until_Log_Pos	455
 Master_SSL_Allowed	No
 Master_SSL_CA_File	
 Master_SSL_CA_Path	
@@ -58,6 +58,8 @@ Last_IO_Errno	#
 Last_IO_Error	#
 Last_SQL_Errno	0
 Last_SQL_Error	
+Replicate_Ignore_Server_Ids	
+Master_Server_Id	1
 start slave until master_log_file='master-no-such-bin.000001', master_log_pos=291;
 select * from t1;
 n
@@ -104,7 +106,9 @@ Last_IO_Errno	#
 Last_IO_Error	#
 Last_SQL_Errno	0
 Last_SQL_Error	
-start slave until relay_log_file='slave-relay-bin.000003', relay_log_pos=1014;
+Replicate_Ignore_Server_Ids	
+Master_Server_Id	1
+start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=1016;
 select * from t2;
 n
 1
@@ -134,8 +138,8 @@ Skip_Counter	0
 Exec_Master_Log_Pos	869
 Relay_Log_Space	#
 Until_Condition	Relay
-Until_Log_File	slave-relay-bin.000003
-Until_Log_Pos	1014
+Until_Log_File	slave-relay-bin.000004
+Until_Log_Pos	1016
 Master_SSL_Allowed	No
 Master_SSL_CA_File	
 Master_SSL_CA_Path	
@@ -148,6 +152,8 @@ Last_IO_Errno	#
 Last_IO_Error	#
 Last_SQL_Errno	0
 Last_SQL_Error	
+Replicate_Ignore_Server_Ids	
+Master_Server_Id	1
 start slave;
 include/stop_slave.inc
 start slave sql_thread until master_log_file='master-bin.000001', master_log_pos=740;
@@ -190,6 +196,8 @@ Last_IO_Errno	#
 Last_IO_Error	#
 Last_SQL_Errno	0
 Last_SQL_Error	
+Replicate_Ignore_Server_Ids	
+Master_Server_Id	1
 start slave until master_log_file='master-bin', master_log_pos=561;
 ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL
 start slave until master_log_file='master-bin.000001', master_log_pos=561, relay_log_pos=12;

=== modified file 'mysql-test/suite/rpl/t/disabled.def'
--- a/mysql-test/suite/rpl/t/disabled.def	2008-12-24 11:56:12 +0000
+++ b/mysql-test/suite/rpl/t/disabled.def	2008-12-29 10:03:03 +0000
@@ -19,5 +19,4 @@ rpl_ndb_multi              : Bug#30751: 
 rpl_log_pos                : Bug#8693 Test 'rpl_log_pos' fails sometimes
 rpl_heartbeat              : Bug#37714 2008-07-14 alik Disabled to make 6.0 greaner (the test fails too often)
 rpl_extraCol_falcon        : Bug#40930 2008-11-21 johnemb rpl.rpl_extraCol_falcon fails doing STOP SLAVE (on Windows PB2)
-rpl_row_until              : Bug#41707 2008-12-23 alfranio rpl.rpl_row_until fails in pushbuild: Table 'test.t2' doesnt exist
 rpl_flushlog_loop          : BUG#41708 2008-12-23 alfranio rpl.rpl_flushlog_loop fails in pushbuild producing non-deterministic result file

=== modified file 'mysql-test/suite/rpl/t/rpl_row_until.test'
--- a/mysql-test/suite/rpl/t/rpl_row_until.test	2008-08-04 14:30:50 +0000
+++ b/mysql-test/suite/rpl/t/rpl_row_until.test	2008-12-26 07:23:16 +0000
@@ -24,7 +24,7 @@ drop table t2;
 
 # try to replicate all queries until drop of t1
 connection slave;
-start slave until master_log_file='master-bin.000001', master_log_pos=311;
+start slave until master_log_file='master-bin.000001', master_log_pos=455;
 --source include/wait_for_slave_sql_to_stop.inc
 # here table should be still not deleted
 select * from t1;
@@ -38,7 +38,7 @@ select * from t1;
 source include/show_slave_status.inc;
 
 # try replicate all up to and not including the second insert to t2;
-start slave until relay_log_file='slave-relay-bin.000003', relay_log_pos=1014;
+start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=1016;
 --source include/wait_for_slave_sql_to_stop.inc
 select * from t2;
 source include/show_slave_status.inc;

=== modified file 'sql/slave.cc'
--- a/sql/slave.cc	2008-12-24 10:48:24 +0000
+++ b/sql/slave.cc	2008-12-29 12:20:40 +0000
@@ -1187,6 +1187,7 @@ static int get_master_version_and_clock(
       err_msg.append(mysql_error(mysql));
       err_msg.append("'");
       mysql_free_result(mysql_store_result(mysql));
+      err_code= ER_SLAVE_FATAL_ERROR;
       goto err;
     }
     mysql_free_result(mysql_store_result(mysql));

Thread
bzr push into mysql-6.0-rpl branch (zhenxing.he:2774 to 2775) Bug#40459He Zhenxing29 Dec