@@ -1999,7 +1999,7 @@ RecLock::check_deadlock_result(const trx_t* victim_trx, lock_t* lock)
1999
1999
/* *
2000
2000
Check and resolve any deadlocks
2001
2001
@param[in, out] lock The lock being acquired
2002
- @return DB_LOCK_WAIT, DB_DEADLOCK, or DB_QUE_THR_SUSPENDED, or
2002
+ @return DB_LOCK_WAIT, DB_DEADLOCK, or
2003
2003
DB_SUCCESS_LOCKED_REC; DB_SUCCESS_LOCKED_REC means that
2004
2004
there was a deadlock, but another transaction was chosen
2005
2005
as a victim, and we got the lock immediately: no need to
@@ -2097,7 +2097,7 @@ queue is itself waiting roll it back, also do a deadlock check and resolve.
2097
2097
@param[in, out] wait_for The lock that the joining transaction is
2098
2098
waiting for
2099
2099
@param[in] prdt Predicate [optional]
2100
- @return DB_LOCK_WAIT, DB_DEADLOCK, or DB_QUE_THR_SUSPENDED, or
2100
+ @return DB_LOCK_WAIT, DB_DEADLOCK, or
2101
2101
DB_SUCCESS_LOCKED_REC; DB_SUCCESS_LOCKED_REC means that
2102
2102
there was a deadlock, but another transaction was chosen
2103
2103
as a victim, and we got the lock immediately: no need to
@@ -2380,8 +2380,7 @@ This is the general, and slower, routine for locking a record. This is a
2380
2380
low-level function which does NOT look at implicit locks! Checks lock
2381
2381
compatibility within explicit locks. This function sets a normal next-key
2382
2382
lock, or in the case of a page supremum record, a gap type lock.
2383
- @return DB_SUCCESS, DB_SUCCESS_LOCKED_REC, DB_LOCK_WAIT, DB_DEADLOCK,
2384
- or DB_QUE_THR_SUSPENDED */
2383
+ @return DB_SUCCESS, DB_SUCCESS_LOCKED_REC, DB_LOCK_WAIT, or DB_DEADLOCK */
2385
2384
static
2386
2385
dberr_t
2387
2386
lock_rec_lock_slow (
@@ -2467,8 +2466,7 @@ possible, enqueues a waiting lock request. This is a low-level function
2467
2466
which does NOT look at implicit locks! Checks lock compatibility within
2468
2467
explicit locks. This function sets a normal next-key lock, or in the case
2469
2468
of a page supremum record, a gap type lock.
2470
- @return DB_SUCCESS, DB_SUCCESS_LOCKED_REC, DB_LOCK_WAIT, DB_DEADLOCK,
2471
- or DB_QUE_THR_SUSPENDED */
2469
+ @return DB_SUCCESS, DB_SUCCESS_LOCKED_REC, DB_LOCK_WAIT, or DB_DEADLOCK */
2472
2470
static
2473
2471
dberr_t
2474
2472
lock_rec_lock (
@@ -4446,7 +4444,7 @@ lock_table_remove_low(
4446
4444
/* ********************************************************************/ /* *
4447
4445
Enqueues a waiting request for a table lock which cannot be granted
4448
4446
immediately. Checks for deadlocks.
4449
- @return DB_LOCK_WAIT, DB_DEADLOCK, or DB_QUE_THR_SUSPENDED, or
4447
+ @return DB_LOCK_WAIT, DB_DEADLOCK, or
4450
4448
DB_SUCCESS; DB_SUCCESS means that there was a deadlock, but another
4451
4449
transaction was chosen as a victim, and we got the lock immediately:
4452
4450
no need to wait then */
@@ -4468,16 +4466,7 @@ lock_table_enqueue_waiting(
4468
4466
4469
4467
trx = thr_get_trx (thr);
4470
4468
ut_ad (trx_mutex_own (trx));
4471
-
4472
- /* Test if there already is some other reason to suspend thread:
4473
- we do not enqueue a lock request if the query thread should be
4474
- stopped anyway */
4475
-
4476
- if (que_thr_stop (thr)) {
4477
- ut_error;
4478
-
4479
- return (DB_QUE_THR_SUSPENDED);
4480
- }
4469
+ ut_a (!que_thr_stop (thr));
4481
4470
4482
4471
switch (trx_get_dict_operation (trx)) {
4483
4472
case TRX_DICT_OP_NONE:
@@ -4583,7 +4572,7 @@ lock_table_other_has_incompatible(
4583
4572
/* ********************************************************************/ /* *
4584
4573
Locks the specified database table in the mode given. If the lock cannot
4585
4574
be granted immediately, the query thread is put to wait.
4586
- @return DB_SUCCESS, DB_LOCK_WAIT, DB_DEADLOCK, or DB_QUE_THR_SUSPENDED */
4575
+ @return DB_SUCCESS, DB_LOCK_WAIT, or DB_DEADLOCK */
4587
4576
dberr_t
4588
4577
lock_table (
4589
4578
/* =======*/
@@ -4805,32 +4794,8 @@ lock_table_for_trx(
4805
4794
} else {
4806
4795
que_thr_stop_for_mysql (thr);
4807
4796
4808
- if (err != DB_QUE_THR_SUSPENDED) {
4809
- bool was_lock_wait;
4810
-
4811
- was_lock_wait = row_mysql_handle_errors (
4812
- &err, trx, thr, NULL );
4813
-
4814
- if (was_lock_wait) {
4815
- goto run_again;
4816
- }
4817
- } else {
4818
- que_thr_t * run_thr;
4819
- que_node_t * parent;
4820
-
4821
- parent = que_node_get_parent (thr);
4822
-
4823
- run_thr = que_fork_start_command (
4824
- static_cast <que_fork_t *>(parent));
4825
-
4826
- ut_a (run_thr == thr);
4827
-
4828
- /* There was a lock wait but the thread was not
4829
- in a ready to run or running state. */
4830
- trx->error_state = DB_LOCK_WAIT;
4831
-
4797
+ if (row_mysql_handle_errors (&err, trx, thr, NULL )) {
4832
4798
goto run_again;
4833
-
4834
4799
}
4835
4800
}
4836
4801
@@ -6498,7 +6463,7 @@ a record. If they do, first tests if the query thread should anyway
6498
6463
be suspended for some reason; if not, then puts the transaction and
6499
6464
the query thread to the lock wait state and inserts a waiting request
6500
6465
for a gap x-lock to the lock queue.
6501
- @return DB_SUCCESS, DB_LOCK_WAIT, DB_DEADLOCK, or DB_QUE_THR_SUSPENDED */
6466
+ @return DB_SUCCESS, DB_LOCK_WAIT, or DB_DEADLOCK */
6502
6467
dberr_t
6503
6468
lock_rec_insert_check_and_lock (
6504
6469
/* ===========================*/
@@ -6739,7 +6704,7 @@ first tests if the query thread should anyway be suspended for some
6739
6704
reason; if not, then puts the transaction and the query thread to the
6740
6705
lock wait state and inserts a waiting request for a record x-lock to the
6741
6706
lock queue.
6742
- @return DB_SUCCESS, DB_LOCK_WAIT, DB_DEADLOCK, or DB_QUE_THR_SUSPENDED */
6707
+ @return DB_SUCCESS, DB_LOCK_WAIT, or DB_DEADLOCK */
6743
6708
dberr_t
6744
6709
lock_clust_rec_modify_check_and_lock (
6745
6710
/* =================================*/
@@ -6797,7 +6762,7 @@ lock_clust_rec_modify_check_and_lock(
6797
6762
/* ********************************************************************/ /* *
6798
6763
Checks if locks of other transactions prevent an immediate modify (delete
6799
6764
mark or delete unmark) of a secondary index record.
6800
- @return DB_SUCCESS, DB_LOCK_WAIT, DB_DEADLOCK, or DB_QUE_THR_SUSPENDED */
6765
+ @return DB_SUCCESS, DB_LOCK_WAIT, or DB_DEADLOCK */
6801
6766
dberr_t
6802
6767
lock_sec_rec_modify_check_and_lock (
6803
6768
/* ===============================*/
@@ -6882,8 +6847,7 @@ lock_sec_rec_modify_check_and_lock(
6882
6847
/* ********************************************************************/ /* *
6883
6848
Like lock_clust_rec_read_check_and_lock(), but reads a
6884
6849
secondary index record.
6885
- @return DB_SUCCESS, DB_SUCCESS_LOCKED_REC, DB_LOCK_WAIT, DB_DEADLOCK,
6886
- or DB_QUE_THR_SUSPENDED */
6850
+ @return DB_SUCCESS, DB_SUCCESS_LOCKED_REC, DB_LOCK_WAIT, or DB_DEADLOCK */
6887
6851
dberr_t
6888
6852
lock_sec_rec_read_check_and_lock (
6889
6853
/* =============================*/
@@ -6961,8 +6925,7 @@ if the query thread should anyway be suspended for some reason; if not, then
6961
6925
puts the transaction and the query thread to the lock wait state and inserts a
6962
6926
waiting request for a record lock to the lock queue. Sets the requested mode
6963
6927
lock on the record.
6964
- @return DB_SUCCESS, DB_SUCCESS_LOCKED_REC, DB_LOCK_WAIT, DB_DEADLOCK,
6965
- or DB_QUE_THR_SUSPENDED */
6928
+ @return DB_SUCCESS, DB_SUCCESS_LOCKED_REC, DB_LOCK_WAIT, or DB_DEADLOCK */
6966
6929
dberr_t
6967
6930
lock_clust_rec_read_check_and_lock (
6968
6931
/* ===============================*/
@@ -7036,7 +6999,7 @@ waiting request for a record lock to the lock queue. Sets the requested mode
7036
6999
lock on the record. This is an alternative version of
7037
7000
lock_clust_rec_read_check_and_lock() that does not require the parameter
7038
7001
"offsets".
7039
- @return DB_SUCCESS, DB_LOCK_WAIT, DB_DEADLOCK, or DB_QUE_THR_SUSPENDED */
7002
+ @return DB_SUCCESS, DB_LOCK_WAIT, or DB_DEADLOCK */
7040
7003
dberr_t
7041
7004
lock_clust_rec_read_check_and_lock_alt (
7042
7005
/* ===================================*/
0 commit comments