Bug #33662 Starting auto_increment value lost when dumping Falcon table definition
Submitted: 3 Jan 2008 17:11 Modified: 16 Mar 2008 11:21
Reporter: Philip Stoev Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Falcon storage engine Severity:S3 (Non-critical)
Version:6.0.4 OS:Any
Assigned to: Vladislav Vaintroub CPU Architecture:Any

[3 Jan 2008 17:11] Philip Stoev
Description:
If the CREATE TABLE of a Falcon table contained an AUTO_INCREMENT = 1234 parameter, this parameter will be honored on future inserts, however will not be displayed in SHOW CREATE TABLE and it will not appear in mysqldump output.

Innodb is not affected.

How to repeat:
create table t2 (f1 integer not null auto_increment primary key) auto_increment = 10, engine=falcon;

mysql> show create table t2\G
*************************** 1. row ***************************
       Table: t2
Create Table: CREATE TABLE `t2` (
  `f1` int(11) NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`f1`)
) ENGINE=Falcon DEFAULT CHARSET=latin1
1 row in set (0.00 sec)

contrast with Innodb:

mysql> show create table t1\G
*************************** 1. row ***************************
       Table: t1
Create Table: CREATE TABLE `t1` (
  `f1` int(11) NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`f1`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=latin1
1 row in set (0.00 sec)

Suggested fix:
We should strive to make SHOW CREATE TABLE as complete as possible.
[4 Jan 2008 8:03] Valeriy Kravchuk
Thank you for a bug report. Verified just as described.
[13 Jan 2008 23:24] 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/40975

ChangeSet@1.2776, 2008-01-14 00:24:01+01:00, vvaintroub@vaio. +4 -0
  Bug#33662 - Autoincrement value is not shown in "show create table"
  Fixed by implementing update_create_info() and returning autoincrement 
  value in correctponding filed of HA_CREATE_INFO structure. 
  The implementation is indentical to that of other engines
  (innodb, myisam, heap)
[21 Jan 2008 20:28] 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/41089

ChangeSet@1.2776, 2008-01-21 21:27:23+01:00, vvaintroub@vaio. +4 -0
  Bug#33662 - Autoincrement value is not shown in "show create table"
  Fixed by implementing update_create_info() and returning autoincrement 
  value in the corresponding field in HA_CREATE_INFO structure. 
  The implementation here is identical to that of other engines
  (innodb, myisam, heap)
[21 Jan 2008 20:48] Kevin Lewis
Vlad, good fix. It works.  And thanks for making a test case also.  Please push to mysql-6.0-falcon-team.  This change is not risky and can be pushed to 6.0.4 with the others.
[11 Feb 2008 20:47] Kevin Lewis
Patch is in mysql-6.0-falcon-team and mysql-6.0-release version 6.0.4
[12 Mar 2008 23:02] Bugs System
Pushed into 6.0.4-alpha
[16 Mar 2008 11:21] MC Brown
A note has been added to the 6.0.4 changelog: 

The output from SHOW CREATE TABLE on a Falcon table would not include the AUTO_INCREMENT value parameters.