Skip to content

Commit 725ce0f

Browse files
committed
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.
1 parent 69da361 commit 725ce0f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sql/sql_class.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1650,6 +1650,8 @@ void THD::free_connection()
16501650
net.vio= 0;
16511651
net_end(&net);
16521652
#endif
1653+
if (!cleanup_done)
1654+
cleanup();
16531655
ha_close_connection(this);
16541656
plugin_thdvar_cleanup(this);
16551657
mysql_audit_free_thd(this);
@@ -1719,8 +1721,6 @@ THD::~THD()
17191721
#endif
17201722
if (!free_connection_done)
17211723
free_connection();
1722-
if (!cleanup_done)
1723-
cleanup();
17241724

17251725
mdl_context.destroy();
17261726

0 commit comments

Comments
 (0)