On Tue, 12 Feb 2008 10:35:37 -0800 (PST),
lawpoop@gmail.com wrote:
> Hello all --
>
> I'm using mysqldump to dump an innodb database. I've looked at the
> resulting output file, and the CREATE TABLE statements do not include
> the auto_increment for the fields I've specified.
>
> CREATE TABLE `CardQuestions` (
> `id` int(10) unsigned NOT NULL,
> ...
>
> However, phpMyAdmin creates a table the way I already specified with
> its export command:
>
> CREATE TABLE IF NOT EXISTS `CardQuestions` (
> `id` int(10) unsigned NOT NULL auto_increment,
> ...
>
> I've read over the mysqldump man page, and it doesn't say anything
> about switches for including auto_increment statements. Similar google
> searches have turned up nothing about my problem. What's going on?
Can't replicate this. See `comment_ID` definition.
$ mysqldump -uroot -p --opt --databases pinball
-- MySQL dump 10.11
--
-- Host: localhost Database: pinball
-- ------------------------------------------------------
-- Server version 5.0.33-log
[...]
--
-- Table structure for table `comment`
--
DROP TABLE IF EXISTS `comment`;
CREATE TABLE `comment` (
`comment_ID` int(7) NOT NULL auto_increment,
`portLoc_ID` int(7) NOT NULL default '0',
`comment` varchar(255) NOT NULL default '',
`cchangeDate` datetime NOT NULL default '0000-00-00 00:00:00',
`cchangeBy` varchar(20) NOT NULL default '',
`displayFlag` enum('0','1') NOT NULL default '0',
`ip_address` varchar(15) NOT NULL default '',
PRIMARY KEY (`comment_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC;
--
89. After I capture the hero's superweapon, I will not immediately disband my
legions and relax my guard because I believe whoever holds the weapon is
unstoppable. After all, the hero held the weapon and I took it from him.
--Peter Anspach's list of things to do as an Evil Overlord