diff options
author | unknown <marko@hundin.mysql.fi> | 2004-05-05 11:50:58 +0300 |
---|---|---|
committer | unknown <marko@hundin.mysql.fi> | 2004-05-05 11:50:58 +0300 |
commit | b33f8fa7789ae662cf2e1b8e6c07056f901e0df5 (patch) | |
tree | 741690b563d8e68e53ba72aceb073ce10cf54de4 /innobase/srv | |
parent | f44fb5fd894180a8ed28f921bfd62f6cf87dbf90 (diff) | |
download | mariadb-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.c | 5 |
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 |