mirror of
https://github.com/MariaDB/server.git
synced 2025-01-30 10:31:54 +01:00
lock0lock.c:
Fix bug: the AUTO-INC lock was held to the end of trx if it was granted after a lock wait innobase/lock/lock0lock.c: Fix bug: the AUTO-INC lock was held to the end of trx if it was granted after a lock wait
This commit is contained in:
parent
18585d178d
commit
821c77c79d
1 changed files with 13 additions and 0 deletions
|
@ -1864,6 +1864,19 @@ lock_grant(
|
||||||
|
|
||||||
lock_reset_lock_and_trx_wait(lock);
|
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) {
|
if (lock_print_waits) {
|
||||||
printf("Lock wait for trx %lu ends\n",
|
printf("Lock wait for trx %lu ends\n",
|
||||||
ut_dulint_get_low(lock->trx->id));
|
ut_dulint_get_low(lock->trx->id));
|
||||||
|
|
Loading…
Add table
Reference in a new issue