summaryrefslogtreecommitdiff
path: root/mysql-test/suite
diff options
context:
space:
mode:
authorAndrei Elkin <aelkin@mysql.com>2010-03-21 21:30:49 +0200
committerAndrei Elkin <aelkin@mysql.com>2010-03-21 21:30:49 +0200
commit402d6ce67fe97f094f7cf263048937544a2d61d7 (patch)
treea76a2dfa365d276a69e00c8232b2a8bb85c42d46 /mysql-test/suite
parentad6e00e3b2b9bf26805c90cbd7655c6d2b20cab4 (diff)
parentc3cd608aef94f8b8507997faac9e81eebc32a2d6 (diff)
downloadmariadb-git-402d6ce67fe97f094f7cf263048937544a2d61d7.tar.gz
merging bug@51648 to 5.1-bt, pe from local bugfixing branch
Diffstat (limited to 'mysql-test/suite')
-rw-r--r--mysql-test/suite/rpl/r/rpl_get_master_version_and_clock.result31
-rw-r--r--mysql-test/suite/rpl/r/rpl_show_slave_running.result11
-rw-r--r--mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test27
-rw-r--r--mysql-test/suite/rpl/t/rpl_show_slave_running.test12
4 files changed, 39 insertions, 42 deletions
diff --git a/mysql-test/suite/rpl/r/rpl_get_master_version_and_clock.result b/mysql-test/suite/rpl/r/rpl_get_master_version_and_clock.result
index d054cb573d3..a34c536feb8 100644
--- a/mysql-test/suite/rpl/r/rpl_get_master_version_and_clock.result
+++ b/mysql-test/suite/rpl/r/rpl_get_master_version_and_clock.result
@@ -7,34 +7,24 @@ start slave;
call mtr.add_suppression("Slave I/O: Master command COM_REGISTER_SLAVE failed: .*");
call mtr.add_suppression("Fatal error: The slave I/O thread stops because master and slave have equal MySQL server ids; .*");
call mtr.add_suppression("Slave I/O thread .* register on master");
-SELECT IS_FREE_LOCK("debug_lock.before_get_UNIX_TIMESTAMP");
-IS_FREE_LOCK("debug_lock.before_get_UNIX_TIMESTAMP")
-1
-SELECT GET_LOCK("debug_lock.before_get_UNIX_TIMESTAMP", 1000);
-GET_LOCK("debug_lock.before_get_UNIX_TIMESTAMP", 1000)
-1
-set global debug= 'd,debug_lock.before_get_UNIX_TIMESTAMP';
stop slave;
+SET @@global.debug= "+d,'debug_lock.before_get_UNIX_TIMESTAMP'";
start slave;
-SELECT RELEASE_LOCK("debug_lock.before_get_UNIX_TIMESTAMP");
-RELEASE_LOCK("debug_lock.before_get_UNIX_TIMESTAMP")
-1
+slave is going to hang in get_master_version_and_clock
+slave is unblocked
+SET DEBUG_SYNC='now SIGNAL signal.get_unix_timestamp';
Check network error happened here
NETWORK ERROR
-SELECT IS_FREE_LOCK("debug_lock.before_get_SERVER_ID");
-IS_FREE_LOCK("debug_lock.before_get_SERVER_ID")
-1
-SELECT GET_LOCK("debug_lock.before_get_SERVER_ID", 1000);
-GET_LOCK("debug_lock.before_get_SERVER_ID", 1000)
-1
-set global debug= 'd,debug_lock.before_get_SERVER_ID';
+set @@global.debug = "-d,'debug_lock.before_get_UNIX_TIMESTAMP'";
stop slave;
+SET @@global.debug= "+d,'debug_lock.before_get_SERVER_ID'";
start slave;
-SELECT RELEASE_LOCK("debug_lock.before_get_SERVER_ID");
-RELEASE_LOCK("debug_lock.before_get_SERVER_ID")
-1
+slave is going to hang in get_master_version_and_clock
+slave is unblocked
+SET DEBUG_SYNC='now SIGNAL signal.get_server_id';
Check network error happened here
NETWORK ERROR
+set @@global.debug = "-d,'debug_lock.before_get_SERVER_ID'";
set global debug= '';
reset master;
include/stop_slave.inc
@@ -43,3 +33,4 @@ start slave;
*** must be having the replicate-same-server-id IO thread error ***
Slave_IO_Errno= 1593
Slave_IO_Error= Fatal error: The slave I/O thread stops because master and slave have equal MySQL server ids; these ids must be different for replication to work (or the --replicate-same-server-id option must be used on slave but this does not always make sense; please check the manual before using it).
+SET DEBUG_SYNC= 'RESET';
diff --git a/mysql-test/suite/rpl/r/rpl_show_slave_running.result b/mysql-test/suite/rpl/r/rpl_show_slave_running.result
index da26190e76d..598762d5188 100644
--- a/mysql-test/suite/rpl/r/rpl_show_slave_running.result
+++ b/mysql-test/suite/rpl/r/rpl_show_slave_running.result
@@ -4,11 +4,9 @@ reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
+SET DEBUG_SYNC= 'RESET';
include/stop_slave.inc
-SELECT GET_LOCK("debug_lock.before_get_running_status_yes", 1000);
-GET_LOCK("debug_lock.before_get_running_status_yes", 1000)
-1
-set global debug= 'd,debug_lock.before_get_running_status_yes';
+set global debug= 'd,dbug.before_get_running_status_yes';
Slave_running, Slave_IO_Running, Slave_SQL_Running, must be OFF, NO, NO in three following queries
SHOW STATUS LIKE 'Slave_running';
Variable_name Value
@@ -22,9 +20,7 @@ Variable_name Value
Slave_running OFF
Slave_IO_Running= No
Slave_SQL_Running= No
-SELECT RELEASE_LOCK("debug_lock.before_get_running_status_yes");
-RELEASE_LOCK("debug_lock.before_get_running_status_yes")
-1
+SET DEBUG_SYNC='now SIGNAL signal.io_thread_let_running';
Slave_running, Slave_IO_Running, Slave_SQL_Running must be OFF YES NO in three following queries
SHOW STATUS LIKE 'Slave_running';
Variable_name Value
@@ -39,4 +35,5 @@ Slave_running ON
Slave_IO_Running= Yes
Slave_SQL_Running= Yes
set global debug= '';
+SET DEBUG_SYNC= 'RESET';
End of tests
diff --git a/mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test b/mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test
index 24309e8a14a..4a9276d9880 100644
--- a/mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test
+++ b/mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test
@@ -16,8 +16,16 @@
source include/master-slave.inc;
source include/have_debug.inc;
+source include/have_debug_sync.inc;
+
+#
+# The test is not supposed to have any binglog affairs.
+# Hence it's enough it to run only with one binlog format
+#
+source include/have_binlog_format_mixed.inc;
connection slave;
+
call mtr.add_suppression("Slave I/O: Master command COM_REGISTER_SLAVE failed: .*");
call mtr.add_suppression("Fatal error: The slave I/O thread stops because master and slave have equal MySQL server ids; .*");
call mtr.add_suppression("Slave I/O thread .* register on master");
@@ -25,20 +33,16 @@ call mtr.add_suppression("Slave I/O thread .* register on master");
#Test case 1: Try to get the value of the UNIX_TIMESTAMP from master under network disconnection
let $debug_saved= `select @@global.debug`;
-let $debug_lock= "debug_lock.before_get_UNIX_TIMESTAMP";
-eval SELECT IS_FREE_LOCK($debug_lock);
-eval SELECT GET_LOCK($debug_lock, 1000);
-
-set global debug= 'd,debug_lock.before_get_UNIX_TIMESTAMP';
+# set up two parameters to pass into extra/rpl_tests/rpl_get_master_version_and_clock
+let $dbug_sync_point= 'debug_lock.before_get_UNIX_TIMESTAMP';
+let $debug_sync_action= 'now SIGNAL signal.get_unix_timestamp';
source extra/rpl_tests/rpl_get_master_version_and_clock.test;
#Test case 2: Try to get the value of the SERVER_ID from master under network disconnection
connection slave;
-let $debug_lock= "debug_lock.before_get_SERVER_ID";
-eval SELECT IS_FREE_LOCK($debug_lock);
-eval SELECT GET_LOCK($debug_lock, 1000);
-set global debug= 'd,debug_lock.before_get_SERVER_ID';
+let $dbug_sync_point= 'debug_lock.before_get_SERVER_ID';
+let $debug_sync_action= 'now SIGNAL signal.get_server_id';
source extra/rpl_tests/rpl_get_master_version_and_clock.test;
eval set global debug= '$debug_saved';
@@ -62,4 +66,9 @@ let $last_io_error= query_get_value("show slave status", Last_IO_Error, 1);
echo Slave_IO_Errno= $last_io_errno;
echo Slave_IO_Error= $last_io_error;
+# cleanup
+
+# is not really necessary but avoids mtr post-run env check warnings
+SET DEBUG_SYNC= 'RESET';
+
# End of tests
diff --git a/mysql-test/suite/rpl/t/rpl_show_slave_running.test b/mysql-test/suite/rpl/t/rpl_show_slave_running.test
index 62cc311e6b2..bfdd1c279fc 100644
--- a/mysql-test/suite/rpl/t/rpl_show_slave_running.test
+++ b/mysql-test/suite/rpl/t/rpl_show_slave_running.test
@@ -5,14 +5,14 @@
#
source include/master-slave.inc;
source include/have_debug.inc;
+source include/have_debug_sync.inc;
connection slave;
-
+SET DEBUG_SYNC= 'RESET';
source include/stop_slave.inc;
let $debug_saved= `select @@global.debug`;
-let $debug_lock= "debug_lock.before_get_running_status_yes";
-eval SELECT GET_LOCK($debug_lock, 1000);
-set global debug= 'd,debug_lock.before_get_running_status_yes';
+set global debug= 'd,dbug.before_get_running_status_yes'; # to block due-started IO
+
# Test 1. Slave is stopped
@@ -40,7 +40,7 @@ echo Slave_SQL_Running= $status;
# Test 3. The slave IO thread is started and got connected to master
# and SQL thread is still not started
-eval SELECT RELEASE_LOCK($debug_lock);
+SET DEBUG_SYNC='now SIGNAL signal.io_thread_let_running'; # unblock IO thread now
let $slave_param= Slave_IO_Running;
let $slave_param_value= YES;
source include/wait_for_slave_param.inc;
@@ -72,5 +72,5 @@ echo Slave_SQL_Running= $status;
connection slave;
eval set global debug= '$debug_saved';
-
+SET DEBUG_SYNC= 'RESET';
--echo End of tests