I have a simple
INSERT INTO t1 (fields...) (SELECT fields... FROM t2);
it inserts around 8.000 rows and the auto increment value of the table is set to ~16.000, but it's not exactly 2x as much. I don't include the auto incremented id in the query, and the tables are truncated. Can it be a bug? I have version 5.5.24. Why is that, and how can I avoid this?
CREATE TABLE `order` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`` int(4) NOT NULL COMMENT '',
`` int(6) NOT NULL COMMENT '',
`` varchar(255) NOT NULL COMMENT '',
`` varchar(255) NOT NULL COMMENT '',
`` bigint(10) unsigned NOT NULL COMMENT '',
`` int(5) unsigned NOT NULL COMMENT '',
`` int(5) unsigned NOT NULL COMMENT '',
`` int(8) unsigned NOT NULL COMMENT '',
`` varchar(255) DEFAULT NULL COMMENT '',
`` int(3) DEFAULT NULL COMMENT '',
`` int(3) DEFAULT NULL COMMENT '',
`` date NOT NULL COMMENT '',
`` date DEFAULT NULL,
`` date DEFAULT NULL COMMENT '',
`` int(5) DEFAULT NULL COMMENT '',
`` varchar(2) DEFAULT NULL COMMENT '',
`` int(5) DEFAULT NULL COMMENT '',
`` varchar(255) DEFAULT NULL,
`` varchar(255) DEFAULT NULL,
`` char(1) DEFAULT NULL,
`` datetime DEFAULT NULL,
`` int(10) unsigned DEFAULT NULL,
`` datetime DEFAULT NULL,
`` int(10) unsigned DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `` (``),
KEY `` (``),
KEY `` (``),
CONSTRAINT `` FOREIGN KEY (``) REFERENCES `users` (`id`),
CONSTRAINT `` FOREIGN KEY (``) REFERENCES `users` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8440 DEFAULT CHARSET=utf8
Thanks.