diff options
-rw-r--r-- | libmysqld/lib_sql.cc | 2 | ||||
-rw-r--r-- | sql/mysqld.cc | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc index 7de1ecd6ef3..d15aedd39e6 100644 --- a/libmysqld/lib_sql.cc +++ b/libmysqld/lib_sql.cc @@ -47,6 +47,7 @@ extern "C" void unireg_clear(int exit_code) { DBUG_ENTER("unireg_clear"); clean_up(!opt_help && (exit_code || !opt_bootstrap)); /* purecov: inspected */ + clean_up_mutexes(); my_end(opt_endinfo ? MY_CHECK_ERROR | MY_GIVE_INFO : 0); DBUG_VOID_RETURN; } @@ -576,6 +577,7 @@ void end_embedded_server() my_free((char*) copy_arguments_ptr, MYF(MY_ALLOW_ZERO_PTR)); copy_arguments_ptr=0; clean_up(0); + clean_up_mutexes(); } diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 30ce99280a0..51ce881ee78 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -1464,6 +1464,7 @@ static void wait_for_signal_thread_to_end() #endif } +#endif /*EMBEDDED_LIBRARY*/ static void clean_up_mutexes() { @@ -1486,7 +1487,9 @@ static void clean_up_mutexes() (void) pthread_mutex_destroy(&LOCK_bytes_received); (void) pthread_mutex_destroy(&LOCK_user_conn); (void) pthread_mutex_destroy(&LOCK_connection_count); +#ifndef EMBEDDED_LIBRARY Events::destroy_mutexes(); +#endif #ifdef HAVE_OPENSSL (void) pthread_mutex_destroy(&LOCK_des_key_file); #ifndef HAVE_YASSL @@ -1518,8 +1521,6 @@ static void clean_up_mutexes() DBUG_VOID_RETURN; } -#endif /*EMBEDDED_LIBRARY*/ - /** Register order of mutex for wrong mutex deadlock detector @@ -8037,6 +8038,7 @@ static void usage(void) puts("\ Copyright (C) 2000-2008 MySQL AB, by Monty and others.\n\ Copyright (C) 2008 Sun Microsystems, Inc.\n\ +Copyright (C) 2009-2011 Monty Program Ab.\n\ This software comes with ABSOLUTELY NO WARRANTY. This is free software,\n\ and you are welcome to modify and redistribute it under the GPL license\n\n\ Starts the MySQL database server.\n"); |