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:
None 
Category:MySQL Server: mysqldump Command-line Client Severity:S4 (Feature request)
Version: OS:Any
Assigned to: CPU Architecture:Any
Tags: autoincrement, mysqldump

[8 Jun 2007 8:59] Flavio Tordini
Description:
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:

ENGINE=MyISAM AUTO_INCREMENT=312092 DEFAULT CHARSET=utf8

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.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.038 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.