Skip to content
Permalink
Browse files
lock_rec_enqueue_waiting(): Fix diagnostics
This is fixup after commit 8026cd6.
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.
  • Loading branch information
dr-m authored and vuvova committed Mar 28, 2018
1 parent 1924594 commit b81a403
Showing 1 changed file with 5 additions and 5 deletions.
@@ -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(

0 comments on commit b81a403

Please sign in to comment.