summaryrefslogtreecommitdiff
path: root/mysql-test/suite/rpl
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2012-03-09 08:06:59 +0100
committerSergei Golubchik <sergii@pisem.net>2012-03-09 08:06:59 +0100
commit4933d21e5d93840ddcf41bf25ed92fbe253ae92d (patch)
treea4d892b86aa46927978f82976fff61f1e5193383 /mysql-test/suite/rpl
parent97ee59d27d3daca806fdb3577df5a0e0a45a0a30 (diff)
parent7009bf411a8cb9a6e035b761b5e6352b4f474303 (diff)
downloadmariadb-git-4933d21e5d93840ddcf41bf25ed92fbe253ae92d.tar.gz
merge with mysql-5.5.21
Diffstat (limited to 'mysql-test/suite/rpl')
-rw-r--r--mysql-test/suite/rpl/r/rpl_cant_read_event_incident.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_checksum.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_heartbeat_basic.result1
-rw-r--r--mysql-test/suite/rpl/r/rpl_log_pos.result1
-rw-r--r--mysql-test/suite/rpl/r/rpl_manual_change_index_file.result1
-rw-r--r--mysql-test/suite/rpl/r/rpl_packet.result1
-rw-r--r--mysql-test/suite/rpl/r/rpl_start_stop_slave.result10
-rw-r--r--mysql-test/suite/rpl/r/rpl_stm_start_stop_slave.result10
-rw-r--r--mysql-test/suite/rpl/t/rpl_cant_read_event_incident.test6
-rw-r--r--mysql-test/suite/rpl/t/rpl_heartbeat_basic.test6
-rw-r--r--mysql-test/suite/rpl/t/rpl_log_pos.test9
-rw-r--r--mysql-test/suite/rpl/t/rpl_manual_change_index_file.test9
-rw-r--r--mysql-test/suite/rpl/t/rpl_packet.test9
-rw-r--r--mysql-test/suite/rpl/t/rpl_start_stop_slave.test44
-rw-r--r--mysql-test/suite/rpl/t/rpl_stm_start_stop_slave.test2
15 files changed, 87 insertions, 26 deletions
diff --git a/mysql-test/suite/rpl/r/rpl_cant_read_event_incident.result b/mysql-test/suite/rpl/r/rpl_cant_read_event_incident.result
index bcae1c2c62b..c132f80f58e 100644
--- a/mysql-test/suite/rpl/r/rpl_cant_read_event_incident.result
+++ b/mysql-test/suite/rpl/r/rpl_cant_read_event_incident.result
@@ -11,7 +11,7 @@ reset slave;
start slave;
include/wait_for_slave_param.inc [Last_IO_Errno]
Last_IO_Errno = '1236'
-Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'binlog truncated in the middle of event; consider out of disk space on master; the last event was read from 'master-bin.000001' at 316, the last byte read was read from 'master-bin.000001' at 335.''
+Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'binlog truncated in the middle of event; consider out of disk space on master; the start event position from '.' at XXX, the last event was read from 'master-bin.000001' at XXX, the last byte read was read from 'master-bin.000001' at XXX.''
reset master;
stop slave;
reset slave;
diff --git a/mysql-test/suite/rpl/r/rpl_checksum.result b/mysql-test/suite/rpl/r/rpl_checksum.result
index 3297e8c2754..feabfc19631 100644
--- a/mysql-test/suite/rpl/r/rpl_checksum.result
+++ b/mysql-test/suite/rpl/r/rpl_checksum.result
@@ -71,7 +71,7 @@ insert into t1 values (1) /* will not be applied on slave due to simulation */;
set @@global.debug_dbug='d,simulate_slave_unaware_checksum';
start slave;
include/wait_for_slave_io_error.inc [errno=1236]
-Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'Slave can not handle replication events with the checksum that master is configured to log; the last event was read from 'master-bin.000010' at 245, the last byte read was read from 'master-bin.000010' at 245.''
+Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'Slave can not handle replication events with the checksum that master is configured to log; the start event position from 'master-bin.000009' at 245, the last event was read from 'master-bin.000010' at 245, the last byte read was read from 'master-bin.000010' at 245.''
select count(*) as zero from t1;
zero
0
diff --git a/mysql-test/suite/rpl/r/rpl_heartbeat_basic.result b/mysql-test/suite/rpl/r/rpl_heartbeat_basic.result
index 29b5b768b66..cc9d1f99f7c 100644
--- a/mysql-test/suite/rpl/r/rpl_heartbeat_basic.result
+++ b/mysql-test/suite/rpl/r/rpl_heartbeat_basic.result
@@ -270,6 +270,7 @@ Heartbeat event received
include/rpl_reset.inc
include/stop_slave.inc
include/rpl_change_topology.inc [new topology=1->2->1]
+CHANGE MASTER TO MASTER_HEARTBEAT_PERIOD=1;
include/start_slave.inc
CREATE TABLE t1 (a INT PRIMARY KEY, b VARCHAR(10));
INSERT INTO t1 VALUES(1, 'on master');
diff --git a/mysql-test/suite/rpl/r/rpl_log_pos.result b/mysql-test/suite/rpl/r/rpl_log_pos.result
index a7687dd3e73..941dba2f5af 100644
--- a/mysql-test/suite/rpl/r/rpl_log_pos.result
+++ b/mysql-test/suite/rpl/r/rpl_log_pos.result
@@ -11,6 +11,7 @@ include/stop_slave.inc
change master to master_log_pos=MASTER_LOG_POS;
start slave;
include/wait_for_slave_io_error.inc [errno=1236]
+Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'log event entry exceeded max_allowed_packet; Increase max_allowed_packet on master; the start event position from 'master-bin.000001' at XXX, the last event was read from 'master-bin.000001' at XXX, the last byte read was read from 'master-bin.000001' at XXX.''
include/stop_slave_sql.inc
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
diff --git a/mysql-test/suite/rpl/r/rpl_manual_change_index_file.result b/mysql-test/suite/rpl/r/rpl_manual_change_index_file.result
index a2dc5d402a7..efe9bf076f0 100644
--- a/mysql-test/suite/rpl/r/rpl_manual_change_index_file.result
+++ b/mysql-test/suite/rpl/r/rpl_manual_change_index_file.result
@@ -5,6 +5,7 @@ CREATE TABLE t1(c1 INT);
FLUSH LOGS;
call mtr.add_suppression('Got fatal error 1236 from master when reading data from binary log: .*could not find next log');
include/wait_for_slave_io_error.inc [errno=1236]
+Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'could not find next log; the start event position from 'master-bin.000001' at XXX, the last event was read from 'master-bin.000002' at XXX, the last byte read was read from 'master-bin.000002' at XXX.''
CREATE TABLE t2(c1 INT);
FLUSH LOGS;
CREATE TABLE t3(c1 INT);
diff --git a/mysql-test/suite/rpl/r/rpl_packet.result b/mysql-test/suite/rpl/r/rpl_packet.result
index 27f85cac7de..4b2a525de27 100644
--- a/mysql-test/suite/rpl/r/rpl_packet.result
+++ b/mysql-test/suite/rpl/r/rpl_packet.result
@@ -37,6 +37,7 @@ DROP TABLE t1;
CREATE TABLE t1 (f1 int PRIMARY KEY, f2 LONGTEXT, f3 LONGTEXT) ENGINE=MyISAM;
INSERT INTO t1(f1, f2, f3) VALUES(1, REPEAT('a', @@global.max_allowed_packet), REPEAT('b', @@global.max_allowed_packet));
include/wait_for_slave_io_error.inc [errno=1236]
+Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'log event entry exceeded max_allowed_packet; Increase max_allowed_packet on master; the start event position from '.' at XXX, the last event was read from 'master-bin.000001' at XXX, the last byte read was read from 'master-bin.000001' at XXX.''
STOP SLAVE;
RESET SLAVE;
RESET MASTER;
diff --git a/mysql-test/suite/rpl/r/rpl_start_stop_slave.result b/mysql-test/suite/rpl/r/rpl_start_stop_slave.result
new file mode 100644
index 00000000000..43a7712bdf1
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_start_stop_slave.result
@@ -0,0 +1,10 @@
+include/master-slave.inc
+[connection master]
+set @time_before_kill := (select CURRENT_TIMESTAMP);
+[Time before the query]
+[Connection ID of the slave I/O thread found]
+kill <connection_id>;
+set @time_after_kill := (select CURRENT_TIMESTAMP);
+[Time after the query]
+[Killing of the slave IO thread was successful]
+include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/r/rpl_stm_start_stop_slave.result b/mysql-test/suite/rpl/r/rpl_stm_start_stop_slave.result
index 57206873e2f..8bf903b0713 100644
--- a/mysql-test/suite/rpl/r/rpl_stm_start_stop_slave.result
+++ b/mysql-test/suite/rpl/r/rpl_stm_start_stop_slave.result
@@ -69,6 +69,16 @@ include/wait_for_slave_to_stop.inc
include/start_slave.inc
# Clean up
DROP TABLE t1;
+RESET MASTER;
+include/stop_slave.inc
+CHANGE MASTER TO master_log_pos=MASTER_POS;
+START SLAVE;
+include/wait_for_slave_param.inc [Last_IO_Errno]
+Last_IO_Errno = '1236'
+Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'Client requested master to start replication from impossible position; the start event position from 'master-bin.000001' at XXX, the last event was read from 'master-bin.000001' at XXX, the last byte read was read from 'master-bin.000001' at XXX.''
+include/stop_slave.inc
+RESET SLAVE;
+RESET MASTER;
SET @@global.innodb_flush_log_at_trx_commit= @old_innodb_flush_log_at_trx_commit;
call mtr.add_suppression("Slave SQL.*Request to stop slave SQL Thread received while applying a group that has non-transactional changes; waiting for completion of the group");
SET @@global.innodb_flush_log_at_trx_commit= @old_innodb_flush_log_at_trx_commit;
diff --git a/mysql-test/suite/rpl/t/rpl_cant_read_event_incident.test b/mysql-test/suite/rpl/t/rpl_cant_read_event_incident.test
index 7d05ce251f2..4825090d6cd 100644
--- a/mysql-test/suite/rpl/t/rpl_cant_read_event_incident.test
+++ b/mysql-test/suite/rpl/t/rpl_cant_read_event_incident.test
@@ -14,11 +14,6 @@
--source include/master-slave.inc
--source include/have_binlog_format_mixed.inc
-#
-# Bug#13050593 swallows `\' from Last_IO_Error
-# todo: uncomment the filter once the bug is fixed.
-#
---source include/not_windows.inc
--connection slave
# Make sure the slave is stopped while we are messing with master.
@@ -56,6 +51,7 @@ start slave;
--let $slave_param_value=1236
--source include/wait_for_slave_param.inc
+--let $slave_field_result_replace= / at [0-9]*/ at XXX/
--let $status_items= Last_IO_Errno, Last_IO_Error
--source include/show_slave_status.inc
diff --git a/mysql-test/suite/rpl/t/rpl_heartbeat_basic.test b/mysql-test/suite/rpl/t/rpl_heartbeat_basic.test
index b9a170c5bc1..78489449ab8 100644
--- a/mysql-test/suite/rpl/t/rpl_heartbeat_basic.test
+++ b/mysql-test/suite/rpl/t/rpl_heartbeat_basic.test
@@ -480,6 +480,12 @@ let $status_var_comparsion= >;
--connection master
#--replace_result $SLAVE_MYPORT SLAVE_PORT $slave_binlog SLAVE_BINLOG
#eval CHANGE MASTER TO MASTER_HOST='127.0.0.1', MASTER_PORT=$SLAVE_MYPORT, MASTER_USER='root', MASTER_CONNECT_RETRY=$connect_retry, MASTER_HEARTBEAT_PERIOD=1, MASTER_LOG_FILE='$slave_binlog';
+
+# BUG#12403008 RPL_HEARTBEAT_BASIC FAILS SPORADICALLY ON PUSHBUILD
+# MASTER_HEARTBEAT_PERIOD had the default value (slave_net_timeout/2)
+# so wait on "Heartbeat event received on master", that only waits for
+# 1 minute, sometimes timeout before heartbeat arrives.
+CHANGE MASTER TO MASTER_HEARTBEAT_PERIOD=1;
--source include/start_slave.inc
# Insert data on master and on slave and make sure that it replicated for both directions
diff --git a/mysql-test/suite/rpl/t/rpl_log_pos.test b/mysql-test/suite/rpl/t/rpl_log_pos.test
index 43f54bd3705..1270933ede1 100644
--- a/mysql-test/suite/rpl/t/rpl_log_pos.test
+++ b/mysql-test/suite/rpl/t/rpl_log_pos.test
@@ -30,12 +30,9 @@ let $wrong_log_pos= `SELECT $read_pos+2`;
eval change master to master_log_pos=$wrong_log_pos;
start slave;
let $slave_io_errno= 1236;
-#
-# Win and Unix path is printed differently: BUG#13055685. So
-# show_slave_io_error is made 0 until the bug fixes provide necessary
-# facilities
-#
-let $show_slave_io_error= 0;
+--let $show_slave_io_error= 1
+# Mask line numbers
+--let $slave_io_error_replace= / at [0-9]*/ at XXX/
source include/wait_for_slave_io_error.inc;
source include/stop_slave_sql.inc;
--enable_warnings
diff --git a/mysql-test/suite/rpl/t/rpl_manual_change_index_file.test b/mysql-test/suite/rpl/t/rpl_manual_change_index_file.test
index 9b648de8486..981cecb66ad 100644
--- a/mysql-test/suite/rpl/t/rpl_manual_change_index_file.test
+++ b/mysql-test/suite/rpl/t/rpl_manual_change_index_file.test
@@ -60,12 +60,9 @@ call mtr.add_suppression('Got fatal error 1236 from master when reading data fro
connection slave;
# 1236 = ER_MASTER_FATAL_ERROR_READING_BINLOG
--let $slave_io_errno= 1236
-#
-# Win and Unix path is printed differently: BUG#13055685. So
-# show_slave_io_error is made 0 until the bug fixes provide necessary
-# facilities
-#
---let $show_slave_io_error= 0
+--let $show_slave_io_error= 1
+# Mask line numbers
+--let $slave_io_error_replace= / at [0-9]*/ at XXX/
--source include/wait_for_slave_io_error.inc
connection master;
diff --git a/mysql-test/suite/rpl/t/rpl_packet.test b/mysql-test/suite/rpl/t/rpl_packet.test
index 2b8a1fd8310..4f296fed68e 100644
--- a/mysql-test/suite/rpl/t/rpl_packet.test
+++ b/mysql-test/suite/rpl/t/rpl_packet.test
@@ -125,12 +125,9 @@ connection slave;
# The slave I/O thread must stop after receiving
# 1236=ER_MASTER_FATAL_ERROR_READING_BINLOG error message from master.
--let $slave_io_errno= 1236
-#
-# Win and Unix path is printed differently: BUG#13055685. So
-# show_slave_io_error is made 0 until the bug fixes provide necessary
-# facilities
-#
---let $show_slave_io_error= 0
+
+# Mask line numbers
+--let $slave_io_error_replace= / at [0-9]*/ at XXX/
--source include/wait_for_slave_io_error.inc
# Remove the bad binlog and clear error status on slave.
diff --git a/mysql-test/suite/rpl/t/rpl_start_stop_slave.test b/mysql-test/suite/rpl/t/rpl_start_stop_slave.test
new file mode 100644
index 00000000000..69d39a066b1
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_start_stop_slave.test
@@ -0,0 +1,44 @@
+#
+#BUG#11752315 : STOP SLAVE UNABLE TO COMPLETE WHEN SLAVE THREAD IS TRYING
+# TO RECONNECT TO
+#
+# ==== Purpose ====
+#
+#Tests that the slave does not go to a sleep for a long duration after the
+#master is killed and we do a START_SLAVE and STOP_SLAVE.
+#
+# ==== Method ====
+#
+#This is a new functionality of having an interruptable sleep of the slave.
+#We find the thread id for the slave thread. On finding the thread ID of the
+#slave thread we kill the slave thread. A successful kill in less than 60 sec
+#should serve the purpose of checking the functionality.
+#
+
+--source include/have_log_bin.inc
+--source include/master-slave.inc
+
+connection slave;
+--let $connection_id=`SELECT id FROM information_schema.processlist where state LIKE 'Waiting for master to send event'`
+
+set @time_before_kill := (select CURRENT_TIMESTAMP);
+
+--echo [Time before the query]
+--echo [Connection ID of the slave I/O thread found]
+
+--replace_regex /kill [0-9]*/kill <connection_id>/
+--eval kill $connection_id
+
+set @time_after_kill := (select CURRENT_TIMESTAMP);
+
+--echo [Time after the query]
+
+if(`select TIMESTAMPDIFF(SECOND,@time_after_kill, @time_before_kill) > 60`)
+{
+--echo # assert : The difference between the timestamps 'time_after_kill' and 'time_before_kill' should be less than 60sec.
+--die
+}
+
+--echo [Killing of the slave IO thread was successful]
+# End of test
+--source include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_stm_start_stop_slave.test b/mysql-test/suite/rpl/t/rpl_stm_start_stop_slave.test
index ada080e9071..dfe2e49bb90 100644
--- a/mysql-test/suite/rpl/t/rpl_stm_start_stop_slave.test
+++ b/mysql-test/suite/rpl/t/rpl_stm_start_stop_slave.test
@@ -22,5 +22,5 @@ SET @@global.innodb_flush_log_at_trx_commit= @old_innodb_flush_log_at_trx_commit
call mtr.add_suppression("Slave SQL.*Request to stop slave SQL Thread received while applying a group that has non-transactional changes; waiting for completion of the group");
--connection master
SET @@global.innodb_flush_log_at_trx_commit= @old_innodb_flush_log_at_trx_commit;
-
+--let $rpl_only_running_threads= 1
--source include/rpl_end.inc