1
0
mirror of https://github.com/MariaDB/server.git synced 2026-10-23 18:49:29 +03:00

Get thd by lock->trx->mysql_thd.

This commit is contained in:
sensssz
2016-10-12 21:54:31 -04:00
parent 5dc7ad87b8
commit 0a769b00b5
2 changed files with 2 additions and 2 deletions

View File

@@ -2008,7 +2008,7 @@ has_higher_priority(
return true;
}
// Ask the upper server layer if any of the two trx should be prefered.
int preference = thd_deadlock_victim_preference(lock1->thd, lock2->thd);
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;

View File

@@ -2031,7 +2031,7 @@ has_higher_priority(
return true;
}
// Ask the upper server layer if any of the two trx should be prefered.
int preference = thd_deadlock_victim_preference(lock1->thd, lock2->thd);
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;