Commit ea5d6776 authored by unknown's avatar unknown
Browse files

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
Loading
Loading
Loading
Loading
+14 −6
Original line number Diff line number Diff line
@@ -127,11 +127,18 @@ my_bool my_init(void)

void my_end(int infoflag)
{
  FILE *info_file;
  if (!(info_file=DBUG_FILE))
  DBUG_ENTER("my_end");
  FILE *info_file= DBUG_FILE;
  bool print_info= (info_file != stderr);
  if (!info_file)
  {
    info_file= stderr;
  DBUG_PRINT("info",("Shutting down"));
  if (infoflag & MY_CHECK_ERROR || 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;