Bug #51600 rpl_slave_skip waits for slave to stop incorrectly
Submitted: 1 Mar 2010 10:45 Modified: 21 Jun 2010 1:00
Reporter: Andrei Elkin Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Tests Severity:S3 (Non-critical)
Version:5.1+ OS:Any
Assigned to: Andrei Elkin CPU Architecture:Any
Tags: tests failure, wait_for

[1 Mar 2010 10:45] Andrei Elkin
Description:
5.1-bt tree starting from #63 lines of the test contains

connection slave;
START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=106;
wait_for_slave_to_stop;

It must be solely the SQL thread that is supposed to stop.
And it does so. However, IO thread is caught by the wait macro to have NO status while it is connecting, to allow the test to pass through to the following line

SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;

which refuses to execute with

mysqltest: At line 38: query 'SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1' failed: 1198: This operation cannot be performed with a running slave; run STOP SLAVE first

How to repeat:
see PB2 failures or run 5.1-bt version of the test multiple times to get
the description error.

Suggested fix:
s/wait_for_slave_to_stop/wait_for_slave_io_to_stop/
[1 Mar 2010 10:51] Andrei Elkin
correction. Was meant wait for sql slave to stop in the suggest fix.
[1 Mar 2010 10:55] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/101832

3366 Andrei Elkin	2010-03-01
      Bug #51600  rpl_slave_skip waits for slave to stop incorrectly
      
      START SLAVE UNTIL MASTER ... specifies only SQL thread to stop.
      rpl_slave_skip erronously deployed waiting for stop of both threads.
      
      Corrected with deploying the correct macro.
[1 Mar 2010 12:34] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/101849

3366 Andrei Elkin	2010-03-01
      Bug #51600  rpl_slave_skip waits for slave to stop incorrectly
      
      START SLAVE UNTIL MASTER ... specifies only SQL thread to stop.
      rpl_slave_skip erronously deployed waiting for stop of both threads.
      
      Corrected with deploying the correct macro.
      Notice, earlier a similar bug@47749 was fixed in mysql-trunk.
     @ mysql-test/suite/rpl/t/rpl_slave_skip.test
        changing two waiting calls for offline of both threads into waiting for SQL to stop.
[2 Mar 2010 14:36] Bugs System
Pushed into 6.0.14-alpha (revid:alik@sun.com-20100302142746-u1gxdf5yk2bjrq3e) (version source revid:alik@sun.com-20100301190251-iema5x6db433m99z) (merge vers: 6.0.14-alpha) (pib:16)
[26 Mar 2010 8:23] Bugs System
Pushed into 5.5.4-m3 (revid:alik@sun.com-20100326080914-2pz8ns984e0spu03) (version source revid:alexey.kopytov@sun.com-20100307164059-cri8typa32cypq0l) (merge vers: 5.5.3-m2) (pib:16)
[26 Mar 2010 8:27] Bugs System
Pushed into mysql-next-mr (revid:alik@sun.com-20100326081116-m3v4l34yhr43mtsv) (version source revid:alik@sun.com-20100325072612-4sds00ix8ajo1e84) (pib:16)
[27 Mar 2010 16:21] Paul DuBois
Changes to test case. No changelog entry needed.
[6 Apr 2010 7:58] Bugs System
Pushed into 5.1.46 (revid:sergey.glukhov@sun.com-20100405111026-7kz1p8qlzglqgfmu) (version source revid:aelkin@mysql.com-20100301123315-ksrcheb43r5wrvdu) (merge vers: 5.1.45) (pib:16)
[6 Apr 2010 14:19] Paul DuBois
No changelog entry needed.
[17 Jun 2010 11:47] Bugs System
Pushed into 5.1.47-ndb-7.0.16 (revid:martin.skold@mysql.com-20100617114014-bva0dy24yyd67697) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)
[17 Jun 2010 12:25] Bugs System
Pushed into 5.1.47-ndb-6.2.19 (revid:martin.skold@mysql.com-20100617115448-idrbic6gbki37h1c) (version source revid:martin.skold@mysql.com-20100609211156-tsac5qhw951miwtt) (merge vers: 5.1.46-ndb-6.2.19) (pib:16)
[17 Jun 2010 13:12] Bugs System
Pushed into 5.1.47-ndb-6.3.35 (revid:martin.skold@mysql.com-20100617114611-61aqbb52j752y116) (version source revid:vasil.dimov@oracle.com-20100331130613-8ja7n0vh36a80457) (merge vers: 5.1.46) (pib:16)