Bug #55277 Failing assertion: auto_inc > 0
Submitted: 15 Jul 2010 7:52 Modified: 1 Dec 2010 0:41
Reporter: Shane Bester (Platinum Quality Contributor) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S1 (Critical)
Version:>=5.1.31,5.1.48, 5.1.49 OS:Any
Assigned to: Sunny Bains CPU Architecture:Any
Tags: regression

[15 Jul 2010 7:52] Shane Bester
Description:
Version: '5.1.48-enterprise-gpl-advanced'  socket: ''  port: 3306  MySQL Enterprise Server - Advanced Edition (GPL)
100715  9:44:04  InnoDB: Assertion failure in thread 5008 in file .\handler\ha_innodb.cc line 7946
InnoDB: Failing assertion: auto_inc > 0

 mysqld.exe!ha_innobase::innobase_peek_autoinc()[ha_innodb.cc:7946]
 mysqld.exe!ha_innobase::info()[ha_innodb.cc:6557]
 mysqld.exe!ha_innobase::update_create_info()[ha_innodb.cc:5515]
 mysqld.exe!store_create_info()[sql_show.cc:1349]
 mysqld.exe!mysqld_show_create()[sql_show.cc:743]
 mysqld.exe!mysql_execute_command()[sql_parse.cc:2987]
 mysqld.exe!mysql_parse()[sql_parse.cc:5998]
 mysqld.exe!dispatch_command()[sql_parse.cc:1243]
 mysqld.exe!do_command()[sql_parse.cc:882]
 mysqld.exe!handle_one_connection()[sql_connect.cc:1134]
 mysqld.exe!pthread_start()[my_winthread.c:85]
 mysqld.exe!_callthreadstart()[thread.c:295]
 mysqld.exe!_threadstart()[thread.c:275]
 kernel32.dll!BaseThreadStart()

How to repeat:
drop table if exists t1;
create table t1(a bigint unsigned not null auto_increment primary key)engine=innodb;
insert into t1 values (null);
insert into t1 values (18446744073709551615);

#restart server

show create table t1;
[15 Jul 2010 7:59] MySQL Verification Team
related: bug #39828
[15 Jul 2010 8:02] Sveta Smirnova
Not repeatable on Linux and Mac for me.
[15 Jul 2010 8:02] Valeriy Kravchuk
Thank you for the bug report. Verified on Windows XP also:

Version: '5.1.48-community'  socket: ''  port: 3310  MySQL Community Server (GPL
)
100715 10:59:28  InnoDB: Assertion failure in thread 784 in file .\handler\ha_in
nodb.cc line 7946
InnoDB: Failing assertion: auto_inc > 0

Stack trace is:

 	mysqld.exe!ha_innobase::innobase_peek_autoinc()  Line 7946 + 0x3a bytes	C++
 	mysqld.exe!ha_innobase::info(unsigned int flag=64)  Line 6557 + 0x7 bytes	C++
 	mysqld.exe!ha_innobase::update_create_info(st_ha_create_information * create_info=0x0553d898)  Line 5515	C++
 	mysqld.exe!store_create_info(THD * thd=0x0231cf58, TABLE_LIST * table_list=0x0235e068, String * packet=0x0553dfd0, st_ha_create_information * create_info_arg=0x00000000, bool show_database=false)  Line 1351	C++
 	mysqld.exe!mysqld_show_create(THD * thd=0x0231cf58, TABLE_LIST * table_list=0x0235e068)  Line 743 + 0x23 bytes	C++
 	mysqld.exe!mysql_execute_command(THD * thd=0x0231cf58)  Line 2986 + 0x9 bytes	C++
 	ntdll.dll!7c9100b8() 	
...
[15 Jul 2010 8:17] Sveta Smirnova
If start mysqld outside of MTR test crashes on Linux.
[15 Jul 2010 9:03] MySQL Verification Team
bug is introduced in 5.1.31
[20 Sep 2010 19:15] MySQL Verification Team
bug #55993 is a duplicate of this
[28 Sep 2010 8:46] Bugs System
Pushed into mysql-5.1 5.1.52 (revid:sunanda.menon@sun.com-20100928083322-wangbv97uobu7g66) (version source revid:sunanda.menon@sun.com-20100928083322-wangbv97uobu7g66) (merge vers: 5.1.52) (pib:21)
[14 Oct 2010 8:35] Bugs System
Pushed into mysql-5.1-telco-7.0 5.1.51-ndb-7.0.20 (revid:martin.skold@mysql.com-20101014082627-jrmy9xbfbtrebw3c) (version source revid:martin.skold@mysql.com-20101014082627-jrmy9xbfbtrebw3c) (merge vers: 5.1.51-ndb-7.0.20) (pib:21)
[14 Oct 2010 8:50] Bugs System
Pushed into mysql-5.1-telco-6.3 5.1.51-ndb-6.3.39 (revid:martin.skold@mysql.com-20101014083757-5qo48b86d69zjvzj) (version source revid:martin.skold@mysql.com-20101014083757-5qo48b86d69zjvzj) (merge vers: 5.1.51-ndb-6.3.39) (pib:21)
[14 Oct 2010 9:05] Bugs System
Pushed into mysql-5.1-telco-6.2 5.1.51-ndb-6.2.19 (revid:martin.skold@mysql.com-20101014084420-y54ecj85j5we27oa) (version source revid:martin.skold@mysql.com-20101014084420-y54ecj85j5we27oa) (merge vers: 5.1.51-ndb-6.2.19) (pib:21)
[26 Oct 2010 23:34] John Russell
Added to change log (the internal change log until the private flag is lifted):

For an InnoDB table with an auto-increment column, the server could
crash if the first statement that references the table after a server
restart is a SHOW CREATE TABLE statement.
[9 Nov 2010 19:48] Bugs System
Pushed into mysql-5.5 5.5.7-rc (revid:sunanda.menon@sun.com-20101109182959-otkxq8vo2dcd13la) (version source revid:marko.makela@oracle.com-20100824081003-v4ecy0tga99cpxw2) (merge vers: 5.1.50) (pib:21)
[13 Nov 2010 16:26] Bugs System
Pushed into mysql-trunk 5.6.99-m5 (revid:alexander.nozdrin@oracle.com-20101113155825-czmva9kg4n31anmu) (version source revid:marko.makela@oracle.com-20100824081003-v4ecy0tga99cpxw2) (merge vers: 5.1.50) (pib:21)
[13 Nov 2010 16:40] Bugs System
Pushed into mysql-next-mr (revid:alexander.nozdrin@oracle.com-20101113160336-atmtmfb3mzm4pz4i) (version source revid:marko.makela@oracle.com-20100824081003-v4ecy0tga99cpxw2) (pib:21)