diff options
author | unknown <sasha@mysql.sashanet.com> | 2002-03-26 22:19:23 -0700 |
---|---|---|
committer | unknown <sasha@mysql.sashanet.com> | 2002-03-26 22:19:23 -0700 |
commit | 079a551ca735e79f3d7a2ebbecf8be4d4ba7608a (patch) | |
tree | ab4d73690dcb8e3ef54e70015f1838cf17a2577a /include | |
parent | 9c435716a9773f78cd5db0a992bd4b89b83bc25a (diff) | |
download | mariadb-git-079a551ca735e79f3d7a2ebbecf8be4d4ba7608a.tar.gz |
coverted my_thread_init() /end to use my_malloc()/my_free() to help track
down replication corruption
dbug/dbug.c:
fixed DBUG_ macros to not crash if my_thread_init() had not been called
include/my_sys.h:
keep track of shutdown, main, and signal threads for safemalloc
mysys/my_static.h:
keep track of thread in safemalloc blocks
mysys/my_thr_init.c:
use my_malloc()/my_free() in my_thread_init()
mysys/safemalloc.c:
keep track of threads
do not fuss if main,signal, or shutdown thread still has allocated blocks
when we call TERMINATE() as some blocks are freed later and there is no
easy way to make TERMINATE() wait for those threads
sql/mysqld.cc:
keep track of signal, main, and shutdown threads
Diffstat (limited to 'include')
-rw-r--r-- | include/my_sys.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/my_sys.h b/include/my_sys.h index 4aee27e2939..3950bfce758 100644 --- a/include/my_sys.h +++ b/include/my_sys.h @@ -137,6 +137,10 @@ extern int NEAR my_errno; /* Last error in mysys */ #define NORMAL_SAFEMALLOC sf_malloc_quick=0 extern uint sf_malloc_prehunc,sf_malloc_endhunc,sf_malloc_quick; extern ulonglong safemalloc_mem_limit; +/* keep track of shutdown,signal, and main threads so that my_end() will not + report errors with them +*/ +extern pthread_t shutdown_th, main_th,signal_th; #define CALLER_INFO_PROTO , const char *sFile, uint uLine #define CALLER_INFO , __FILE__, __LINE__ #define ORIG_CALLER_INFO , sFile, uLine |