Bug #37373 rpl_ndb_transaction fails sporadically in pb on sol10-amd64-a and sol10-sparc-a
Submitted: 12 Jun 2008 16:02 Modified: 30 Jan 2009 17:11
Reporter: Sven Sandberg Email Updates:
Status: Closed Impact on me:
None 
Category:Tests: Replication Severity:S7 (Test Cases)
Version:5.1,6.0 OS:Any
Assigned to: Sven Sandberg CPU Architecture:Any
Tags: 51rpl, pushbuild, rpl_ndb_transaction, sporadic, test failure

[12 Jun 2008 16:02] Sven Sandberg
Description:
rpl_ndb_transaction fails sporadically in pushbuild with the following result diff:

rpl_ndb.rpl_ndb_transaction    [ fail ]

--- /export/home/pushbuild/pb/bzr_mysql-6.0-wtf/1/mysql-6.0.6-alpha-pb1/mysql-test/suite/rpl_ndb/r/rpl_ndb_transaction.result	Sat Jun  7 01:09:31 2008
+++ /export/home/pushbuild/pb/bzr_mysql-6.0-wtf/1/mysql-6.0.6-alpha-pb1/mysql-test/suite/rpl_ndb/r/rpl_ndb_transaction.reject	Sat Jun  7 09:41:09 2008
@@ -105,6 +105,7 @@
 
 SELECT * FROM tinnodb ORDER BY a;
 a
+1
 --- on master ---
 DROP TABLE tmyisam, tinnodb, tndb;
 DROP TABLE tmyisam, tinnodb, tndb;

mysqltest: Result content mismatch

Stopping All Servers

How to repeat:
See https://intranet.mysql.com/secure/pushbuild/xref.pl?testname=rpl_ndb.rpl_ndb_transaction
[17 Jun 2008 13:28] Sven Sandberg
==== Problem ====

The test wants to verify correct behavior of slave when master crashes just before writing an xid event. I.e., master writes:

  begin
  modify_table
  xid

except it crashes just before writing xid. To ensure that modify_table replicated to slave, we don't crash the server; instead, we just don't write xid to the binlog. On the slave, we verify that modify_table does not get executed. (It will be rolled back on master, hence should not be executed on slave.)

However, the test has two parts. This is the second part. The first part modified an ndb table. Modifying ndb tables can cause ndb system table updates to be written to the binlog some time after the ndb table is committed. Thus, the following will be written to the binlog:

  begin
  modify_table
  begin
  modify_ndb_table
  commit

Hence, modify_table will be executed by the slave, since there is an implicit commit in begin. This causes the slave to have too many rows.

==== Fix ====

I'll fix it simply by breaking the test into two. The first part, involving ndb, will remain in rpl_ndb_transaction. The second part, which does not need ndb, will be moved to the new file rpl_bug26395.test
[17 Jun 2008 13:57] 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/48001

2662 Sven Sandberg	2008-06-17
      BUG#37373: rpl_ndb_transaction fails sporadically in pb on sol10-amd64-a and sol10-sparc-a
      Problem: rpl_ndb_transaction fails because it assumes nothing
      is written to the binlog at a certain point. However, ndb may
      write updates to ndb system tables to the binlog at a
      nondeterministic time point after an ndb table update has
      been committed.
      Fix: break the test into two. rpl_ndb_transaction still does
      the ndb updates needed by the first half of the test. The new
      test case rpl_bug26395 includes the part that assumes nothing
      more will be written to the binlog.
      Also improved test cases a bit.
[26 Jun 2008 22: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/48593

2618 Sven Sandberg	2008-06-24
      BUG#37373: rpl_ndb_transaction fails sporadically in pb on sol10-amd64-a and sol10-sparc-a
      Problem: rpl_ndb_transaction fails because it assumes nothing
      is written to the binlog at a certain point. However, ndb may
      write updates to ndb system tables to the binlog at a
      nondeterministic time point after an ndb table update has
      been committed.
      Fix: break the test into two. rpl_ndb_transaction still does
      the ndb updates needed by the first half of the test. The new
      test case rpl_bug26395 includes the part that assumes nothing
      more will be written to the binlog.
      Also improved test cases a bit.
[28 Jun 2008 14:51] 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/48710

2618 Sven Sandberg	2008-06-28
      BUG#37373: rpl_ndb_transaction fails sporadically in pb on sol10-amd64-a and sol10-sparc-a
      Problem: rpl_ndb_transaction fails because it assumes nothing
      is written to the binlog at a certain point. However, ndb may
      binlog updates in ndb system tables at a nondeterministic
      time point after an ndb table update has been committed.
      Fix: break the test into two. rpl_ndb_transaction still does
      the ndb updates needed by the first half of the test. The new
      test case rpl_bug26395 includes the part that assumes nothing
      more will be written to the binlog.
[3 Jul 2008 9:25] 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/48950

2618 Sven Sandberg	2008-07-03
      BUG#37373: rpl_ndb_transaction fails sporadically in pb on sol10-amd64-a and sol10-sparc-a
      Problem: rpl_ndb_transaction fails because it assumes nothing
      is written to the binlog at a certain point. However, ndb may
      binlog updates in ndb system tables at a nondeterministic
      time point after an ndb table update has been committed.
      Fix: break the test into two. rpl_ndb_transaction still does
      the ndb updates needed by the first half of the test. The new
      test case rpl_bug26395 includes the part that assumes nothing
      more will be written to the binlog.
[3 Jul 2008 18:07] 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/48977

2618 Sven Sandberg	2008-07-03
      BUG#37373: rpl_ndb_transaction fails sporadically in pb on sol10-amd64-a and sol10-sparc-a
      Problem: rpl_ndb_transaction fails because it assumes nothing
      is written to the binlog at a certain point. However, ndb may
      binlog updates in ndb system tables at a nondeterministic
      time point after an ndb table update has been committed.
      Fix: break the test into two. rpl_ndb_transaction still does
      the ndb updates needed by the first half of the test. The new
      test case rpl_bug26395 includes the part that assumes nothing
      more will be written to the binlog.
[3 Jul 2008 18: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/48978

2618 Sven Sandberg	2008-07-03
      BUG#37373: rpl_ndb_transaction fails sporadically in pb on sol10-amd64-a and sol10-sparc-a
      Problem: rpl_ndb_transaction fails because it assumes nothing
      is written to the binlog at a certain point. However, ndb may
      binlog updates in ndb system tables at a nondeterministic
      time point after an ndb table update has been committed.
      Fix: break the test into two. rpl_ndb_transaction still does
      the ndb updates needed by the first half of the test. The new
      test case rpl_bug26395 includes the part that assumes nothing
      more will be written to the binlog.
[7 Jul 2008 10:01] 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/49071

2618 Sven Sandberg	2008-07-06
      BUG#37373: rpl_ndb_transaction fails sporadically in pb on sol10-amd64-a and sol10-sparc-a
      Problem: rpl_ndb_transaction fails because it assumes nothing
      is written to the binlog at a certain point. However, ndb may
      binlog updates in ndb system tables at a nondeterministic
      time point after an ndb table update has been committed.
      Fix: break the test into two. rpl_ndb_transaction still does
      the ndb updates needed by the first half of the test. The new
      test case rpl_bug26395 includes the part that assumes nothing
      more will be written to the binlog.
[7 Jul 2008 16:21] 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/49114

2619 Sven Sandberg	2008-07-07 [merge]
      merged fix for bug#37373 into 5.1-rpl
[14 Jul 2008 12:32] Sven Sandberg
pushed to 5.1-rpl
[30 Jan 2009 13:32] 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:11] Bugs System
Pushed into 5.1.32 (revid:luis.soares@sun.com-20090129165946-d6jnnfqfokuzr09y) (version source revid:sven@mysql.com-20080707162404-9nb0mwfd468f7ujw) (merge vers: 5.1.28) (pib:6)
[30 Jan 2009 17:11] Paul DuBois
Test case changes. No changelog entry needed.
[17 Feb 2009 15:01] 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:48] 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:24] 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)