diff options
author | Michael Widenius <monty@askmonty.org> | 2013-02-15 14:18:09 +0200 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2013-02-15 14:18:09 +0200 |
commit | 35bc8f9f4353b64da215e52ff6f1612a8ce66f43 (patch) | |
tree | c60d86f82cc2030f821508dd42e56ae56e7df371 /sql/mysqld.cc | |
parent | 036ef7fe44b86131b73614dc438090818e23298c (diff) | |
parent | a555ceb2fb75c9958e39c963ca2a83e615629711 (diff) | |
download | mariadb-git-35bc8f9f4353b64da215e52ff6f1612a8ce66f43.tar.gz |
Automatic merge
Diffstat (limited to 'sql/mysqld.cc')
-rw-r--r-- | sql/mysqld.cc | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/sql/mysqld.cc b/sql/mysqld.cc index b20e0423281..2607297f2c9 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -3654,6 +3654,14 @@ static int init_common_variables() umask(((~my_umask) & 0666)); my_decimal_set_zero(&decimal_zero); // set decimal_zero constant; + if (pthread_key_create(&THR_THD,NULL) || + pthread_key_create(&THR_MALLOC,NULL)) + { + sql_print_error("Can't create thread-keys"); + return 1; + } + + set_current_thd(0); set_malloc_size_cb(my_malloc_size_cb_func); tzset(); // Set tzname @@ -4200,12 +4208,6 @@ static int init_thread_environment() PTHREAD_CREATE_DETACHED); pthread_attr_setscope(&connection_attrib, PTHREAD_SCOPE_SYSTEM); - if (pthread_key_create(&THR_THD,NULL) || - pthread_key_create(&THR_MALLOC,NULL)) - { - sql_print_error("Can't create thread-keys"); - DBUG_RETURN(1); - } DBUG_RETURN(0); } |