summaryrefslogtreecommitdiff
path: root/sql/sql_class.cc
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2012-03-27 16:16:44 +0200
committerSergei Golubchik <sergii@pisem.net>2012-03-27 16:16:44 +0200
commit3d0775e9af2fcf3fe92b7f19e299ea23068eca1e (patch)
treedb70f85e9f5489dc37448c674a83b890a9d96e62 /sql/sql_class.cc
parent903ad7c94137f7c844cde03befc4ddd8e9713a3b (diff)
downloadmariadb-git-3d0775e9af2fcf3fe92b7f19e299ea23068eca1e.tar.gz
mdev-201 - Assertion `!thd->spcont' failed in net_send_error on server shutdown
bug in semisync plugin. It didn't check thd->killed before waiting on mysys->current_cond, and thus an attepmt to kill the thread (on shutdown) was lost plugin/semisync/semisync_master.cc: mdev:201 lp:962540
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;