summaryrefslogtreecommitdiff
path: root/sql/mysqld.h
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2013-01-23 16:20:39 +0100
committerSergei Golubchik <sergii@pisem.net>2013-01-23 16:20:39 +0100
commitc71fad9983b4a3c6e0d9e9eca02dadfd923ddbbb (patch)
tree76dbef3d7d96a3692039779f20f48938c260a5f1 /sql/mysqld.h
parent52051882002c1b88a427d50fb343a9ed3614ffe0 (diff)
downloadmariadb-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.h5
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