MDEV-734: LP:917662 - mysql_print_status() missing final fflush()

Patch from 5.6 by Praveenkumar Hulakund
Bug#13608112 - 64048: MYSQL_PRINT_STATUS() MISSING FINAL FFLUSH()
  
  Analysis:
  While printing debug information, memory related information and event
  related information were written to buffer after flushing it. Because of this,
  these information were getting printed when we do the next flush.
  
  Fix:
  Instead of calling fflush() before writing memory and event
  information, calling it after memory and event information.
This commit is contained in:
Michael Widenius 2014-03-22 12:32:36 +02:00 committed by Michael Widenius
parent dca4b91507
commit 797a44a9ec

View File

@ -615,7 +615,6 @@ Next alarm time: %lu\n",
(ulong)alarm_info.next_alarm_time);
#endif
display_table_locks();
fflush(stdout);
#ifdef HAVE_MALLINFO
struct mallinfo info= mallinfo();
printf("\nMemory status:\n\
@ -647,4 +646,5 @@ Estimated memory (with thread stack): %ld\n",
Events::dump_internal_status();
#endif
puts("");
fflush(stdout);
}