summaryrefslogtreecommitdiff
path: root/sql/sql_class.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2016-05-08 22:16:44 +0200
committerSergei Golubchik <serg@mariadb.org>2016-06-04 09:06:00 +0200
commit725ce0fe84d4078895a5a31a2338f8d966c57710 (patch)
tree9cb345aae1030d1b5eb990fd3320e33a1397ffb4 /sql/sql_class.cc
parent69da361ccdac3c0dd6233527ee983687e966fd20 (diff)
downloadmariadb-git-725ce0fe84d4078895a5a31a2338f8d966c57710.tar.gz
THD:: cleanup() must be where it used to
between net_end() and ha_close_connection() this fixes lockups in main.locked_temporary-5955 and some other innodb tests.
Diffstat (limited to 'sql/sql_class.cc')
-rw-r--r--sql/sql_class.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index f460d318791..c08e5030061 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -1650,6 +1650,8 @@ void THD::free_connection()
net.vio= 0;
net_end(&net);
#endif
+ if (!cleanup_done)
+ cleanup();
ha_close_connection(this);
plugin_thdvar_cleanup(this);
mysql_audit_free_thd(this);
@@ -1719,8 +1721,6 @@ THD::~THD()
#endif
if (!free_connection_done)
free_connection();
- if (!cleanup_done)
- cleanup();
mdl_context.destroy();