File tree Expand file tree Collapse file tree 1 file changed +1
-16
lines changed Expand file tree Collapse file tree 1 file changed +1
-16
lines changed Original file line number Diff line number Diff line change @@ -1769,21 +1769,6 @@ has_higher_priority(
1769
1769
} else if (lock2 == NULL ) {
1770
1770
return true ;
1771
1771
}
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
- }
1787
1772
// No preference. Compre them by wait mode and trx age.
1788
1773
if (!lock_get_wait (lock1)) {
1789
1774
return true ;
@@ -1820,7 +1805,7 @@ lock_rec_insert_by_trx_age(
1820
1805
1821
1806
node = (lock_t *) cell->node ;
1822
1807
// 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)) {
1824
1809
cell->node = in_lock;
1825
1810
in_lock->hash = node;
1826
1811
if (lock_get_wait (in_lock)) {
You can’t perform that action at this time.
0 commit comments