Commit 09668c01 authored by unknown's avatar unknown

Bug #46828 rpl_get_master_version_and_clock fails on PB-2

The 'rpl_get_master_version_and_clock' test verifies if the slave I/O 
thread tries to reconnect to master when it tries to get the values of 
the UNIX_TIMESTAMP, SERVER_ID from master under network disconnection. 
So the master server is restarted for making the transient network 
disconnection. Restarting master server can bring two problems as following:

1. The time out error is encountered sporadically. The slave I/O thread tries 
   to reconnect master ten times, which is set in my.cnf. So in the test 
   framework sporadically the slave I/O thread really stoped when it can't 
   reconnect to master in the ten times successfully before the master starts, 
   then the time out error will be encountered while waiting for the slave to 
   start.

2. These warnings and errors are produced in server log file when 
   the slave I/O thread tries to get the values of the UNIX_TIMESTAMP, 
   SERVER_ID from master under the transient network disconnection.

To fix problem 1, increase the master retry count to sixty times, 
so that the slave I/O thread has enough time to reconnect master 
successfully.
To fix problem 2, suppress these warnings and errors by mtr suppression, 
because they are expected.


mysql-test/suite/rpl/t/rpl_get_master_version_and_clock-slave.opt:
  Added the *.opt file for increasing master retry count to 
  sixty times.
mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test:
  Added mtr suppression for suppressing warnings and errors 
  in server log file.
parent f130de4f
......@@ -4,8 +4,10 @@ reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
call mtr.add_suppression("Slave I/O: .* failed with error: Lost connection to MySQL server at 'reading initial communication packet'");
call mtr.add_suppression("Get master clock failed with error: ");
call mtr.add_suppression("Get master SERVER_ID failed with error: ");
call mtr.add_suppression("Slave I/O: Master command COM_REGISTER_SLAVE failed: failed registering on master, reconnecting to try again");
call mtr.add_suppression("Fatal error: The slave I/O thread stops because master and slave have equal MySQL server ids; .*");
SELECT IS_FREE_LOCK("debug_lock.before_get_UNIX_TIMESTAMP");
IS_FREE_LOCK("debug_lock.before_get_UNIX_TIMESTAMP")
1
......
......@@ -16,8 +16,10 @@
source include/master-slave.inc;
source include/have_debug.inc;
call mtr.add_suppression("Slave I/O: .* failed with error: Lost connection to MySQL server at 'reading initial communication packet'");
call mtr.add_suppression("Get master clock failed with error: ");
call mtr.add_suppression("Get master SERVER_ID failed with error: ");
call mtr.add_suppression("Slave I/O: Master command COM_REGISTER_SLAVE failed: failed registering on master, reconnecting to try again");
call mtr.add_suppression("Fatal error: The slave I/O thread stops because master and slave have equal MySQL server ids; .*");
#Test case 1: Try to get the value of the UNIX_TIMESTAMP from master under network disconnection
connection slave;
let $debug_saved= `select @@global.debug`;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment