lock0lock.c:

  Fix bug: the AUTO-INC lock was held to the end of trx if it was granted after a lock wait
parent 66646cc4
......@@ -1863,6 +1863,19 @@ lock_grant(
ut_ad(mutex_own(&kernel_mutex));
lock_reset_lock_and_trx_wait(lock);
if (lock_get_mode(lock) == LOCK_AUTO_INC) {
if (lock->trx->auto_inc_lock != NULL) {
fprintf(stderr,
"InnoDB: Error: trx already had an AUTO-INC lock!\n");
}
/* Store pointer to lock to trx so that we know to
release it at the end of the SQL statement */
lock->trx->auto_inc_lock = lock;
}
if (lock_print_waits) {
printf("Lock wait for trx %lu ends\n",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment