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) ...@@ -127,11 +127,18 @@ my_bool my_init(void)
void my_end(int infoflag) void my_end(int infoflag)
{ {
FILE *info_file; DBUG_ENTER("my_end");
if (!(info_file=DBUG_FILE)) FILE *info_file= DBUG_FILE;
info_file=stderr; bool print_info= (info_file != stderr);
DBUG_PRINT("info",("Shutting down")); if (!info_file)
if (infoflag & MY_CHECK_ERROR || info_file != stderr) {
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 */ { /* Test if some file is left open */
if (my_file_opened | my_stream_opened) if (my_file_opened | my_stream_opened)
{ {
...@@ -141,7 +148,8 @@ void my_end(int infoflag) ...@@ -141,7 +148,8 @@ void my_end(int infoflag)
} }
} }
my_once_free(); my_once_free();
if (infoflag & MY_GIVE_INFO || info_file != stderr)
if ((infoflag & MY_GIVE_INFO) || print_info)
{ {
#ifdef HAVE_GETRUSAGE #ifdef HAVE_GETRUSAGE
struct rusage rus; 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