summaryrefslogtreecommitdiff
path: root/storage/innobase/lock/lock0wait.cc
diff options
context:
space:
mode:
authorSachin Setiya <sachin.setiya@mariadb.com>2017-09-27 10:06:44 +0530
committerSachin Setiya <sachin.setiya@mariadb.com>2017-09-27 10:15:08 +0530
commit0627929f626482508cc999d854e20f3a120f927a (patch)
tree4ad2c465bf594a6a781a5459437cd9d6d1de4584 /storage/innobase/lock/lock0wait.cc
parente3dee8376885c79350d447a5f99ddc5bf03188d8 (diff)
downloadmariadb-git-0627929f626482508cc999d854e20f3a120f927a.tar.gz
MDEV-13787 Crash in persistent stats wsrep_on (thd=0x0)
Problem:- This crash happens because of thd = NULL , and while checking for wsrep_on , we no longer check for thd != NULL (MDEV-7955). So this problem is regression of MDEV-7955. However this patch not only solves this regression , It solves all regression caused by MDEV-7955 patch. To get all possible cases when thd can be null , assert(thd)/ assert(trx->mysql_thd) is place just before all wsrep_on and innodb test suite is run. And the assert which caused failure are removed with a physical check for thd != NULL. Rest assert are removed. Hopefully this method will remove all current/potential regression of MDEV-7955.
Diffstat (limited to 'storage/innobase/lock/lock0wait.cc')
-rw-r--r--storage/innobase/lock/lock0wait.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/storage/innobase/lock/lock0wait.cc b/storage/innobase/lock/lock0wait.cc
index a447027e336..ca9d05a4829 100644
--- a/storage/innobase/lock/lock0wait.cc
+++ b/storage/innobase/lock/lock0wait.cc
@@ -197,7 +197,7 @@ wsrep_is_BF_lock_timeout(
/*====================*/
trx_t* trx) /* in: trx to check for lock priority */
{
- if (wsrep_on(trx->mysql_thd) &&
+ if (wsrep_on_trx(trx) &&
wsrep_thd_is_BF(trx->mysql_thd, FALSE)) {
fprintf(stderr, "WSREP: BF lock wait long\n");
srv_print_innodb_monitor = TRUE;
@@ -402,7 +402,7 @@ lock_wait_suspend_thread(
if (lock_wait_timeout < 100000000
&& wait_time > (double) lock_wait_timeout) {
#ifdef WITH_WSREP
- if (!wsrep_on(trx->mysql_thd) ||
+ if (!wsrep_on_trx(trx) ||
(!wsrep_is_BF_lock_timeout(trx) &&
trx->error_state != DB_DEADLOCK)) {
#endif /* WITH_WSREP */