Bug #54 auto_increment in alter table doesn't support bigints
Submitted: 2 Feb 2003 22:02 Modified: 18 Mar 2003 2:41
Reporter: Georg Richter Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:4.1 (maybe all versions) OS:Linux (Linux 2.4 kernel)
Assigned to: CPU Architecture:Any

[2 Feb 2003 22:02] Georg Richter
Description:
When I try to set auto_increment in alter table to a bigint value, it's set to max int value.

I'm not sure, if I should send this bug to bugs@lists.mysql.com too. If so, please drop me a msg.

Regards

Georg

How to repeat:
mysql> create table a_001 (a bigint not null auto_increment primary key, b int);
Query OK, 0 rows affected (0.00 sec)

mysql> insert into a_001 (b) values (4);
Query OK, 1 row affected (0.00 sec)

mysql> alter table a_001 auto_increment=9999999999;
Query OK, 1 row affected (0.00 sec)
Records: 1  Duplicates: 0  Warnings: 0

mysql> insert into a_001 (b) values (5);
Query OK, 1 row affected (0.00 sec)

mysql> insert into a_001 (a,b) values (9999999999,6);
Query OK, 1 row affected (0.01 sec)

mysql> select * from a_001;
+------------+------+
| a          | b    |
+------------+------+
|          1 |    4 |
| 4294967295 |    5 |
| 9999999999 |    6 |
+------------+------+
3 rows in set (0.00 sec)
[18 Mar 2003 2:14] Alexander Keremidarski
Thank you for your bug report. This issue has already been fixed
in the latest released version of that product, which you can download at 
http://www.mysql.com/downloads/

Fixed in 4.0.12
[18 Mar 2003 2:41] Michael Widenius
Thank you for taking the time to report a problem.  Unfortunately
you are not using a current version of the product your reported a
problem with -- the problem might already be fixed. Please download
a new version from http://www.mysql.com/downloads/

If you are able to reproduce the bug with one of the latest versions,
please change the version on this bug report to the version you
tested and change the status back to "Open".  Again, thank you for
your continued support of MySQL.

Works in current 4.0 version and in the version in the 4.1 development tree