summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authormarko@hundin.mysql.fi <>2004-05-05 11:50:58 +0300
committermarko@hundin.mysql.fi <>2004-05-05 11:50:58 +0300
commitfc7ae6a222e6d27a7e5715629c98196eb0bb8e8e (patch)
tree741690b563d8e68e53ba72aceb073ce10cf54de4 /sql
parent09fc359480135997b0a5ea831d42ab7497f129be (diff)
downloadmariadb-git-fc7ae6a222e6d27a7e5715629c98196eb0bb8e8e.tar.gz
InnoDB: Truncate "<datadir>/innodb.status.<pid>" to its actual size
(Bug #3596)
Diffstat (limited to 'sql')
-rw-r--r--sql/ha_innodb.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc
index de2a817a6cb..b309bf2c1a6 100644
--- a/sql/ha_innodb.cc
+++ b/sql/ha_innodb.cc
@@ -4648,6 +4648,11 @@ innodb_show_status(
rewind(srv_monitor_file);
srv_printf_innodb_monitor(srv_monitor_file);
flen = ftell(srv_monitor_file);
+#ifdef __WIN__
+ chsize(fileno(srv_monitor_file), flen);
+#else /* __WIN__ */
+ ftruncate(fileno(srv_monitor_file), flen);
+#endif /* __WIN__ */
if(flen > 64000 - 1) {
flen = 64000 - 1;
}