mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 04:53:01 +01:00
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.
This commit is contained in:
parent
33ed16c750
commit
1e2b46d5d5
1 changed files with 1 additions and 16 deletions
|
@ -1769,21 +1769,6 @@ has_higher_priority(
|
|||
} else if (lock2 == NULL) {
|
||||
return true;
|
||||
}
|
||||
// Ask the upper server layer if any of the two trx should be prefered.
|
||||
int preference = thd_deadlock_victim_preference(lock1->trx->mysql_thd, lock2->trx->mysql_thd);
|
||||
if (preference == -1) {
|
||||
// lock1 is preferred as a victim, so lock2 has higher priority
|
||||
return false;
|
||||
} else if (preference == 1) {
|
||||
// lock2 is preferred as a victim, so lock1 has higher priority
|
||||
return true;
|
||||
}
|
||||
if (trx_is_high_priority(lock1->trx)) {
|
||||
return true;
|
||||
}
|
||||
if (trx_is_high_priority(lock2->trx)) {
|
||||
return false;
|
||||
}
|
||||
// No preference. Compre them by wait mode and trx age.
|
||||
if (!lock_get_wait(lock1)) {
|
||||
return true;
|
||||
|
@ -1820,7 +1805,7 @@ lock_rec_insert_by_trx_age(
|
|||
|
||||
node = (lock_t *) cell->node;
|
||||
// If in_lock is not a wait lock, we insert it to the head of the list.
|
||||
if (node == NULL || (!lock_get_wait(in_lock) && has_higher_priority(in_lock, node))) {
|
||||
if (node == NULL || !lock_get_wait(in_lock) || has_higher_priority(in_lock, node)) {
|
||||
cell->node = in_lock;
|
||||
in_lock->hash = node;
|
||||
if (lock_get_wait(in_lock)) {
|
||||
|
|
Loading…
Reference in a new issue