Bug #38821 | Assert table->auto_increment_field_not_null failed in open_table() | ||
---|---|---|---|
Submitted: | 15 Aug 2008 12:00 | Modified: | 17 Oct 2008 18:15 |
Reporter: | Philip Stoev | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server | Severity: | S1 (Critical) |
Version: | 5.1-bzr/5.0/6.0 | OS: | Any |
Assigned to: | Ramil Kalimullin | CPU Architecture: | Any |
Tags: | regression |
[15 Aug 2008 12:00]
Philip Stoev
[15 Aug 2008 12:44]
Philip Stoev
The only queries that are needed are three CREATE IF NOT EXISTS ... SELECT statements using AUTO_INCREMENT: CREATE TABLE t1 ( pk INTEGER AUTO_INCREMENT , int_nokey INTEGER NOT NULL, int_key INTEGER NOT NULL, PRIMARY KEY (pk), KEY (int_key) ); INSERT IGNORE INTO t1 ( int_key, int_nokey ) VALUES ( '5', '8' ); CREATE TABLE IF NOT EXISTS t2 ( `pk` INTEGER NOT NULL AUTO_INCREMENT, PRIMARY KEY ( `pk` ) ) SELECT `pk` FROM t1; CREATE TABLE IF NOT EXISTS t2 ( `pk` INTEGER NOT NULL AUTO_INCREMENT, PRIMARY KEY ( `pk` ) ) SELECT `pk` FROM t1; CREATE TABLE IF NOT EXISTS t2 ( `pk` INTEGER NOT NULL AUTO_INCREMENT, PRIMARY KEY ( `pk` ) ) SELECT `pk` FROM t1;
[15 Aug 2008 13:05]
MySQL Verification Team
Thank you for the bug report. Repeatable on bzr 5.0/5.1/6.0. Not repeatable on 5.0.22 debug released version. terribly wrong... 009B9434 mysqld.exe!_NMSG_WRITE()[crt0msg.c:195] 009A79BA mysqld.exe!abort()[abort.c:44] 009A5122 mysqld.exe!_assert()[assert.c:306] 00609B1B mysqld.exe!open_table()[sql_base.cc:2964] 0060CABF mysqld.exe!open_tables()[sql_base.cc:4515] 0060DB98 mysqld.exe!open_and_lock_tables_derived()[sql_base.cc:4915] 005D8FB2 mysqld.exe!open_and_lock_tables()[mysql_priv.h:1531] 0066C707 mysqld.exe!mysql_execute_command()[sql_parse.cc:2452] 00675041 mysqld.exe!mysql_parse()[sql_parse.cc:5656] 00669EDE mysqld.exe!dispatch_command()[sql_parse.cc:1137] 006695C7 mysqld.exe!do_command()[sql_parse.cc:794] 00778B64 mysqld.exe!handle_one_connection()[sql_connect.cc:1115] 0083E4B6 mysqld.exe!pthread_start()[my_winthread.c:85] 009AD567 mysqld.exe!_threadstart()[thread.c:196] 7C80B713 kernel32.dll!GetModuleFileNameA() Trying to get some variables. Some pointers may be invalid and cause the dump to abort... thd->query at 01EEE730=CREATE TABLE IF NOT EXISTS t2 ( `pk` INTEGER NOT NULL AUTO_INCREMENT, PRIMARY KEY ( `pk` ) ) SELECT `pk` FROM t1 thd->thread_id=1 thd->killed=NOT_KILLED
[26 Aug 2008 11:46]
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/52548 2721 Ramil Kalimullin 2008-08-26 Fix for bug#38821: Assert table->auto_increment_field_not_null failed in open_table() Problem: repeating "CREATE... ( AUTOINCREMENT) ... SELECT" may lead to an assertion failure. Fix: reset table->auto_increment_field_not_null after each record writing.
[3 Sep 2008 10:17]
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/53147 2681 Ramil Kalimullin 2008-09-03 Fix for bug#38821: Assert table->auto_increment_field_not_null failed in open_table() Problem: repeating "CREATE... ( AUTOINCREMENT) ... SELECT" may lead to an assertion failure. Fix: reset table->auto_increment_field_not_null after each record writing.
[15 Sep 2008 8:11]
Bugs System
Pushed into 5.0.70 (revid:ramil@mysql.com-20080903101719-64hgxtnfm157j1n6) (version source revid:kgeorge@mysql.com-20080910094058-fygie2nur8py7y8j) (pib:3)
[15 Sep 2008 8:31]
Bugs System
Pushed into 5.1.29 (revid:ramil@mysql.com-20080903101719-64hgxtnfm157j1n6) (version source revid:kgeorge@mysql.com-20080910094421-1i1kxv3n1bxskiqa) (pib:3)
[16 Sep 2008 14:24]
Paul DuBois
Noted in 5.0.70, 5.1.29 changelogs. Repeated CREATE TABLE ... SELECT statements, where the created table contained an AUTO_INCREMENT column, could lead to an assertion failure. Setting to NDI pending push into 6.0.x
[1 Oct 2008 16:00]
Bugs System
Pushed into 5.1.29 (revid:ramil@mysql.com-20080903101719-64hgxtnfm157j1n6) (version source revid:kgeorge@mysql.com-20080910094421-1i1kxv3n1bxskiqa) (pib:4)
[1 Oct 2008 17:16]
Paul DuBois
Setting report to NDI pending push into 6.0.x.
[17 Oct 2008 16:45]
Bugs System
Pushed into 6.0.8-alpha (revid:ramil@mysql.com-20080903101719-64hgxtnfm157j1n6) (version source revid:kpettersson@mysql.com-20080911114255-81pt7q1uvl1fkojq) (pib:5)
[17 Oct 2008 18:15]
Paul DuBois
Noted in 6.0.8 changelog.
[28 Oct 2008 21:05]
Bugs System
Pushed into 5.1.29-ndb-6.2.17 (revid:ramil@mysql.com-20080903101719-64hgxtnfm157j1n6) (version source revid:tomas.ulin@sun.com-20081028140209-u4emkk1xphi5tkfb) (pib:5)
[28 Oct 2008 22:23]
Bugs System
Pushed into 5.1.29-ndb-6.3.19 (revid:ramil@mysql.com-20080903101719-64hgxtnfm157j1n6) (version source revid:tomas.ulin@sun.com-20081028194045-0353yg8cvd2c7dd1) (pib:5)
[1 Nov 2008 9:49]
Bugs System
Pushed into 5.1.29-ndb-6.4.0 (revid:ramil@mysql.com-20080903101719-64hgxtnfm157j1n6) (version source revid:jonas@mysql.com-20081101082305-qx5a1bj0z7i8ueys) (pib:5)