Bug #28968 mysqldump includes autoincrement value when --no-data is specified
Submitted: 8 Jun 2007 8:59 Modified: 8 Jun 2007 10:45
Reporter: Flavio Tordini Email Updates:
Status: Verified Impact on me:
Category:MySQL Server: mysqldump Command-line Client Severity:S4 (Feature request)
Version: OS:Any
Assigned to: CPU Architecture:Any
Tags: autoincrement, mysqldump
Triage: D5 (Feature request)

[8 Jun 2007 8:59] Flavio Tordini
I'm using mysqldump with --no-data to generate a SQL file containing the schema of my database. My purpose is to generate a clean schema to be added to my source control system. However mysqldump adds autoincrement values to the schema, like this:


I think the current autoincrement value should not be included in a --no-data dump, since it makes no sense when you don't have any data to preserve.

How to repeat:
mysqldump -u[user] -p[pw] --no-data [database]

Suggested fix:
I suggest you either drop AUTO_INCREMENT information when --no-data is specified or add an option to explicitly drop it.
[8 Jun 2007 10:45] Sveta Smirnova
Thank you for the reasonable feature request.