Skip to content

Commit 0a769b0

Browse files
committed
Get thd by lock->trx->mysql_thd.
1 parent 5dc7ad8 commit 0a769b0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

storage/innobase/lock/lock0lock.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2008,7 +2008,7 @@ has_higher_priority(
20082008
return true;
20092009
}
20102010
// Ask the upper server layer if any of the two trx should be prefered.
2011-
int preference = thd_deadlock_victim_preference(lock1->thd, lock2->thd);
2011+
int preference = thd_deadlock_victim_preference(lock1->trx->mysql_thd, lock2->trx->mysql_thd);
20122012
if (preference == -1) {
20132013
// lock1 is preferred as a victim, so lock2 has higher priority
20142014
return false;

storage/xtradb/lock/lock0lock.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2031,7 +2031,7 @@ has_higher_priority(
20312031
return true;
20322032
}
20332033
// Ask the upper server layer if any of the two trx should be prefered.
2034-
int preference = thd_deadlock_victim_preference(lock1->thd, lock2->thd);
2034+
int preference = thd_deadlock_victim_preference(lock1->trx->mysql_thd, lock2->trx->mysql_thd);
20352035
if (preference == -1) {
20362036
// lock1 is preferred as a victim, so lock2 has higher priority
20372037
return false;

0 commit comments

Comments
 (0)