summaryrefslogtreecommitdiff
path: root/innobase/srv
diff options
context:
space:
mode:
authorunknown <marko@hundin.mysql.fi>2004-05-05 11:50:58 +0300
committerunknown <marko@hundin.mysql.fi>2004-05-05 11:50:58 +0300
commitb33f8fa7789ae662cf2e1b8e6c07056f901e0df5 (patch)
tree741690b563d8e68e53ba72aceb073ce10cf54de4 /innobase/srv
parentf44fb5fd894180a8ed28f921bfd62f6cf87dbf90 (diff)
downloadmariadb-git-b33f8fa7789ae662cf2e1b8e6c07056f901e0df5.tar.gz
InnoDB: Truncate "<datadir>/innodb.status.<pid>" to its actual size
(Bug #3596) innobase/srv/srv0srv.c: Truncate "<datadir>/innodb.status.<pid>" to its actual size (Bug #3596) sql/ha_innodb.cc: Truncate "<datadir>/innodb.status.<pid>" to its actual size (Bug #3596)
Diffstat (limited to 'innobase/srv')
-rw-r--r--innobase/srv/srv0srv.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/innobase/srv/srv0srv.c b/innobase/srv/srv0srv.c
index cee6dec850e..76197fd8fe0 100644
--- a/innobase/srv/srv0srv.c
+++ b/innobase/srv/srv0srv.c
@@ -1609,6 +1609,11 @@ loop:
mutex_enter(&srv_monitor_file_mutex);
rewind(srv_monitor_file);
srv_printf_innodb_monitor(srv_monitor_file);
+#ifdef __WIN__
+ chsize(fileno(srv_monitor_file), ftell(srv_monitor_file));
+#else /* __WIN__ */
+ ftruncate(fileno(srv_monitor_file), ftell(srv_monitor_file));
+#endif /* __WIN__ */
mutex_exit(&srv_monitor_file_mutex);
if (srv_print_innodb_tablespace_monitor