diff options
author | Sergei Golubchik <sergii@pisem.net> | 2013-01-23 16:20:39 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2013-01-23 16:20:39 +0100 |
commit | c71fad9983b4a3c6e0d9e9eca02dadfd923ddbbb (patch) | |
tree | 76dbef3d7d96a3692039779f20f48938c260a5f1 /sql/mysqld.h | |
parent | 52051882002c1b88a427d50fb343a9ed3614ffe0 (diff) | |
download | mariadb-git-c71fad9983b4a3c6e0d9e9eca02dadfd923ddbbb.tar.gz |
cleanup:
* don't use 'myf flags', when 'my_bool is_thread_specific' is meant
* call set_malloc_size_cb() for embedded too
* warn in safemalloc if the memory is freed by a wrong thread
sql/mysqld.cc:
move set_malloc_size_cb() to a function that is also called for embedded
sql/mysqld.h:
gdb-friendly, one can put breakpoint on a function, but not on a macro
sql/sql_class.cc:
initialize thread_id earlier
Diffstat (limited to 'sql/mysqld.h')
-rw-r--r-- | sql/mysqld.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sql/mysqld.h b/sql/mysqld.h index e9c4f713182..520fa03bdbf 100644 --- a/sql/mysqld.h +++ b/sql/mysqld.h @@ -534,7 +534,10 @@ inline THD *_current_thd(void) } #endif #define current_thd _current_thd() -#define set_current_thd(X) my_pthread_setspecific_ptr(THR_THD, (X)) +inline int set_current_thd(THD *thd) +{ + return my_pthread_setspecific_ptr(THR_THD, thd); +} /* @todo remove, make it static in ha_maria.cc |