summaryrefslogtreecommitdiff
path: root/sql/wsrep_mysqld.cc
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2017-09-07 15:43:45 +0300
committerMonty <monty@mariadb.org>2017-09-08 13:24:42 +0300
commite022dde39c8ea00aef3754d57ef802cb1b25b285 (patch)
tree66b7fceefed644d4dfb1b2df7bbe30dc211f81d7 /sql/wsrep_mysqld.cc
parent4cb1a4fe7d4183dfd617bea04a94f20971c3e932 (diff)
downloadmariadb-git-e022dde39c8ea00aef3754d57ef802cb1b25b285.tar.gz
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
Diffstat (limited to 'sql/wsrep_mysqld.cc')
-rw-r--r--sql/wsrep_mysqld.cc12
1 files changed, 3 insertions, 9 deletions
diff --git a/sql/wsrep_mysqld.cc b/sql/wsrep_mysqld.cc
index 7caff913106..63d153a7af4 100644
--- a/sql/wsrep_mysqld.cc
+++ b/sql/wsrep_mysqld.cc
@@ -1935,7 +1935,6 @@ pthread_handler_t start_wsrep_THD(void *arg)
close_connection(thd, ER_OUT_OF_RESOURCES);
statistic_increment(aborted_connects,&LOCK_status);
MYSQL_CALLBACK(thread_scheduler, end_thread, (thd, 0));
-
goto error;
}
@@ -1958,7 +1957,6 @@ pthread_handler_t start_wsrep_THD(void *arg)
close_connection(thd, ER_OUT_OF_RESOURCES);
statistic_increment(aborted_connects,&LOCK_status);
MYSQL_CALLBACK(thread_scheduler, end_thread, (thd, 0));
- delete thd;
goto error;
}
@@ -2002,13 +2000,8 @@ pthread_handler_t start_wsrep_THD(void *arg)
// at server shutdown
}
- if (thread_handling > SCHEDULER_ONE_THREAD_PER_CONNECTION)
- {
- mysql_mutex_lock(&LOCK_thread_count);
- thd->unlink();
- mysql_mutex_unlock(&LOCK_thread_count);
- delete thd;
- }
+ unlink_not_visible_thd(thd);
+ delete thd;
my_thread_end();
return(NULL);
@@ -2733,6 +2726,7 @@ void wsrep_unlock_rollback()
my_bool wsrep_aborting_thd_contains(THD *thd)
{
+ mysql_mutex_assert_owner(&LOCK_wsrep_rollback);
wsrep_aborting_thd_t abortees = wsrep_aborting_thd;
while (abortees)
{