From 58b4818a09d29d6498a94c349ed57c7c49f0f489 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Wed, 26 Jan 2011 14:16:13 +0100 Subject: fix "./configure --with-debug" builds (without CFLAGS=-DSAFEMALLOC). --- mysys/safemalloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mysys/safemalloc.c') diff --git a/mysys/safemalloc.c b/mysys/safemalloc.c index 0d0ae2dabe5..16489ccc022 100644 --- a/mysys/safemalloc.c +++ b/mysys/safemalloc.c @@ -60,7 +60,7 @@ */ #ifndef SAFEMALLOC -#define SAFEMALLOC /* Get protos from my_sys */ +#define SAFEMALLOC 1 /* Get protos from my_sys */ #endif #include "mysys_priv.h" -- cgit v1.2.1 From 28f5cc60806c4d51838c7337e0b82ed71fd3accc Mon Sep 17 00:00:00 2001 From: Michael Widenius Date: Thu, 24 Feb 2011 02:36:32 +0200 Subject: - Reduced memory requirements for mysqltest to 1/4.th This also gave a speedup for 5x for some tests. - Reduced memory usage from safe_mutex. - Fixed problem with failing tests that could not restart mysqld becasue the port was reserved - More DBUG information - Fixed bug where bitmap_set_prefix() wrote over buffer area. - Initialize n_pages_flushed in xtradb which was used uninitialized. client/mysqltest.cc: Reduced memory usage (400K -> 80 for simple test; 400M -> 70M for some other tests) - Smaller dynamic arrays at start - Made 'st_connection' significantly smaller by allocation 'mysql' on demand in mysql_init() and storing require_file in a mem_root. - Fixed that when one does --debug we get information from safemalloc in the trace (Most of changes are changing &connect->mysql to connect->mysql libmysql/libmysql.c: Don't call mysql_thread_end() if my_init() was called outside of mysql_server_init() This is needed to get information from my_end() into the DBUG log mysql-test/README: Fixed wrong comment mysql-test/mysql-test-run.pl: Reserv 20 ports / mysql-test-run thread. (Needed as some tests uses 9 mysqld servers) mysys/hash.c: More DBUG information mysys/my_bitmap.c: Fixed bug where bitmap_set_prefix() wrote over buffer area. mysys/safemalloc.c: More DBUG information mysys/thr_mutex.c: Initialize smaller arrays be default. sql-common/client.c: More DBUG_PRINT storage/xtradb/srv/srv0srv.c: Initialize n_pages_flushed which was used uninitialized. --- mysys/safemalloc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'mysys/safemalloc.c') diff --git a/mysys/safemalloc.c b/mysys/safemalloc.c index 16489ccc022..7067ebbe843 100644 --- a/mysys/safemalloc.c +++ b/mysys/safemalloc.c @@ -124,7 +124,8 @@ void *_mymalloc(size_t size, const char *filename, uint lineno, myf MyFlags) struct st_irem *irem; uchar *data; DBUG_ENTER("_mymalloc"); - DBUG_PRINT("enter",("Size: %lu", (ulong) size)); + DBUG_PRINT("enter",("Size: %lu Total alloc: %lu", (ulong) size, + sf_malloc_cur_memory)); if (!sf_malloc_quick) (void) _sanity (filename, lineno); @@ -316,6 +317,7 @@ void _myfree(void *ptr, const char *filename, uint lineno, myf myflags) sf_malloc_cur_memory-= irem->datasize; sf_malloc_count--; pthread_mutex_unlock(&THR_LOCK_malloc); + DBUG_PRINT("info", ("bytes freed: %ld", irem->datasize)); #ifndef HAVE_valgrind /* Mark this data as free'ed */ -- cgit v1.2.1 From 5db836791424dfe3a9848a6354c64ccdf770a82d Mon Sep 17 00:00:00 2001 From: Michael Widenius Date: Fri, 25 Feb 2011 14:55:40 +0200 Subject: - maria/ma_test_all.sh can now be run with --tmpdir=/dev/shm for faster testing - Fixed mysql-test-run failures on window - Fixed compiler warnings from my last push (sorry about that) - Fixed that maria_chk --repair --extended works again - Fixed compiler warnings about using not unitialized data mysql-test/mysql-test-run.pl: Better output mysql-test/suite/parts/inc/partition_check_drop.inc: Use remove_files_wildcard instead of rm mysys/safemalloc.c: Fixed argument to printf storage/maria/ma_cache.c: Don't give errors when running maria_chk storage/maria/ma_dynrec.c: Don't give errors when running maria_chk storage/maria/ma_rt_test.c: Added option --datadir for where to put logs and test data storage/maria/ma_test1.c: Added option --datadir for where to put logs and test data storage/maria/ma_test2.c: Added option --datadir for where to put logs and test data storage/maria/maria_chk.c: If --datadir is used but --logdir is not, set --logdir from --datadir (this reflects how --help said how things should work) storage/maria/maria_read_log.c: Changed short option for 'maria-log-dir-path' from -l to -h to be same as mysqld, maria_chk, ma_test1 etc.. storage/maria/unittest/ma_test_all-t: Allow one to specify --tmpdir for where to store logs and data storage/xtradb/buf/buf0buf.c: Fixed compiler warnings about using not unitialized data storage/xtradb/row/row0upd.c: Fixed compiler warnings about using not unitialized data storage/xtradb/srv/srv0srv.c: Fixed compiler warnings about using not unitialized data --- mysys/safemalloc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mysys/safemalloc.c') diff --git a/mysys/safemalloc.c b/mysys/safemalloc.c index 7067ebbe843..2a61b8edede 100644 --- a/mysys/safemalloc.c +++ b/mysys/safemalloc.c @@ -125,7 +125,7 @@ void *_mymalloc(size_t size, const char *filename, uint lineno, myf MyFlags) uchar *data; DBUG_ENTER("_mymalloc"); DBUG_PRINT("enter",("Size: %lu Total alloc: %lu", (ulong) size, - sf_malloc_cur_memory)); + (ulong) sf_malloc_cur_memory)); if (!sf_malloc_quick) (void) _sanity (filename, lineno); @@ -317,7 +317,7 @@ void _myfree(void *ptr, const char *filename, uint lineno, myf myflags) sf_malloc_cur_memory-= irem->datasize; sf_malloc_count--; pthread_mutex_unlock(&THR_LOCK_malloc); - DBUG_PRINT("info", ("bytes freed: %ld", irem->datasize)); + DBUG_PRINT("info", ("bytes freed: %ld", (ulong) irem->datasize)); #ifndef HAVE_valgrind /* Mark this data as free'ed */ -- cgit v1.2.1