1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

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
This commit is contained in:
unknown
2002-03-26 22:19:23 -07:00
parent 9c435716a9
commit 079a551ca7
6 changed files with 156 additions and 14 deletions

View File

@ -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