summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-08-04 09:56:09 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2020-08-04 09:56:09 +0300
commit91caf130b71ac7532b5f1a387b7cf506ea2b09e2 (patch)
treebb734505a22926f18db994a689cafd7788f4a529
parent5fb07d22f175f9c343d0299340eb3bebcaf6c838 (diff)
downloadmariadb-git-91caf130b71ac7532b5f1a387b7cf506ea2b09e2.tar.gz
MDEV-23101 fixup: Remove redundant code
lock_rec_has_to_wait_in_queue(): Remove an obviously redundant assertion that was added in commit a8ec45863b958757da61af3b2ce0a38b0a79d92c and also enclose a Galera-specific condition in #ifdef WITH_WSREP.
-rw-r--r--storage/innobase/lock/lock0lock.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/storage/innobase/lock/lock0lock.cc b/storage/innobase/lock/lock0lock.cc
index 1e7d9b031d7..4730ae53133 100644
--- a/storage/innobase/lock/lock0lock.cc
+++ b/storage/innobase/lock/lock0lock.cc
@@ -2203,10 +2203,11 @@ lock_rec_has_to_wait_in_queue(
hash = lock_hash_get(wait_lock->type_mode);
for (lock = lock_rec_get_first_on_page_addr(hash, space, page_no);
- lock && lock != wait_lock;
+#ifdef WITH_WSREP
+ lock &&
+#endif
+ lock != wait_lock;
lock = lock_rec_get_next_on_page_const(lock)) {
-
- ut_ad(lock);
const byte* p = (const byte*) &lock[1];
if (heap_no < lock_rec_get_n_bits(lock)