lock_rec_enqueue_waiting(): Fix diagnostics
This is fixup after commit 8026cd6202bd252dc9baac31d6c8bc39653bd637. We must not silently allow a lock wait to occur during InnoDB data dictionary transactions. The dict_operation_lock is supposed to prevent lock waits, and we want to be aware of any errors.
This commit is contained in:
parent
1924594b80
commit
b81a403e69
@ -1719,11 +1719,6 @@ lock_rec_enqueue_waiting(
|
||||
|
||||
trx_t* trx = thr_get_trx(thr);
|
||||
|
||||
if (trx->mysql_thd && thd_lock_wait_timeout(trx->mysql_thd) == 0) {
|
||||
trx->error_state = DB_LOCK_WAIT_TIMEOUT;
|
||||
return DB_LOCK_WAIT_TIMEOUT;
|
||||
}
|
||||
|
||||
ut_ad(trx_mutex_own(trx));
|
||||
ut_a(!que_thr_stop(thr));
|
||||
|
||||
@ -1741,6 +1736,11 @@ lock_rec_enqueue_waiting(
|
||||
ut_ad(0);
|
||||
}
|
||||
|
||||
if (trx->mysql_thd && thd_lock_wait_timeout(trx->mysql_thd) == 0) {
|
||||
trx->error_state = DB_LOCK_WAIT_TIMEOUT;
|
||||
return DB_LOCK_WAIT_TIMEOUT;
|
||||
}
|
||||
|
||||
/* Enqueue the lock request that will wait to be granted, note that
|
||||
we already own the trx mutex. */
|
||||
lock_t* lock = lock_rec_create(
|
||||
|
Loading…
x
Reference in New Issue
Block a user