Am 12.03.2013 22:34, schrieb spameden:
> NOTE: AUTO_INCREMENT is 32768 instead of 17923 ! So next inserted row
> would have pc_id=32768.
>
> Please suggest if it's normal behavior or not
what do you expect if a PRIMARY KEY record get's removed?
re-use the same primary key?
this is not the way a
Also, forget to quote from the docs
(http://dev.mysql.com/doc/refman/5.5/en/innodb-auto-increment-handling.html)
"With innodb_autoinc_lock_mode set to 0 (“traditional”) or 1
(“consecutive”), the auto-increment values generated by any given
statement will be consecutive, without gaps, because the t
AUTO_INCREMENT guarantees that it will not assign the same number twice.
That's about all it is willing to guarantee.
With InnoDB, if a transaction starts, uses an auto_inc value, then rolls back,
that id is lost.
When you have multiple threads loading data into the same table, diff values of
2013/3/13 Rick James :
> What settings? (innodb_autoinc_lock_mode comes to mind, but there may be
> others.)
Hi, Rick.
Many thanks for the quick answer here is my settings:
mysql> show variables like '%inc%';
+-+---+
| Variable_name | Value |
+-
What settings? (innodb_autoinc_lock_mode comes to mind, but there may be
others.)
It is acceptable, by the definition of AUTO_INCREMENT, for it to burn the
missing 15K ids.
> -Original Message-
> From: spameden [mailto:spame...@gmail.com]
> Sent: Tuesday, March 12, 2013 2:34 PM
> To: m
2013/3/13 Rick James :
> AUTO_INCREMENT guarantees that it will not assign the same number twice.
> That's about all it is willing to guarantee.
>
> With InnoDB, if a transaction starts, uses an auto_inc value, then rolls
> back, that id is lost.
True, but if you do not specify START TRANSACTIO
Nevermind, I've found the bug:
http://bugs.mysql.com/bug.php?id=57643
I'm gonna subscribe for it and see if it's gonna be resolved.
Many thanks guys for all your assistance!
2013/3/13 spameden :
> 2013/3/13 Rick James :
>> AUTO_INCREMENT guarantees that it will not assign the same number twice.
After setting innodb_autoinc_lock_mode=0 it seems to start working as
expected for me:
mysql> show variables like 'innodb_autoinc_lock_mode';
+--+---+
| Variable_name| Value |
+--+---+
| innodb_autoinc_lock_mode | 0 |
+---
Furthermore I've tested on 133K records and AUTO_INCREMENT field in
the end had the value of 234076.
mysql> select count(*) from billing.phone_codes;
+--+
| count(*) |
+--+
| 12 |
+--+
1 row in set (0.02 sec)
AUTO_INCREMENT=234076
So it basically means If I have lar