diff options
Diffstat (limited to 'sql')
-rw-r--r-- | sql/mysqld.cc | 15 | ||||
-rw-r--r-- | sql/slave.cc | 11 | ||||
-rw-r--r-- | sql/sp_head.cc | 1 |
3 files changed, 25 insertions, 2 deletions
diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 50f19c15fc4..a306ec392ed 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -934,7 +934,20 @@ void kill_mysql(void) DBUG_VOID_RETURN; } - /* Force server down. kill all connections and threads and exit */ +/* + Force server down. Kill all connections and threads and exit + + SYNOPSIS + kill_server + + sig_ptr Signal number that caused kill_server to be called. + + NOTE! + A signal number of 0 mean that the function was not called + from a signal handler and there is thus no signal to block + or stop, we just want to kill the server. + +*/ #if defined(OS2) || defined(__NETWARE__) extern "C" void kill_server(int sig_ptr) diff --git a/sql/slave.cc b/sql/slave.cc index fa7ccc4427d..caeefc1ad3c 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -3949,10 +3949,19 @@ the slave SQL thread with \"SLAVE START\". We stopped at log \ delete thd; pthread_mutex_unlock(&LOCK_thread_count); pthread_cond_broadcast(&rli->stop_cond); + +#ifndef DBUG_OFF + /* + Bug #19938 Valgrind error (race) in handle_slave_sql() + Read the value of rli->event_till_abort before releasing the mutex + */ + const int eta= rli->events_till_abort; +#endif + // tell the world we are done pthread_mutex_unlock(&rli->run_lock); #ifndef DBUG_OFF // TODO: reconsider the code below - if (abort_slave_event_count && !rli->events_till_abort) + if (abort_slave_event_count && !eta) goto slave_begin; #endif my_thread_end(); diff --git a/sql/sp_head.cc b/sql/sp_head.cc index 174f62c9497..3b29a841966 100644 --- a/sql/sp_head.cc +++ b/sql/sp_head.cc @@ -247,6 +247,7 @@ sp_get_flags_for_command(LEX *lex) case SQLCOM_TRUNCATE: case SQLCOM_COMMIT: case SQLCOM_ROLLBACK: + case SQLCOM_LOAD: case SQLCOM_LOAD_MASTER_DATA: case SQLCOM_LOCK_TABLES: case SQLCOM_CREATE_PROCEDURE: |