Commit caf4dc8b authored by Mikael Ronström's avatar Mikael Ronström

BUG#12578441, reintroduced thd->cleanup() in unlink_thd, removed by mistake,...

BUG#12578441, reintroduced thd->cleanup() in unlink_thd, removed by mistake, added private interface to this function
parent 057d3a66
...@@ -94,6 +94,8 @@ bool thd_is_connection_alive(THD *thd); ...@@ -94,6 +94,8 @@ bool thd_is_connection_alive(THD *thd);
void close_connection(THD *thd, uint errcode); void close_connection(THD *thd, uint errcode);
/* End the connection before closing it */ /* End the connection before closing it */
void end_connection(THD *thd); void end_connection(THD *thd);
/* Cleanup the THD object */
void thd_cleanup(THD *thd);
/* Decrement connection counter */ /* Decrement connection counter */
void dec_connection_count(); void dec_connection_count();
/* Destroy THD object */ /* Destroy THD object */
......
...@@ -2008,6 +2008,19 @@ extern "C" sig_handler end_thread_signal(int sig __attribute__((unused))) ...@@ -2008,6 +2008,19 @@ extern "C" sig_handler end_thread_signal(int sig __attribute__((unused)))
} }
/*
Cleanup THD object
SYNOPSIS
thd_cleanup()
thd Thread handler
*/
void thd_cleanup(THD *thd)
{
thd->cleanup();
}
/* /*
Decrease number of connections Decrease number of connections
...@@ -2054,6 +2067,7 @@ void unlink_thd(THD *thd) ...@@ -2054,6 +2067,7 @@ void unlink_thd(THD *thd)
DBUG_ENTER("unlink_thd"); DBUG_ENTER("unlink_thd");
DBUG_PRINT("enter", ("thd: 0x%lx", (long) thd)); DBUG_PRINT("enter", ("thd: 0x%lx", (long) thd));
thd_cleanup(thd);
dec_connection_count(); dec_connection_count();
mysql_mutex_lock(&LOCK_thread_count); mysql_mutex_lock(&LOCK_thread_count);
delete_thd(thd); delete_thd(thd);
......
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