mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Cleanups and fixes
- Added missing delete thd in bootstrap() - Delete wrong 'delete thd' in start_wsrep_THD() - Added missing 'delete thd' in case of SCHEDULER_ONE_THREAD_PER_CONNECTION - Delete wrong dec_thread_running() in destroy_thd() as it caused thread_running to be wrong. - Moved reset_killed() to a normal function to make it easier to debug - Added check of mutex in wsrep_aborting_thd... functions
This commit is contained in:
@ -2067,6 +2067,23 @@ int THD::killed_errno()
|
||||
}
|
||||
|
||||
|
||||
void THD::reset_killed()
|
||||
{
|
||||
/*
|
||||
Resetting killed has to be done under a mutex to ensure
|
||||
its not done during an awake() call.
|
||||
*/
|
||||
DBUG_ENTER("reset_killed");
|
||||
if (killed != NOT_KILLED)
|
||||
{
|
||||
mysql_mutex_lock(&LOCK_thd_kill);
|
||||
killed= NOT_KILLED;
|
||||
killed_err= 0;
|
||||
mysql_mutex_unlock(&LOCK_thd_kill);
|
||||
}
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
/*
|
||||
Remember the location of thread info, the structure needed for
|
||||
the structure for the net buffer
|
||||
@ -4630,7 +4647,6 @@ void destroy_thd(MYSQL_THD thd)
|
||||
thd->add_status_to_global();
|
||||
unlink_not_visible_thd(thd);
|
||||
delete thd;
|
||||
dec_thread_running();
|
||||
}
|
||||
|
||||
void reset_thd(MYSQL_THD thd)
|
||||
|
Reference in New Issue
Block a user