summaryrefslogtreecommitdiff
path: root/sql/sql_test.cc
diff options
context:
space:
mode:
authorMichael Widenius <monty@mariadb.org>2014-03-22 12:32:36 +0200
committerMichael Widenius <monty@askmonty.org>2014-03-22 12:32:36 +0200
commit797a44a9ec5a601a4745b9520c2dea321f96d155 (patch)
tree31484fd5ef941fb4b373ef5d9f171426c3e17c74 /sql/sql_test.cc
parentdca4b915079b0dcc2ae216642c27667225ada55e (diff)
downloadmariadb-git-797a44a9ec5a601a4745b9520c2dea321f96d155.tar.gz
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.
Diffstat (limited to 'sql/sql_test.cc')
-rw-r--r--sql/sql_test.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_test.cc b/sql/sql_test.cc
index c64a5d182a5..ae16a281277 100644
--- a/sql/sql_test.cc
+++ b/sql/sql_test.cc
@@ -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);
}