From 4ed427921d9614b9d9a0ded478fc5e42128f6bf0 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 17 Aug 2002 05:18:06 +0300 Subject: Fixed bug in SAFEMALLOC for systems that requires longlong data to be aligned on 8 byte boundaries (like sparc) Removed thread marking of safemalloc blocks (becasue of alignment problems) Temporary fix for bigint comparison. configure.in: Added size checking of char* BitKeeper/etc/ignore: Added sql-bench/innotest1 sql-bench/innotest1a sql-bench/innotest1b sql-bench/innotest2 sql-bench/innotest2a sql-bench/innotest2b to the ignore list mysql-test/r/select.result: Cleaned up test mysql-test/t/select.test: Cleaned up test mysys/my_static.h: Fixed bug in SAFEMALLOC for systems that requires longlong data to be aligned on 8 byte boundaries (like sparc) mysys/safemalloc.c: Fixed bug in SAFEMALLOC for systems that requires longlong data to be aligned on 8 byte boundaries (like sparc) sql/field.h: Temporary fix for bigint comparison. sql/gen_lex_hash.cc: Smaller hash table sql/item_cmpfunc.cc: Cleanup sql/mysqld.cc: Removed thread marking of safemalloc blocks (becasue of alignment problems) sql/opt_range.cc: Comment --- mysys/my_static.h | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) (limited to 'mysys/my_static.h') diff --git a/mysys/my_static.h b/mysys/my_static.h index 8360728b057..10b2e0fc2d2 100644 --- a/mysys/my_static.h +++ b/mysys/my_static.h @@ -32,16 +32,22 @@ struct st_remember { sig_handler (*func)(int number); }; -struct irem { - struct remember *_pNext; /* Linked list of structures */ - struct remember *_pPrev; /* Other link */ - my_string _sFileName; /* File in which memory was new'ed */ - uint _uLineNum; /* Line number in above file */ - uint _uDataSize; /* Size requested */ -#ifdef THREAD - pthread_t thread_id; +/* + The size of the following structure MUST be dividable by 8 to not cause + alignment problems on some cpu's +*/ + +struct irem +{ + struct remember *_pNext; /* Linked list of structures */ + struct remember *_pPrev; /* Other link */ + char *_sFileName; /* File in which memory was new'ed */ + uint32 _uLineNum; /* Line number in above file */ + uint32 _uDataSize; /* Size requested */ +#if SIZEOF_CHARP == 8 + long _filler; /* For alignment */ #endif - long _lSpecialValue; /* Underrun marker value */ + long _lSpecialValue; /* Underrun marker value */ }; struct remember { @@ -59,14 +65,6 @@ extern const char *soundex_map; extern USED_MEM* my_once_root_block; extern uint my_once_extra; -#ifdef THREAD -/* - These threads are exempt from safemalloc leak scrutiny unless - PEDANTIC_SAFEMALLOC is defined -*/ -extern pthread_t signal_th, kill_th, main_th; -#endif - #ifndef HAVE_TEMPNAM extern int _my_tempnam_used; #endif -- cgit v1.2.1