Skip to content

Commit 1e2b46d

Browse files
author
Jan Lindström
committed
MDEV-11168: InnoDB: Failing assertion: !other_lock || wsrep_thd_is_BF(lock->trx->mysql_thd, FALSE) || wsrep_thd_is_BF(other_lock->trx->mysql_thd, FALSE)
Merge fix from 10.1.
1 parent 33ed16c commit 1e2b46d

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

storage/innobase/lock/lock0lock.cc

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1769,21 +1769,6 @@ has_higher_priority(
17691769
} else if (lock2 == NULL) {
17701770
return true;
17711771
}
1772-
// Ask the upper server layer if any of the two trx should be prefered.
1773-
int preference = thd_deadlock_victim_preference(lock1->trx->mysql_thd, lock2->trx->mysql_thd);
1774-
if (preference == -1) {
1775-
// lock1 is preferred as a victim, so lock2 has higher priority
1776-
return false;
1777-
} else if (preference == 1) {
1778-
// lock2 is preferred as a victim, so lock1 has higher priority
1779-
return true;
1780-
}
1781-
if (trx_is_high_priority(lock1->trx)) {
1782-
return true;
1783-
}
1784-
if (trx_is_high_priority(lock2->trx)) {
1785-
return false;
1786-
}
17871772
// No preference. Compre them by wait mode and trx age.
17881773
if (!lock_get_wait(lock1)) {
17891774
return true;
@@ -1820,7 +1805,7 @@ lock_rec_insert_by_trx_age(
18201805

18211806
node = (lock_t *) cell->node;
18221807
// If in_lock is not a wait lock, we insert it to the head of the list.
1823-
if (node == NULL || (!lock_get_wait(in_lock) && has_higher_priority(in_lock, node))) {
1808+
if (node == NULL || !lock_get_wait(in_lock) || has_higher_priority(in_lock, node)) {
18241809
cell->node = in_lock;
18251810
in_lock->hash = node;
18261811
if (lock_get_wait(in_lock)) {

0 commit comments

Comments
 (0)