-
unknown authored
CHECK TABLE did temporarily clear the auto_increment value. It runs with a read lock, allowing other readers and conurrent INSERTs. The latter could grab the wrong value in this moment. CHECK TABLE does no longer modify the auto_increment value. Not even for a short moment. myisam/mi_check.c: Bug#19604 - CHECK TABLE with concurrent INSERT can reset auto_increment In chk_key() and update_auto_increment_key() in the repair_only case, do not touch info->s->state.auto_increment. Especially chk_key() can be called from CHECK TABLE with a read lock. Concurrent inserts could grab a temporarily changed value. Added minor style fixes. myisam/mi_key.c: Bug#19604 - CHECK TABLE with concurrent INSERT can reset auto_increment Changed update_auto_increment() to retrieve_auto_increment() to reflect that it does not change the auto_increment by itself any more. This must now be done externally if needed. myisam/mi_update.c: Bug#19604 - CHECK TABLE with concurrent INSERT can reset auto_increment Added explicit update of info->s->state.auto_increment after the change from update_auto_increment() to retrieve_auto_increment(). myisam/mi_write.c: Bug#19604 - CHECK TABLE with concurrent INSERT can reset auto_increment Added explicit update of info->s->state.auto_increment after the change from update_auto_increment() to retrieve_auto_increment(). myisam/myisamdef.h: Bug#19604 - CHECK TABLE with concurrent INSERT can reset auto_increment Changed update_auto_increment() to retrieve_auto_increment() to reflect that it does not change the auto_increment by itself any more. This must now be done externally if needed.
4a1d0763