diff options
-rw-r--r-- | storage/innobase/handler/ha_innodb.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index 70404eb03cd..c408b1a1d30 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -2717,6 +2717,12 @@ innobase_trx_init( DBUG_ENTER("innobase_trx_init"); DBUG_ASSERT(thd == trx->mysql_thd); + /* Ensure that thd_lock_wait_timeout(), which may be called + while holding lock_sys.mutex, by lock_rec_enqueue_waiting(), + will not end up acquiring LOCK_global_system_variables in + intern_sys_var_ptr(). */ + THDVAR(thd, lock_wait_timeout); + trx->check_foreigns = !thd_test_options( thd, OPTION_NO_FOREIGN_KEY_CHECKS); |