| Bug #14945 | Truncate table doesn't reset the auto_increment counter | ||
|---|---|---|---|
| Submitted: | 15 Nov 2005 13:34 | Modified: | 8 Apr 2006 15:24 |
| Reporter: | Arnold Greving | ||
| Status: | Closed | ||
| Category: | Server: SP | Severity: | S2 (Serious) |
| Version: | 5.0.15/5.0.17 BK | OS: | Linux (Debian sid) |
| Assigned to: | Sergey Vojtovich | Target Version: | |
[15 Nov 2005 13:34]
Arnold Greving
[15 Nov 2005 13:53]
Miguel Solorzano
Thank you for the bug report.
[18 Jan 2006 10:34]
Giuseppe Maxia
Verified on MySQL 5.0.18. It affects MyISAM tables, but not InnoDB . How to repeat: create table test1 (id int not null auto_increment primary key) engine=MyISAM; create procedure test_truncate() deterministic truncate test1; insert into test1 values (null); select * from test1; +----+ | id | +----+ | 1 | +----+ call test_truncate(); insert into test1 values (null); select * from test1; +----+ | id | +----+ | 2 | +----+ truncate test1; insert into test1 values (null); select * from test1; +----+ | id | +----+ | 1 | +----+ Regards Giuseppe Maxia
[8 Mar 2006 9:57]
Magnus Blaudd
Duplicate of bug#11932? Or at least caused by same problem.
[30 Mar 2006 9:15]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/4312
[6 Apr 2006 12:19]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/4549
[6 Apr 2006 20:40]
Sergey Vojtovich
Fixed in 5.0.21, 5.1.9. Please note that this problem still persists for ndb tables and will be tracked by BUG#18864. Actually ordinary TRUNCATE TABLE doesn't reset AUTO_INCREMENT value on ndb table.
[8 Apr 2006 15:24]
Jon Stephens
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.
If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information
about accessing the source trees is available at
http://www.mysql.com/doc/en/Installing_source_tree.html
Additional info:
Documented bugfix in 5.0.21 and 5.1.9 changelogs. Closed.
