mirror of
https://github.com/MariaDB/server.git
synced 2026-05-03 13:45:34 +02:00
rpl_packet.test:
Updated test to use new include function wait_for_slave_running_off.inc: Created new include to resolve the timing issue recorded by Bug#30209 rpl_events.inc: The issue shown in Bug#30128 is that 'from er' shows up in a part of the test that it should not show up in. This event really is not created until later in the test, yet since the test runs row and then turns around and runs statement, I am guessing that the first run may not have cleaned up like it should, so I am adding a sync with master after the drop of table t1 to ensure that both master and slave are clean. mysql-test/suite/rpl/t/rpl_packet.test: Updated test to use new include function mysql-test/include/wait_for_slave_running_off.inc: Created new include to resolve the timing issue recorded by Bug#30209 mysql-test/include/rpl_events.inc: The issue shown in Bug#30128 is that 'from er' shows up in a part of the test that it should not show up in. This event really is not created until later in the test, yet since the test runs row and then turns around and runs statement, I am guessing that the first run may not have cleaned up like it should, so I am adding a sync with master after the drop of table t1 to ensure that both master and slave are clean.
This commit is contained in:
parent
fa85d64d5b
commit
5dfb186178
3 changed files with 38 additions and 0 deletions
|
|
@ -147,4 +147,6 @@ DROP EVENT test.slave_terminate;
|
|||
--echo "Cleanup"
|
||||
connection master;
|
||||
DROP TABLE t1;
|
||||
sync_slave_with_master;
|
||||
connection master;
|
||||
|
||||
|
|
|
|||
35
mysql-test/include/wait_for_slave_running_off.inc
Executable file
35
mysql-test/include/wait_for_slave_running_off.inc
Executable file
|
|
@ -0,0 +1,35 @@
|
|||
###################################################
|
||||
#Author: Jeb
|
||||
#Date: 2007-08-09
|
||||
#Purpose: This is to address timing issue recorded
|
||||
# in bug 30209. This function with wait
|
||||
# until "SHOW STATUS LIKE 'Slave_running'"
|
||||
# returns 'OFF'
|
||||
#Details:
|
||||
# 1) Fill in and setup variable
|
||||
# 2) loop through looking OFF
|
||||
# 3) If loops too long die.
|
||||
####################################################
|
||||
connection slave;
|
||||
let $row_number= 1;
|
||||
let $run= 1;
|
||||
let $counter= 300;
|
||||
|
||||
while ($run)
|
||||
{
|
||||
let $running_result= query_get_value(SHOW STATUS LIKE 'Slave_running', Value, $row_number);
|
||||
if (`SELECT '$running_result' = 'OFF'`){
|
||||
let $run= 0;
|
||||
}
|
||||
sleep 0.1;
|
||||
if (!$counter){
|
||||
--echo "Failed while waiting for slave to stop"
|
||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
||||
--replace_column 1 # 7 # 8 # 9 # 22 # 23 # 33 #
|
||||
query_vertical SHOW SLAVE STATUS;
|
||||
exit;
|
||||
}
|
||||
dec $counter;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -68,6 +68,7 @@ INSERT INTO `t1`(`f1`) VALUES ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
|
|||
# The slave I/O thread must stop after trying to read the above event
|
||||
connection slave;
|
||||
sleep 2;
|
||||
--source include/wait_for_slave_running_off.inc
|
||||
SHOW STATUS LIKE 'Slave_running';
|
||||
|
||||
# cleanup
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue