Skip to content

Commit 4fb45aa

Browse files
author
Jan Lindström
committed
Fix compiler error when WITH_WSREP is not used.
1 parent 9d15afd commit 4fb45aa

File tree

2 files changed

+15
-19
lines changed

2 files changed

+15
-19
lines changed

storage/innobase/lock/lock0lock.cc

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6149,16 +6149,15 @@ lock_rec_queue_validate(
61496149
if (!lock_rec_get_gap(lock) && !lock_get_wait(lock)) {
61506150

61516151
#ifndef WITH_WSREP
6152-
if (wsrep_thd_is_wsrep(lock->trx->mysql_thd)) {
6153-
enum lock_mode mode;
6152+
enum lock_mode mode;
61546153

6155-
if (lock_get_mode(lock) == LOCK_S) {
6156-
mode = LOCK_X;
6157-
} else {
6158-
mode = LOCK_S;
6159-
}
6160-
ut_a(!lock_rec_other_has_expl_req(
6161-
mode, 0, 0, block, heap_no, lock->trx));
6154+
if (lock_get_mode(lock) == LOCK_S) {
6155+
mode = LOCK_X;
6156+
} else {
6157+
mode = LOCK_S;
6158+
}
6159+
ut_a(!lock_rec_other_has_expl_req(
6160+
mode, 0, 0, block, heap_no, lock->trx));
61626161
}
61636162
#endif /* WITH_WSREP */
61646163

storage/xtradb/lock/lock0lock.cc

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6197,19 +6197,16 @@ lock_rec_queue_validate(
61976197
if (!lock_rec_get_gap(lock) && !lock_get_wait(lock)) {
61986198

61996199
#ifndef WITH_WSREP
6200-
if (wsrep_thd_is_wsrep(lock->trx->mysql_thd)) {
6201-
enum lock_mode mode;
6200+
enum lock_mode mode;
62026201

6203-
if (lock_get_mode(lock) == LOCK_S) {
6204-
mode = LOCK_X;
6205-
} else {
6206-
mode = LOCK_S;
6207-
}
6208-
ut_a(!lock_rec_other_has_expl_req(
6209-
mode, 0, 0, block, heap_no, lock->trx));
6202+
if (lock_get_mode(lock) == LOCK_S) {
6203+
mode = LOCK_X;
6204+
} else {
6205+
mode = LOCK_S;
62106206
}
6207+
ut_a(!lock_rec_other_has_expl_req(
6208+
mode, 0, 0, block, heap_no, lock->trx));
62116209
#endif /* WITH_WSREP */
6212-
62136210
} else if (lock_get_wait(lock) && !lock_rec_get_gap(lock)) {
62146211

62156212
ut_a(lock_rec_has_to_wait_in_queue(lock));

0 commit comments

Comments
 (0)