Bug 125807

Summary: "Alter table foo autoincrement = n" sets a default, not auto_increment
Product: [Fedora] Fedora Reporter: Joshua Ginsberg <joshg>
Component: mysqlAssignee: Tom Lane <tgl>
Status: CLOSED INSUFFICIENT_DATA QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 2CC: hhorak, mattdm
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-10-25 19:58:23 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.