Bug #8809 Auto_increment problems with 4 replicas
Submitted: 25 Feb 2005 16:11 Modified: 1 Feb 2006 11:51
Reporter: Johan Andersson Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S2 (Serious)
Version:4.1.* OS:HP/UX (hp ux 11.23)
Assigned to: Martin Skold CPU Architecture:Any

[25 Feb 2005 16:11] Johan Andersson
Description:

root@localhost [HAtests] > show create table auto_inc;
+----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table |
+----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| auto_inc | CREATE TABLE `auto_inc` (
`id` int(11) NOT NULL auto_increment,
`val_int` int(11) default NULL,
PRIMARY KEY (`id`)
) ENGINE=ndbcluster DEFAULT CHARSET=latin1 |
+----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

Then I inserted 1000 rows on one mysql-server. After that I tried the same on the second mysqld but my transactions aborted with "Duplicate Key" violation until the value for auto_increment reached the real one ( show table status showed me that the auto_increment value didn't get updated when I did an insert on the first mysqld).

I had this problem when using 4 replicas, on 2 replicas it function properly.

How to repeat:
NoOfReplicas: 4

CREATE TABLE `auto_inc` (
`id` int(11) NOT NULL auto_increment,
`val_int` int(11) default NULL,
PRIMARY KEY (`id`)
) ENGINE=ndbcluster DEFAULT CHARSET=latin1

1. Insert 1000 rows on mysql server 1

2. Insert 1000 rows on mysql server 2
[8 Apr 2005 13:43] Martin Skold
Can yo verify if bug was related to 
bug#9675 Auto-increment not working with INSERT..SELECT and NDB storage
which has now been fixed.
[8 May 2005 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[18 Jun 2005 23:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".