Bug #38540 rpl_server_id2 uses show slave status unnecessarily
Submitted: 4 Aug 2008 14:57 Modified: 30 Jan 2009 17:20
Reporter: Sven Sandberg Email Updates:
Status: Closed Impact on me:
None 
Category:Tests: Replication Severity:S2 (Serious)
Version:5.1 OS:Any
Assigned to: Andrei Elkin
Tags: 51rpl, nondeterministic, rpl_server_id2, sporadic, test failure
Triage: D3 (Medium)

[4 Aug 2008 14:57] Sven Sandberg
Description:
rpl_server_id2 has two flaws:

(1) the test sets up replication from the slave to itself. Then it executes the following lines, which are nondeterministic:

start slave;
insert into t1 values (1);
save_master_pos;
sync_with_master;

It is nondeterministic because save_master_pos may execute before or after the insert has been replicated.

(2) it calls show slave status. We should never do that. Instead, we should use query_get_value and extract only the relevant fields.

How to repeat:
read the code
[5 Aug 2008 9:14] Sven Sandberg
Actually, the first flaw is not a problem. The slave runs with --disable-log-slave-updates, which prevents queries executed by the slave SQL thread from being logged on the slave.
[5 Sep 2008 13:09] 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/53342

2671 Magnus Svensson	2008-09-05
      Bug #38540 rpl_server_id2 uses show slave status unnecessarily
[7 Sep 2008 1:05] 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/53438

2688 He Zhenxing	2008-09-07 [merge]
      Auto merge
[10 Dec 2008 13:44] 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/61212

2705 Andrei Elkin	2008-12-10
      Bug#38934 slave slave until does not work with --replicate-same-server-id
      Bug#38540 rpl_server_id2 uses show slave status unnecessarily
            
      Slave did not perform any event recorded into the relay log from some
      different master when it was started with --replicate-same-server-id.
      The reason appeared to be a consequence of BUG#38734 which stopped the
      sql thread at its startup time.
      
      The real fixes for the current bug are in the patch for BUG#38734.
      This changeset carries only a regression test for the bugs. 
      Bug#38540 gets fixed too by means of eliminating an extra show slave status.
[19 Dec 2008 18:59] 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/62159

2705 Andrei Elkin	2008-12-19
      Bug#38934 slave slave until does not work with --replicate-same-server-id
      Bug#38540 rpl_server_id2 uses show slave status unnecessarily
                  
      Slave did not perform any event recorded into the relay log from some
      different master when it was started with --replicate-same-server-id.
      The reason appeared to be a consequence of BUG#38734 which stopped the
      sql thread at its startup time.
            
      The real fixes for the current bug are in the patch for BUG#38734.
      This changeset carries only a regression test for the bugs.  Bug#38540
      gets fixed too by means of eliminating an extra show slave status.
[19 Dec 2008 20:13] 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/62164

2707 Andrei Elkin	2008-12-19
      Bug#38540 rpl_server_id2 uses show slave status unnecessarily
      
      a minor improvement to the test to ease merging.
[19 Dec 2008 20:22] Andrei Elkin
Pushed to rpl with Bug #38934 fixes.
[7 Jan 2009 14:26] 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/62605

2709 He Zhenxing	2009-01-07 [merge]
      Auto merge
[30 Jan 2009 13:26] Bugs System
Pushed into 6.0.10-alpha (revid:luis.soares@sun.com-20090129165607-wiskabxm948yx463) (version source revid:luis.soares@sun.com-20090129163120-e2ntks4wgpqde6zt) (merge vers: 6.0.10-alpha) (pib:6)
[30 Jan 2009 15:07] Bugs System
Pushed into 5.1.32 (revid:luis.soares@sun.com-20090129165946-d6jnnfqfokuzr09y) (version source revid:zhenxing.he@sun.com-20090107142538-aeoxq3lddk0g4uff) (merge vers: 5.1.31) (pib:6)
[30 Jan 2009 17:20] Paul Dubois
Test case changes. No changelog entry needed.
[17 Feb 2009 14:53] Bugs System
Pushed into 5.1.32-ndb-6.3.23 (revid:tomas.ulin@sun.com-20090217131017-6u8qz1edkjfiobef) (version source revid:tomas.ulin@sun.com-20090203133556-9rclp06ol19bmzs4) (merge vers: 5.1.32-ndb-6.3.22) (pib:6)
[17 Feb 2009 16:40] Bugs System
Pushed into 5.1.32-ndb-6.4.3 (revid:tomas.ulin@sun.com-20090217134419-5ha6xg4dpedrbmau) (version source revid:tomas.ulin@sun.com-20090203133556-9rclp06ol19bmzs4) (merge vers: 5.1.32-ndb-6.3.22) (pib:6)
[17 Feb 2009 18:17] Bugs System
Pushed into 5.1.32-ndb-6.2.17 (revid:tomas.ulin@sun.com-20090217134216-5699eq74ws4oxa0j) (version source revid:tomas.ulin@sun.com-20090201210519-vehobc4sy3g9s38e) (merge vers: 5.1.32-ndb-6.2.17) (pib:6)