- err = lock_trx_handle_wait(trx,
- (lock_mutex_taken || already_have_lock_mutex),
- (trx_mutex_taken || already_have_trx_mutex));
+#ifdef UNIV_DEBUG
+ dberr_t err =
+#endif
+ lock_trx_handle_wait(trx, true, true);
+
+ ut_ad(err == DB_SUCCESS || err == DB_LOCK_WAIT
+ || err == DB_DEADLOCK);