MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:He Zhenxing Date:January 7 2009 2:26pm
Subject:bzr commit into mysql-5.1 branch (zhenxing.he:2709) Bug#38540 Bug#38934
Bug#40704 Bug#41480 Bug#41502 Bug#41708
View as plain text  
#At file:///media/sdb2/hezx/work/mysql/bzrwork/b40704/5.1-rpl/

 2709 He Zhenxing	2009-01-07 [merge]
      Auto merge
modified:
  libmysqld/examples/CMakeLists.txt
  mysql-test/include/wait_for_slave_io_to_stop.inc
  mysql-test/include/wait_for_slave_sql_to_stop.inc
  mysql-test/include/wait_for_slave_to_stop.inc
  mysql-test/include/wait_until_disconnected.inc
  mysql-test/lib/My/File/Path.pm
  mysql-test/mysql-test-run.pl
  mysql-test/r/mysqlcheck.result
  mysql-test/suite/rpl/r/rpl_server_id2.result
  mysql-test/suite/rpl/t/disabled.def
  mysql-test/suite/rpl/t/rpl_server_id2.test
  mysql-test/t/disabled.def
  mysql-test/t/mysqlcheck.test

=== modified file 'libmysqld/examples/CMakeLists.txt'
--- a/libmysqld/examples/CMakeLists.txt	2008-12-13 19:42:12 +0000
+++ b/libmysqld/examples/CMakeLists.txt	2008-12-18 18:36:01 +0000
@@ -32,7 +32,7 @@ ADD_EXECUTABLE(mysql_embedded ../../clie
 TARGET_LINK_LIBRARIES(mysql_embedded debug dbug strings mysys vio yassl taocrypt regex ws2_32)
 ADD_DEPENDENCIES(mysql_embedded libmysqld)
 
-ADD_EXECUTABLE(mysqltest_embedded ../../client/mysqltest.c)
+ADD_EXECUTABLE(mysqltest_embedded ../../client/mysqltest.cc)
 TARGET_LINK_LIBRARIES(mysqltest_embedded debug dbug strings mysys vio yassl taocrypt regex ws2_32)
 ADD_DEPENDENCIES(mysqltest_embedded libmysqld)
 

=== 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-07-10 16:09:39 +0000
+++ b/mysql-test/include/wait_for_slave_to_stop.inc	2008-12-26 08:20:29 +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/include/wait_until_disconnected.inc'
--- a/mysql-test/include/wait_until_disconnected.inc	2008-12-10 18:40:27 +0000
+++ b/mysql-test/include/wait_until_disconnected.inc	2008-12-19 15:48:31 +0000
@@ -7,7 +7,7 @@ let $counter= 500;
 let $mysql_errno= 0;
 while (!$mysql_errno)
 {
-  --error 0,1053,2002,2006
+  --error 0,1053,2002,2006,2013
   show status;
 
   dec $counter;

=== modified file 'mysql-test/lib/My/File/Path.pm'
--- a/mysql-test/lib/My/File/Path.pm	2008-10-11 15:06:34 +0000
+++ b/mysql-test/lib/My/File/Path.pm	2008-12-18 12:58:55 +0000
@@ -92,9 +92,16 @@ sub mkpath {
 
 
 sub copytree {
-  my ($from_dir, $to_dir) = @_;
+  my ($from_dir, $to_dir, $use_umask) = @_;
 
-  die "Usage: copytree(<fromdir>, <todir>" unless @_ == 2;
+  die "Usage: copytree(<fromdir>, <todir>, [<umask>])"
+    unless @_ == 2 or @_ == 3;
+
+  my $orig_umask;
+  if ($use_umask){
+    # Set new umask and remember the original
+    $orig_umask= umask(oct($use_umask));
+  }
 
   mkpath("$to_dir");
   opendir(DIR, "$from_dir")
@@ -114,6 +121,11 @@ sub copytree {
     copy("$from_dir/$_", "$to_dir/$_");
   }
   closedir(DIR);
+
+  if ($orig_umask){
+    # Set the original umask
+    umask($orig_umask);
+  }
 }
 
 1;

=== modified file 'mysql-test/mysql-test-run.pl'
--- a/mysql-test/mysql-test-run.pl	2008-12-13 19:42:12 +0000
+++ b/mysql-test/mysql-test-run.pl	2008-12-18 18:54:47 +0000
@@ -1981,8 +1981,8 @@ sub setup_vardir() {
   }
 
   # copy all files from std_data into var/std_data
-  # and make them writable
-  copytree("$glob_mysql_test_dir/std_data", "$opt_vardir/std_data");
+  # and make them world readable
+  copytree("$glob_mysql_test_dir/std_data", "$opt_vardir/std_data", "0022");
 
   # Remove old log files
   foreach my $name (glob("r/*.progress r/*.log r/*.warnings"))
@@ -2544,6 +2544,7 @@ sub mysql_install_db {
   mtr_add_arg($args, "--basedir=%s", $install_basedir);
   mtr_add_arg($args, "--datadir=%s", $install_datadir);
   mtr_add_arg($args, "--loose-skip-innodb");
+  mtr_add_arg($args, "--loose-skip-falcon");
   mtr_add_arg($args, "--loose-skip-ndbcluster");
   mtr_add_arg($args, "--tmpdir=%s", "$opt_vardir/tmp/");
   mtr_add_arg($args, "--core-file");

=== modified file 'mysql-test/r/mysqlcheck.result'
--- a/mysql-test/r/mysqlcheck.result	2008-12-13 19:42:12 +0000
+++ b/mysql-test/r/mysqlcheck.result	2008-12-19 10:11:48 +0000
@@ -133,3 +133,4 @@ v1
 v-1
 drop view v1, `v-1`;
 drop table t1;
+End of 5.1 tests

=== modified file 'mysql-test/suite/rpl/r/rpl_server_id2.result'
--- a/mysql-test/suite/rpl/r/rpl_server_id2.result	2007-06-27 12:29:10 +0000
+++ b/mysql-test/suite/rpl/r/rpl_server_id2.result	2008-12-19 20:13:12 +0000
@@ -8,45 +8,6 @@ create table t1 (n int);
 reset master;
 stop slave;
 change master to master_port=SLAVE_PORT;
-show slave status;
-Slave_IO_State	
-Master_Host	127.0.0.1
-Master_User	root
-Master_Port	SLAVE_PORT
-Connect_Retry	1
-Master_Log_File	
-Read_Master_Log_Pos	4
-Relay_Log_File	slave-relay-bin.000001
-Relay_Log_Pos	4
-Relay_Master_Log_File	
-Slave_IO_Running	No
-Slave_SQL_Running	No
-Replicate_Do_DB	
-Replicate_Ignore_DB	
-Replicate_Do_Table	
-Replicate_Ignore_Table	
-Replicate_Wild_Do_Table	
-Replicate_Wild_Ignore_Table	#
-Last_Errno	0
-Last_Error	
-Skip_Counter	0
-Exec_Master_Log_Pos	0
-Relay_Log_Space	106
-Until_Condition	None
-Until_Log_File	
-Until_Log_Pos	0
-Master_SSL_Allowed	No
-Master_SSL_CA_File	
-Master_SSL_CA_Path	
-Master_SSL_Cert	
-Master_SSL_Cipher	
-Master_SSL_Key	
-Seconds_Behind_Master	NULL
-Master_SSL_Verify_Server_Cert	No
-Last_IO_Errno	#
-Last_IO_Error	#
-Last_SQL_Errno	0
-Last_SQL_Error	
 start slave;
 insert into t1 values (1);
 select * from t1;
@@ -55,3 +16,15 @@ n
 1
 stop slave;
 drop table t1;
+reset master;
+create table t1(n int);
+create table t2(n int);
+change master to master_port=MASTER_PORT;
+start slave until master_log_file='master-bin.000001', master_log_pos=UNTIL_POS;
+*** checking until postion execution: must be only t1 in the list ***
+show tables;
+Tables_in_test
+t1
+start slave sql_thread;
+drop table t1;
+drop table t2;

=== modified file 'mysql-test/suite/rpl/t/disabled.def'
--- a/mysql-test/suite/rpl/t/disabled.def	2008-11-12 17:51:47 +0000
+++ b/mysql-test/suite/rpl/t/disabled.def	2008-12-19 19:47:02 +0000
@@ -10,7 +10,3 @@
 #
 ##############################################################################
 
-rpl_redirect               : Failure is sporadic and and the test is superfluous (mats)
-rpl_innodb_bug28430        : Failure on Solaris Bug #36793
-rpl_flushlog_loop          : BUG#37733 2008-07-23 Sven disabled in 5.1-bugteam. the bug has been fixed in 5.1-rpl: please re-enable when that gets pushed to main
-rpl_server_id2             : Bug#38540 rpl_server_id2 uses show slave status unnecessarily

=== modified file 'mysql-test/suite/rpl/t/rpl_server_id2.test'
--- a/mysql-test/suite/rpl/t/rpl_server_id2.test	2007-06-27 12:29:10 +0000
+++ b/mysql-test/suite/rpl/t/rpl_server_id2.test	2008-12-19 20:13:12 +0000
@@ -9,9 +9,6 @@ reset master;
 stop slave;
 --replace_result $SLAVE_MYPORT SLAVE_PORT
 eval change master to master_port=$SLAVE_MYPORT;
---replace_result $SLAVE_MYPORT SLAVE_PORT
---replace_column 18 # 35 # 36 #
-query_vertical show slave status;
 start slave;
 insert into t1 values (1);
 save_master_pos;
@@ -23,4 +20,44 @@ select * from t1; # check that indeed 2 
 stop slave;
 drop table t1;
 
-# End of 4.1 tests
+
+#
+# Bug#38934 slave slave until does not work with --replicate-same-server-id
+#
+# Verifying that slave performs all events until the master_log_pos
+# in presense of --replicate-same-server-id the slave is started with.
+
+connection master;
+reset master;
+
+# setting the until position to correspond to the first following create table
+# which will make the event executed and the slave sql thread stopped
+# right after that.
+let $until_pos= query_get_value(SHOW MASTER STATUS, Position, 1);
+inc $until_pos;
+
+create table t1(n int);
+create table t2(n int);
+
+connection slave;
+--replace_result $MASTER_MYPORT MASTER_PORT
+eval change master to master_port=$MASTER_MYPORT;
+--replace_result $until_pos UNTIL_POS
+eval start slave until master_log_file='master-bin.000001', master_log_pos=$until_pos;
+--source include/wait_for_slave_io_to_start.inc
+--source include/wait_for_slave_sql_to_stop.inc
+
+--echo *** checking until postion execution: must be only t1 in the list ***
+show tables;
+
+# cleanup
+
+connection slave;
+start slave sql_thread;
+
+connection master;
+drop table t1;
+drop table t2;
+sync_slave_with_master;
+
+# End of tests

=== modified file 'mysql-test/t/disabled.def'
--- a/mysql-test/t/disabled.def	2008-12-13 19:48:19 +0000
+++ b/mysql-test/t/disabled.def	2008-12-18 12:35:48 +0000
@@ -9,9 +9,6 @@
 #  Do not use any TAB characters for whitespace.
 #
 ##############################################################################
-federated_transactions   : Bug#29523 Transactions do not work
-log_tables.test                       : Bug #37798: main.log_tables fails randomly on powermacg5 and windows
-wait_timeout_func                     : BUG#36873 2008-07-06 sven wait_timeout_func.test fails randomly
 delayed_insert_limit_func             : BUG#37962 2008-07-08 sven *_func tests containing sleeps/race conditions
 event_scheduler_func                  : BUG#37962 2008-07-08 sven *_func tests containing sleeps/race conditions
 interactive_timeout_func              : BUG#37962 2008-07-08 sven *_func tests containing sleeps/race conditions
@@ -21,8 +18,6 @@ rpl_max_binlog_size_func              : 
 slow_query_log_func                   : BUG#37962 2008-07-08 sven *_func tests containing sleeps/race conditions
 sql_low_priority_updates_func         : BUG#37962 2008-07-08 sven *_func tests containing sleeps/race conditions
 timestamp_func                        : BUG#37962 2008-07-08 sven *_func tests containing sleeps/race conditions
-log_output_func                       : BUG#37766 2008-07-10 sven main.log_output_func randomly fails in pushbuild
 slow_query_log_func.test              : Bug #37962: *_func tests containing sleeps/race conditions
 log_bin_trust_function_creators_func : Bug#41003 Dec-12-2008 andrei todo:re-enable after merging the bug fixes from the main trees.
 innodb_max_dirty_pages_pct_func       : BUG#41018 BUG#39382 2008-12-02 sven test fails often. some failures fill up the disk, causing subsequent failures in many other tests
-wait_timeout_func                     : Bug #41225 joro wait_timeout_func fails

=== modified file 'mysql-test/t/mysqlcheck.test'
--- a/mysql-test/t/mysqlcheck.test	2008-12-13 19:42:12 +0000
+++ b/mysql-test/t/mysqlcheck.test	2008-12-18 19:37:18 +0000
@@ -82,7 +82,6 @@ create view v1 as select * from informat
 check table v1, information_schema.routines;
 drop view v1;
 
-
 #
 # Bug#37527: mysqlcheck fails to report entire database 
 # when frm file corruption
@@ -90,20 +89,21 @@ drop view v1;
 CREATE TABLE t1(a INT);
 CREATE TABLE t2(a INT);
 # backup then null t1.frm
---copy_file $MYSQLTEST_VARDIR/master-data/test/t1.frm $MYSQLTEST_VARDIR/master-data/test/t1.frm.bak
---remove_file $MYSQLTEST_VARDIR/master-data/test/t1.frm
---write_file $MYSQLTEST_VARDIR/master-data/test/t1.frm
+--copy_file $MYSQLD_DATADIR/test/t1.frm $MYSQLD_DATADIR/test/t1.frm.bak
+--remove_file $MYSQLD_DATADIR/test/t1.frm
+--write_file $MYSQLD_DATADIR/test/t1.frm
 EOF
 --exec $MYSQL_CHECK test
 # restore t1.frm
---remove_file $MYSQLTEST_VARDIR/master-data/test/t1.frm
---copy_file $MYSQLTEST_VARDIR/master-data/test/t1.frm.bak $MYSQLTEST_VARDIR/master-data/test/t1.frm
---remove_file $MYSQLTEST_VARDIR/master-data/test/t1.frm.bak
+--remove_file $MYSQLD_DATADIR/test/t1.frm
+--copy_file $MYSQLD_DATADIR/test/t1.frm.bak $MYSQLD_DATADIR/test/t1.frm
+--remove_file $MYSQLD_DATADIR/test/t1.frm.bak
 DROP TABLE t1, t2;
 
 
 --echo End of 5.0 tests
 
+
 #
 # Bug #30679: 5.1 name encoding not performed for views during upgrade
 #
@@ -117,3 +117,6 @@ show tables;
 show tables;
 drop view v1, `v-1`;
 drop table t1;
+
+
+--echo End of 5.1 tests

Thread
bzr commit into mysql-5.1 branch (zhenxing.he:2709) Bug#38540 Bug#38934Bug#40704 Bug#41480 Bug#41502 Bug#41708He Zhenxing7 Jan