Bug 125807 - "Alter table foo autoincrement = n" sets a default, not auto_increment
Summary: "Alter table foo autoincrement = n" sets a default, not auto_increment
Keywords:
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: Fedora
Classification: Fedora
Component: mysql
Version: 2
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Tom Lane
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-06-11 18:10 UTC by Joshua Ginsberg
Modified: 2013-07-03 03:01 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2006-10-25 19:58:23 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Joshua Ginsberg 2004-06-11 18:10:35 UTC
After submitting Bug 125804, I modified the SQL I was trying to
import. I changed the CREATE TABLE statement so that the column that
was set to auto_increment would not. Then after the INSERT statements
I included "alter table foo auto_increment = n", substituting the
table name and the next value for foo and n. I then dumped my SQL back
out to diff it against the SQL I put in. The alter table statements
did not set the auto_increment -- they set a default value!

 CREATE TABLE users (
-  id int(11) NOT NULL,
+  id int(11) NOT NULL default '0',
...

 CREATE TABLE templates (
-  id int(11) NOT NULL,
+  id int(11) NOT NULL default '0',
...

That's just broken.

Version-Release number of selected component (if applicable):
mysql-3.23.58-9

Comment 1 Matthew Miller 2005-04-26 15:13:40 UTC
Fedora Core 2 is now maintained by the Fedora Legacy project for
security updates only. If this problem is a security issue, please
reopen and reassign to the Fedora Legacy product. If it is not a
security issue and hasn't been resolved in the current FC3 updates or
in the FC4 test release, reopen and change the version to match.

Comment 2 John Thacker 2006-10-25 19:58:23 UTC
Closed per above message and lack of response.  Note that FC2 is not even
supported by Fedora Legacy currently.


Note You need to log in before you can comment on or make changes to this bug.