Bug #18753 Partitions: auto_increment fails
Submitted: 3 Apr 2006 17:11 Modified: 12 Apr 2006 1:29
Reporter: Peter Gulutzan Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Partitions Severity:S3 (Non-critical)
Version:5.1.9-beta-debug OS:Linux (SUSE 10.0)
Assigned to: Sergei Glukhov CPU Architecture:Any

[3 Apr 2006 17:11] Peter Gulutzan
Description:
If I create a LIST partition with an auto_increment
column, and then I try to insert into the table, I
succeed the first two times, but fail the third time.
Possibly the underlying cause is the same as for Bug#18552.

How to repeat:
mysql> create table tp78 (s1 int auto_increment primary key) partition by list (s1) (partition p1 values in (1), partition p2 values in (2), partition p3 values in (3));
Query OK, 0 rows affected (0.02 sec)

mysql> insert into tp78 values (null);
Query OK, 1 row affected (0.00 sec)

mysql> insert into tp78 values (null);
Query OK, 1 row affected (0.00 sec)

mysql> insert into tp78 values (null);
ERROR 1022 (23000): Can't write; duplicate key in table 'tp78'
[4 Apr 2006 2:15] MySQL Verification Team
Thank you for the bug report.
[6 Apr 2006 10:30] 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/4550
[8 Apr 2006 17:31] Mikael Ronström
The patch works I am pretty sure. I'm slightly worried that it's performance isn't
the best but on the other hand I presume this is the only really safe way.
[10 Apr 2006 15:30] 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/4726
[10 Apr 2006 15:36] Sergei Glukhov
Fixed in 5.1.10
[12 Apr 2006 1:29] 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.1.10 changelog. Closed.