From 3886c3a46dbad96e7374c71380126699dca89e54 Mon Sep 17 00:00:00 2001 From: Alexey Botchkov Date: Thu, 2 Sep 2010 23:37:04 +0500 Subject: Bug#53251 mysql_library_init fails on second execution with embedded library thread-specific variables weren't set when we load error message files. per-file comments: libmysqld/lib_sql.cc Bug#53251 mysql_library_init fails on second execution with embedded library we need to call my_thread_init() once more. Normally it's called at the my_init() stage but that doesn't happen on the second my_init() call. sql/derror.cc Bug#53251 mysql_library_init fails on second execution with embedded library use default errors for the embedded server. sql/mysqld.cc Bug#53251 mysql_library_init fails on second execution with embedded library unregister server errors in clean_up(). Without it the error list contains that on the second mysql_server_init() which is not good. sql/set_var.cc Bug#53251 mysql_library_init fails on second execution with embedded library sys_var::cleanup() call instead of the destructor sql/set_var.h Bug#53251 mysql_library_init fails on second execution with embedded library sys_var::cleanup() introduced instead of the destructor sql/sys_vars.h Bug#53251 mysql_library_init fails on second execution with embedded library Sys_var_charptr::cleanup() implemented --- libmysqld/lib_sql.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libmysqld') diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc index 94927c590cf..7d61dbc55f4 100644 --- a/libmysqld/lib_sql.cc +++ b/libmysqld/lib_sql.cc @@ -481,6 +481,10 @@ int init_embedded_server(int argc, char **argv, char **groups) char *fake_argv[] = { (char *)"", 0 }; const char *fake_groups[] = { "server", "embedded", 0 }; my_bool acl_error; + + if (my_thread_init()) + return 1; + if (argc) { argcp= &argc; -- cgit v1.2.1