Bug #19668 No Auto incrememnt on SHOW CREATE TABLE
Submitted: 10 May 2006 9:00 Modified: 10 May 2006 10:24
Reporter: Khalid Hanif Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0.18 OS:Linux (Fedora Core 4)
Assigned to: Assigned Account CPU Architecture:Any

[10 May 2006 9:00] Khalid Hanif
Description:
When exporting a table via SHOW CREATE TABLE, the auto increment property on the related column is left off when SQL mode is set to MYSQL40

version 5.0.18
version comment Source distribution
version compile machine i686
version compile os pc-linux-gnu

[root@server ~]# uname -a
Linux hostname.com 2.6.16-1.2096_FC4 #1 Wed Apr 19 15:27:46 EDT 2006 i686 athlon i386 GNU/Linux

How to repeat:
mysql> show create table domains;
CREATE TABLE `domains` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `wordID` int(10) unsigned NOT NULL,
  `domain` varchar(66) NOT NULL,
  `status` tinyint(4) NOT NULL,
  `date` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1

mysql> set sql_mode='MYSQL40';

mysql> show create table domains;
CREATE TABLE `domains` (
  `id` int(10) unsigned NOT NULL,
  `wordID` int(10) unsigned NOT NULL,
  `domain` varchar(66) NOT NULL,
  `status` tinyint(4) NOT NULL,
  `date` timestamp NOT NULL,
  PRIMARY KEY  (`id`)
) TYPE=MyISAM
[10 May 2006 10:24] Hartmut Holzgraefe
Duplicate of bug #19025