"rpl.rpl_start_stop_slave" fail sporadically on 5.5
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
MySQL Server |
Unknown
|
Unknown
|
||||
Percona Server moved to https://jira.percona.com/projects/PS | Status tracked in 5.7 | |||||
5.5 |
Fix Released
|
Low
|
Yura Sorokin | |||
5.6 |
Invalid
|
Low
|
Yura Sorokin | |||
5.7 |
Invalid
|
Low
|
Yura Sorokin |
Bug Description
Tested on CentOS 7 x64 with Percona Server 5.5.48
*******
rpl.rpl_
Test ended at 2016-05-02 09:10:27
CURRENT_TEST: rpl.rpl_
mysqltest: At line 30: query 'kill $connection_id' failed: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
The result from queries just before the failure was:
include/
[connection master]
set @time_before_kill := (select CURRENT_TIMESTAMP);
[Time before the query]
[Connection ID of the slave I/O thread found]
*******
The probability of a failure is much higher when release binaries are used.
To reproduce, run the following
./mtr rpl.rpl_
The problem seems to be in id=`SELECT id FROM information_ schema. processlist where state LIKE 'Waiting for master to send event'`
--let $connection_
At this point slave connection may still be in 'Queueing master event to the relay log' state and therefore $connection_id can be empty.
To fix, we need to make sure that there is at least 1 connection with status 'Waiting for master to send event' before reading its id. .inc" can be used for this.
"wait_condition
******* ******* ******* ******* ******* ******* ******* ******* ******* ******* ******* ******* ******* ******* ******* ******* ******* * schema. processlist WHERE state LIKE 'Waiting for master to send event'; wait_condition. inc id=`SELECT id FROM information_ schema. processlist where state LIKE 'Waiting for master to send event'` ******* ******* ******* ******* ******* ******* ******* ******* ******* ******* ******* ******* ******* ******* ******* ******* *
let $wait_condition= SELECT COUNT(*) = 1 FROM information_
--source include/
--let $connection_
*******