diff options
author | sensssz <hjmsens@gmail.com> | 2016-10-19 01:46:57 -0400 |
---|---|---|
committer | sensssz <hjmsens@gmail.com> | 2016-10-19 01:46:57 -0400 |
commit | f62fd5add8561a3185b94a7499a23452fe84b2d0 (patch) | |
tree | 11acc32d031ff24ce2a63ea1c1aa069c28d6b9d2 /storage | |
parent | 0f93b5331e7b8bc7311b2f8c9f31cfd37ead5bbf (diff) | |
download | mariadb-git-f62fd5add8561a3185b94a7499a23452fe84b2d0.tar.gz |
Bug fix: remove redundant code from check_deadlock_result. Remove assert.
Diffstat (limited to 'storage')
-rw-r--r-- | storage/innobase/lock/lock0lock.cc | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/storage/innobase/lock/lock0lock.cc b/storage/innobase/lock/lock0lock.cc index 534b2bde114..c18e3b8f60a 100644 --- a/storage/innobase/lock/lock0lock.cc +++ b/storage/innobase/lock/lock0lock.cc @@ -2080,23 +2080,7 @@ RecLock::check_deadlock_result(const trx_t* victim_trx, lock_t* lock) return(DB_DEADLOCK); - } - - // Move it only when it does not cause a deadlock. - if (innodb_lock_schedule_algorithm - == INNODB_LOCK_SCHEDULE_ALGORITHM_VATS - && !trx_is_high_priority(lock->trx)) { - - HASH_DELETE(lock_t, hash, lock_hash_get(lock->type_mode), - m_rec_id.fold(), lock); - lock_rec_insert_by_trx_age(lock, m_mode & LOCK_WAIT); - if (lock_get_wait(lock) && !lock_rec_has_to_wait_in_queue(lock)) { - lock_reset_lock_and_trx_wait(lock); - return DB_SUCCESS_LOCKED_REC; - } - } - - if (m_trx->lock.wait_lock == NULL) { + } else if (m_trx->lock.wait_lock == NULL) { /* If there was a deadlock but we chose another transaction as a victim, it is possible that we @@ -3027,9 +3011,6 @@ lock_grant_and_move_on_page( && lock_get_wait(lock) && !lock_rec_has_to_wait_in_queue(lock)) { - /* Grant the lock */ - ut_ad(lock->trx != in_lock->trx); - bool exit_trx_mutex = false; if (lock->trx->abort_type != TRX_SERVER_ABORT) { |