summaryrefslogtreecommitdiff
path: root/innobase/srv/srv0srv.c
diff options
context:
space:
mode:
authorunknown <marko@hundin.mysql.fi>2004-11-26 13:16:37 +0200
committerunknown <marko@hundin.mysql.fi>2004-11-26 13:16:37 +0200
commit59abcd447cc373c1c3dfc0184f12642aa6d2ab70 (patch)
tree408bf97aec240e747d37b19783b8294796faf9bb /innobase/srv/srv0srv.c
parent60af920628c435a5990c3ef7a753d0f374fc12cc (diff)
downloadmariadb-git-59abcd447cc373c1c3dfc0184f12642aa6d2ab70.tar.gz
srv0srv.c:
srv_lock_timeout_and_monitor_thread(): write to srv_monitor_file only if --innodb_status_file=1 innobase/srv/srv0srv.c: srv_lock_timeout_and_monitor_thread(): write to srv_monitor_file only if --innodb_status_file=1
Diffstat (limited to 'innobase/srv/srv0srv.c')
-rw-r--r--innobase/srv/srv0srv.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/innobase/srv/srv0srv.c b/innobase/srv/srv0srv.c
index 0a814268a36..99a2db57d79 100644
--- a/innobase/srv/srv0srv.c
+++ b/innobase/srv/srv0srv.c
@@ -1617,11 +1617,13 @@ loop:
srv_printf_innodb_monitor(stderr);
}
- mutex_enter(&srv_monitor_file_mutex);
- rewind(srv_monitor_file);
- srv_printf_innodb_monitor(srv_monitor_file);
- os_file_set_eof(srv_monitor_file);
- mutex_exit(&srv_monitor_file_mutex);
+ if (srv_innodb_status) {
+ mutex_enter(&srv_monitor_file_mutex);
+ rewind(srv_monitor_file);
+ srv_printf_innodb_monitor(srv_monitor_file);
+ os_file_set_eof(srv_monitor_file);
+ mutex_exit(&srv_monitor_file_mutex);
+ }
if (srv_print_innodb_tablespace_monitor
&& difftime(current_time, last_table_monitor_time) > 60) {