summaryrefslogtreecommitdiff
path: root/include/my_sys.h
diff options
context:
space:
mode:
authorunknown <knielsen@mysql.com>2006-05-15 18:07:18 +0200
committerunknown <knielsen@mysql.com>2006-05-15 18:07:18 +0200
commita046322b4e61aaef3db9efc9e85477792085c453 (patch)
treec90b581837f256bc8b3e0cb47cafcb159c99a19f /include/my_sys.h
parent0a22763fa621e0d376e3e72febe2ad5df008a202 (diff)
downloadmariadb-git-a046322b4e61aaef3db9efc9e85477792085c453.tar.gz
Fix two Valgrind memory leak warnings.
client/mysqlbinlog.cc: Now my_end() deallocates DBUG by default, but that fails in mysqlbinlog because of global destructors that use DBUG. dbug/dbug.c: Add a facility to deallocate the debug stack, to avoid memory leak warnings in Valgrind. include/my_dbug.h: Add a facility to deallocate the debug stack, to avoid memory leak warnings in Valgrind. include/my_sys.h: Change my_end() to deallocate DBUG memory by default (can be disabled with MY_DONT_FREE_DBUG option). libmysql/libmysql.c: Do not deallocate DBUG during cleanup. mysys/my_init.c: Change my_end() to deallocate DBUG memory by default (can be disabled with MY_DONT_FREE_DBUG option). sql/mysqld.cc: Add missing my_thread_end() call, seems to occasionally trigger a memory leak (not repeatable).
Diffstat (limited to 'include/my_sys.h')
-rw-r--r--include/my_sys.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/my_sys.h b/include/my_sys.h
index 44fe383bf4f..d857eca1ef4 100644
--- a/include/my_sys.h
+++ b/include/my_sys.h
@@ -75,6 +75,7 @@ extern int NEAR my_errno; /* Last error in mysys */
#define MY_CHECK_ERROR 1 /* Params to my_end; Check open-close */
#define MY_GIVE_INFO 2 /* Give time info about process*/
+#define MY_DONT_FREE_DBUG 4 /* Do not call DBUG_END() in my_end() */
#define ME_HIGHBYTE 8 /* Shift for colours */
#define ME_NOCUR 1 /* Don't use curses message */