1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Fixes Bug#30127: --debug-info no longer prints memory usage in mysql

Fixed compiler warnings, errors and link errors
Fixed new bug on Solaris with gethrtime()
Added --debug-check option to all mysql clients to print errors and memory leaks
Added --debug-info to all clients. This now works as --debug-check but also prints memory and cpu usage
This commit is contained in:
monty@mysql.com/nosik.monty.fi
2007-08-01 22:59:05 +03:00
parent b16289a5e0
commit 96f90711a7
24 changed files with 245 additions and 127 deletions

View File

@ -130,8 +130,9 @@ void my_end(int infoflag)
*/
FILE *info_file= DBUG_FILE;
my_bool print_info= (info_file != stderr);
/* We do not use DBUG_ENTER here, as after cleanup DBUG is no longer
operational, so we cannot use DBUG_RETURN.
/*
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"));
if (!info_file)
@ -185,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); /* Give statistic on screen */
TERMINATE(stderr, 1); /* Give statistic on screen */
#elif defined(__WIN__) && defined(_MSC_VER)
_CrtSetReportMode( _CRT_WARN, _CRTDBG_MODE_FILE );
_CrtSetReportFile( _CRT_WARN, _CRTDBG_FILE_STDERR );
@ -197,6 +198,10 @@ Voluntary context switches %ld, Involuntary context switches %ld\n",
_CrtDumpMemoryLeaks();
#endif
}
else if (infoflag & MY_CHECK_ERROR)
{
TERMINATE(stderr, 0); /* Print memory leaks on screen */
}
if (!(infoflag & MY_DONT_FREE_DBUG))
{