Bug #4982 | auto_increment with MySQL Cluster produce weird result in some case | ||
---|---|---|---|
Submitted: | 10 Aug 2004 22:09 | Modified: | 11 Aug 2004 10:00 |
Reporter: | Pascal Gauthier | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Cluster: Cluster (NDB) storage engine | Severity: | S1 (Critical) |
Version: | 4.1.4 beta (bk tree 09au) | OS: | Linux (Debian Linux) |
Assigned to: | Martin Skold | CPU Architecture: | Any |
[10 Aug 2004 22:09]
Pascal Gauthier
[11 Aug 2004 9:59]
Martin Skold
In MySQL Cluster auto_increment values are stored in the distributed database since they are global (per table). Since it is much more expensive to manage such counters than in a local non-distributed database, the auto_increment values are pre-fetched in batches (currently of size 32). This is thus not a bug. Actually I was only able to reproduce the problem running two clients, where if I do insert in the first I get 0 (since it has a batch 0 - 31) and if insert in the second I get 32 (since it has a batch of 32-63).