Bug #21641 | nonpreserving of InnoDB auto_increment values can lead to unintended inheritance | ||
---|---|---|---|
Submitted: | 14 Aug 2006 23:57 | Modified: | 13 May 2010 16:04 |
Reporter: | Stephen Dewey | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: InnoDB storage engine | Severity: | S4 (Feature request) |
Version: | 4.1, 5.1, 5.5 | OS: | Any |
Assigned to: | Assigned Account | CPU Architecture: | Any |
Tags: | auto_increment, innodb |
[14 Aug 2006 23:57]
Stephen Dewey
[28 Aug 2006 11:08]
Valeriy Kravchuk
Thank you for a reasonable feature request.
[8 May 2007 1:20]
Daevid Vincent
This bug is critical and is causing us all kinds of grief with database integrity. Please escalate it. mysqladmin create INNODB_IS_BROKEN locutus ~ # mysql INNODB_IS_BROKEN mysql> CREATE TABLE `foo` ( -> `id` int(10) unsigned NOT NULL auto_increment, -> `name` varchar(20), -> PRIMARY KEY (`id`) -> ) ENGINE=INNODB; Query OK, 0 rows affected (0.01 sec) mysql> INSERT INTO foo values (null, 'a'); mysql> INSERT INTO foo values (null, 'b'); mysql> INSERT INTO foo values (null, 'c'); mysql> SELECT * FROM foo; +----+------+ | id | name | +----+------+ | 1 | a | | 2 | b | | 3 | c | +----+------+ 3 rows in set (0.00 sec) mysql> DELETE FROM foo; Query OK, 3 rows affected (0.00 sec) mysql> QUIT; locutus ~ # /etc/init.d/mysql restart * Stopping mysql ... * Starting mysql (/etc/mysql/my.cnf) locutus ~ # mysql INNODB_IS_BROKEN mysql> INSERT INTO foo values (null, 'd'); Query OK, 1 row affected (0.01 sec) mysql> SELECT * FROM foo; +----+------+ | id | name | +----+------+ | 1 | d | +----+------+ 1 row in set (0.00 sec)
[4 Jun 2007 20:06]
Dimitriy A
What's the status of this feature request?
[19 Dec 2007 21:59]
Mike Schumacher
I agree that this is a critical problem that needs to be addressed. We are having all kinds of issues related to it. What is the status of this bug?
[13 Feb 2008 22:29]
Dave Latham
The current functionality is definitely not intuitive. A persistent auto-increment would be much appreciated!
[20 Oct 2008 21:40]
Mattias Jonsson
Closed bug#34077 as a duplicate of this.
[20 Oct 2011 7:52]
Marko Mäkelä
In MySQL 5.6, this ought to become even worse, because tables can be evicted from the InnoDB data dictionary cache. We may get a too low auto-increment value even without shutdown/restart. When a table is evicted, InnoDB will forget the current auto-increment value, and it will do SELECT MAX(auto_inc_column) next time when the table is accessed.
[30 Sep 2016 20:04]
James Day
Duplicate of bug #199. The first 8.0 development milestone release includes the work to make the autoincrement value persistent, writing changes to the redo log. James day, MySQL Senior Principal Support Engineer, Oracle