summaryrefslogtreecommitdiff
path: root/mysys/my_init.c
diff options
context:
space:
mode:
authorunknown <monty@mysql.com/nosik.monty.fi>2007-08-02 07:49:29 +0300
committerunknown <monty@mysql.com/nosik.monty.fi>2007-08-02 07:49:29 +0300
commitf9ea427508fa5451bd22c0d6366a855a4d88800d (patch)
tree7bd722b93e8b1ca257eabf112b7b9ad29446e595 /mysys/my_init.c
parent0c9a3e597d329c5475d4fec0a6f95ac87d65ca19 (diff)
downloadmariadb-git-f9ea427508fa5451bd22c0d6366a855a4d88800d.tar.gz
Set --debug-check if one uses DBUG_PUSH in all clients
Fixed bug in query cache that made it impossible to run mysqld with --debug Fixed memory leaks in mysqldump and mysqltest Memory leaks associated with wrong usage of mysqltest is not fixed. To find these, run mysql-test-run --debug mysqltest client/mysql_upgrade.c: Set --debug-check if one uses DBUG_PUSH client/mysqlcheck.c: Set --debug-check if one uses DBUG_PUSH client/mysqldump.c: Set --debug-check if one uses DBUG_PUSH Fixed several memory leaks client/mysqlimport.c: Set --debug-check if one uses DBUG_PUSH client/mysqlshow.c: Set --debug-check if one uses DBUG_PUSH client/mysqlslap.c: Set --debug-check if one uses DBUG_PUSH client/mysqltest.c: Set --debug-check if one uses DBUG_PUSH Fixed some memory leaks Removed MY_CHECK_ERROR argument to my_end() as mysqltest.test otherwise shows MANY memory leaks dbug/dbug.c: Fixed compiler warning Force flush of out_file on end Removed some wrong dbug_flush(0) commands that could cause crashes mysys/my_init.c: Don't write memory usage if MY_GIVE_INFO is not given sql/sql_cache.cc: Fixed bug in query cache that made it impossible to run mysqld with --debug
Diffstat (limited to 'mysys/my_init.c')
-rw-r--r--mysys/my_init.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/mysys/my_init.c b/mysys/my_init.c
index 127e94c958b..257edb351b4 100644
--- a/mysys/my_init.c
+++ b/mysys/my_init.c
@@ -134,14 +134,14 @@ void my_end(int infoflag)
We do not use DBUG_ENTER here, as after cleanup DBUG is no longer
operational, so we cannot use DBUG_RETURN.
*/
- DBUG_PRINT("info",("Shutting down"));
+ DBUG_PRINT("info",("Shutting down: infoflag: %d print_info: %d",
+ infoflag, print_info));
if (!info_file)
{
info_file= stderr;
print_info= 0;
}
- DBUG_PRINT("info",("Shutting down: print_info: %d", print_info));
if ((infoflag & MY_CHECK_ERROR) || print_info)
{ /* Test if some file is left open */
@@ -186,7 +186,7 @@ Voluntary context switches %ld, Involuntary context switches %ld\n",
fprintf(info_file,"\nRun time: %.1f\n",(double) clock()/CLOCKS_PER_SEC);
#endif
#if defined(SAFEMALLOC)
- TERMINATE(stderr, 1); /* Give statistic on screen */
+ TERMINATE(stderr, (infoflag & MY_GIVE_INFO) != 0);
#elif defined(__WIN__) && defined(_MSC_VER)
_CrtSetReportMode( _CRT_WARN, _CRTDBG_MODE_FILE );
_CrtSetReportFile( _CRT_WARN, _CRTDBG_FILE_STDERR );