Bug #31848 Test failure: Cluster has problems on insert with auto-increment
Submitted: 25 Oct 2007 15:20 Modified: 6 Nov 2007 0:08
Reporter: Joerg Bruehe
Status: Closed
Category:Server: Cluster Severity:S3 (Non-critical)
Version:5.0.44 (NDB) + x OS:Any (gcc 4.2.1, x86 (32))
Assigned to: Bugs System Target Version:

[25 Oct 2007 15:20] Joerg Bruehe
Description:
Found in the "mysql-5.0-ndb" tree
when checking the fix of bug#31761 (yes, error 879 is gone):

ndb_alter_table                [ fail ]

Errors are (from /MySQL/M50/ndb-5.0/mysql-test/var/log/mysqltest-time) :
mysqltest: At line 62: query 'insert into t1 values
(0,4,3,5,"PENDING",1,7),(NULL,4,3,5,"PENDING",1,7),(31,4,3,5,"PENDING",1,7),
(7,4,3,5,"PENDING",1,7), (NULL,4,3,5,"PENDING",1,7), (100,4,3,5,"PENDING",1,7),
(99,4,3,5,"PENDING",1,7), (8,4,3,5,"PENDING",1,7), (NULL,4,3,5,"PENDING",1,7)' failed:
1467: Failed to read auto-increment value from storage engine
(the last lines may be the most important ones)
Result from queries before failure can be found in r/ndb_alter_table.log

ndb_replace                    [ fail ]

Errors are (from /MySQL/M50/ndb-5.0/mysql-test/var/log/mysqltest-time) :
mysqltest: At line 57: query 'REPLACE INTO t2 (a,b,c,x,y,z,i) VALUES
(1,1,1,'a','a','a',1),(1,1,1,'b','b','b',2), (1,1,1,'c','c','c',3)' failed: 1467: Failed
to read auto-increment value from storage engine
(the last lines may be the most important ones)
Result from queries before failure can be found in r/ndb_replace.log

Latest changeset:
ChangeSet@1.2489, 2007-10-25 10:54:23+02:00, knielsen@loke.(none) +1 -0
  Merge loke.(none):/home/knielsen/devel/bug31810
  into  loke.(none):/home/knielsen/devel/mysql-5.0-ndb
  MERGE: 1.2486.1.1

Build was done using 'compile-pentium-max', this uses "-O3".

How to repeat:
Found by running the test suite.
[25 Oct 2007 17:41] Joerg Bruehe
I repeated this using "-O2" (same sources), and the bugs were gone.
[31 Oct 2007 10:27] Kristian Nielsen
I managed to repeat this on 32-bit Ubuntu feisty x86, by compiling gcc 4.2.1.
[1 Nov 2007 8:00] 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/36820

ChangeSet@1.2490, 2007-11-01 07:59:55+01:00, knielsen@ymer.(none) +1 -0
  Bug #31848: Test failure: Cluster has problems on insert with auto-increment
  
  Fix uninitialized variable causing failures for some interpreted update
  operations on gcc 4.2.1.
[1 Nov 2007 8:25] Kristian Nielsen
This was introduced with the fix for BUG#27437. So the bug would have first appeared in
5.0.42.

It only applies to 5.0, the 5.1+ code does not have the problem.

Symptoms would be randomly failing interpreted update operations (this includes auto
increments, which use interpreted updates internally).
[1 Nov 2007 8:35] Kristian Nielsen
Pushed to mysql-5.0-ndb (and null-merged to mysql-5.1-new-ndb).
[5 Nov 2007 14:53] Bugs System
Pushed into 6.0.4-alpha
[5 Nov 2007 14:56] Bugs System
Pushed into 5.1.23-rc
[5 Nov 2007 14:58] Bugs System
Pushed into 5.0.52
[6 Nov 2007 0:08] Jon Stephens
Thank you for your bug report. This issue has been committed to our source repository of
that product and will be incorporated into the next release.

If necessary, you can access the source repository and build the latest available
version, including the bug fix. More information about accessing the source trees is
available at

    http://dev.mysql.com/doc/en/installing-source.html

Documented in 5.0.52 changelog (5.0.52 only - per developer note above). Closed.
[8 Nov 2007 14:34] Jon Stephens
Fix also documented in 5.1.22-ndb-6.28 and 5.1.22-ndb-6.3.6 changelogs (per release notes
from Tomas).
[8 Nov 2007 15:03] Jon Stephens
Removed 5.1.22-ndb-6.2.8 and 5.1.22-ndb-6.3.6 changelog entries after KNielsen & Tomas
confirmed null merge to 5.1/CGE trees.