1
0
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:
Monty
2017-09-07 15:43:45 +03:00
parent 4cb1a4fe7d
commit e022dde39c
4 changed files with 22 additions and 24 deletions

View File

@ -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)