Commit ea5d6776 authored by unknown's avatar unknown

BUG#7037 MySQL Bugs: #7037: Test "mysql_protocols" fails on Solaris 8 + 9 /x86


mysys/my_init.c:
  Changed implementation slightly to use a local variable for keeping track of wheter we should print to the info_file even if the flag is not set in infoflag
  Explicitly turn off print_info if there is no DBUG_FILE
parent 0aee9b2c
......@@ -127,11 +127,18 @@ my_bool my_init(void)
void my_end(int infoflag)
{
FILE *info_file;
if (!(info_file=DBUG_FILE))
info_file=stderr;
DBUG_PRINT("info",("Shutting down"));
if (infoflag & MY_CHECK_ERROR || info_file != stderr)
DBUG_ENTER("my_end");
FILE *info_file= DBUG_FILE;
bool print_info= (info_file != stderr);
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 */
if (my_file_opened | my_stream_opened)
{
......@@ -141,7 +148,8 @@ void my_end(int infoflag)
}
}
my_once_free();
if (infoflag & MY_GIVE_INFO || info_file != stderr)
if ((infoflag & MY_GIVE_INFO) || print_info)
{
#ifdef HAVE_GETRUSAGE
struct rusage rus;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment