Automatically escalate Spaces when using INSERT ... SELECT even with innodb_autoinc_lock_mode = 0

I get spaces in my extra keys, even with

innodb_autoinc_lock_mode = 0

I isolated the problem to a single INSERT ... SELECT statement. In principle, each INSERT ... SELECT statement increases the value of the table auto_increment by one , even if the insertion (duplicate key) is not actually performed . In my case, I use INSERT IGNORE, but I tested without, and auto_increment is still erroneously increasing.

I'm worried about this because this INSERT ... SELECT statement works with a few high-frequency ones, so the keys quickly get big.

I will live with him if there is no way, but is there a way to avoid this behavior?

+5
source share
2

. : http://bugs.mysql.com/bug.php?id=61058
... , :

ALTER TABLE `test` AUTO_INCREMENT = 1;

insert...select , alter table , ..

+2

mysql. .

0

All Articles