Commit 725ce0fe authored by Sergei Golubchik's avatar Sergei Golubchik

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.
parent 69da361c
......@@ -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();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment