summaryrefslogtreecommitdiff
path: root/sql/sql_class.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_class.cc')
-rw-r--r--sql/sql_class.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index d7d0c8d3f68..988c8b48c64 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -3735,6 +3735,9 @@ void THD::restore_backup_open_tables_state(Open_tables_backup *backup)
extern "C" int thd_killed(const MYSQL_THD thd)
{
+ if (!thd)
+ thd= current_thd;
+
if (!(thd->killed & KILL_HARD_BIT))
return 0;
return thd->killed;