diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2018-02-02 16:15:50 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2018-02-02 16:16:14 +0200 |
commit | d57b2430d70573e7696cc1244ef187e04d43789a (patch) | |
tree | 18de21e2b243aea940374fa32da669ac1b10f417 | |
parent | 4c731a2d7c310cca53a68c30cb7927cdc25ceed7 (diff) | |
parent | 6266493fc33cfcfd3f878c6955b53576277f52ba (diff) | |
download | mariadb-git-d57b2430d70573e7696cc1244ef187e04d43789a.tar.gz |
Merge a fix from MySQL 5.7, to presumably dead code
Remove a test that does not apply to MariaDB
In MariaDB, there are no high-priority transactions (no tx_priority).
This should also mean that all references to TRX_STATE_FORCED_ROLLBACK
are dead code.
-rw-r--r-- | storage/innobase/lock/lock0lock.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/storage/innobase/lock/lock0lock.cc b/storage/innobase/lock/lock0lock.cc index f25ac596d5f..cde267aa638 100644 --- a/storage/innobase/lock/lock0lock.cc +++ b/storage/innobase/lock/lock0lock.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2017, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2014, 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under @@ -2728,7 +2728,10 @@ RecLock::lock_add_priority( lock_t* grant_position = NULL; lock_t* add_position = NULL; - HASH_SEARCH(hash, lock_sys->rec_hash, m_rec_id.fold(), lock_t*, + /* Different lock (such as predicate lock) are on different hash */ + hash_table_t* lock_hash = lock_hash_get(m_mode); + + HASH_SEARCH(hash, lock_hash, m_rec_id.fold(), lock_t*, lock_head, ut_ad(lock_head->is_record_lock()), true); ut_ad(lock_head); |