diff options
author | Sergei Golubchik <sergii@pisem.net> | 2011-11-27 17:50:08 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2011-11-27 17:50:08 +0100 |
commit | dfc1901e806bdda129b8943585f2ccfc8c207322 (patch) | |
tree | 5f04d49beb42adafd5fb860d62831e5f3b3c643d /mysys/my_thr_init.c | |
parent | effed09bd7d8081704eaa017060da84c32e3bf29 (diff) | |
download | mariadb-git-dfc1901e806bdda129b8943585f2ccfc8c207322.tar.gz |
compilation fixes
cmake/maintainer.cmake:
don't do -Werror just yet
config.h.cmake:
according to MSDN PSAPI_VERSION should be 1 in a portable application
mysys/my_thr_init.c:
first, reset THR_KEY_mysys, and then free dbug data,
because dbug data are automacially created on the next dbug call,
unless THR_KEY_mysys is null.
Diffstat (limited to 'mysys/my_thr_init.c')
-rw-r--r-- | mysys/my_thr_init.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/mysys/my_thr_init.c b/mysys/my_thr_init.c index ee9bc91e910..e2e03cc37a8 100644 --- a/mysys/my_thr_init.c +++ b/mysys/my_thr_init.c @@ -355,13 +355,16 @@ void my_thread_end(void) PSI_server->delete_current_thread(); #endif + DBUG_POP(); + + pthread_setspecific(THR_KEY_mysys,0); + if (tmp && tmp->init) { #if !defined(DBUG_OFF) /* tmp->dbug is allocated inside DBUG library */ if (tmp->dbug) { - DBUG_POP(); free(tmp->dbug); tmp->dbug=0; } @@ -384,7 +387,6 @@ void my_thread_end(void) TRASH(tmp, sizeof(*tmp)); free(tmp); } - pthread_setspecific(THR_KEY_mysys,0); } struct st_my_thread_var *_my_thread_var(void) |