From 44a43fce68b4ad0766b606a4293e7ac05e0c3ccc Mon Sep 17 00:00:00 2001 From: "heikki@hundin.mysql.fi" <> Date: Tue, 10 Sep 2002 00:52:26 +0300 Subject: [PATCH] ha_innobase.cc, ha_innobase.h: innodb_flush_log_at_trx_commit can have values 0, 1, 2 starting from 3.23.52 --- sql/ha_innobase.cc | 9 ++++++++- sql/ha_innobase.h | 3 ++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/sql/ha_innobase.cc b/sql/ha_innobase.cc index 7beecda0f3d..b27f033ff1c 100644 --- a/sql/ha_innobase.cc +++ b/sql/ha_innobase.cc @@ -103,11 +103,18 @@ char* innobase_unix_file_flush_method = NULL; /* Below we have boolean-valued start-up parameters, and their default values */ -my_bool innobase_flush_log_at_trx_commit = FALSE; my_bool innobase_log_archive = FALSE; my_bool innobase_use_native_aio = FALSE; my_bool innobase_fast_shutdown = TRUE; +/* innodb_flush_log_at_trx_commit can now have 3 values: +0 : write to the log file once per second and flush it to disk; +1 : write to the log file at each commit and flush it to disk; +2 : write to the log file at each commit, but flush to disk only once per +second */ + +int innobase_flush_log_at_trx_commit = 0; + /* The following counter is used to convey information to InnoDB about server activity: in selects it is not sensible to call srv_active_wake_master_thread after each fetch or search, we only do diff --git a/sql/ha_innobase.h b/sql/ha_innobase.h index 2804280575c..d0804707842 100644 --- a/sql/ha_innobase.h +++ b/sql/ha_innobase.h @@ -176,8 +176,9 @@ extern long innobase_force_recovery, innobase_thread_concurrency; extern char *innobase_data_home_dir, *innobase_data_file_path; extern char *innobase_log_group_home_dir, *innobase_log_arch_dir; extern char *innobase_unix_file_flush_method; +extern int innobase_flush_log_at_trx_commit; /* The following variables have to be my_bool for SHOW VARIABLES to work */ -extern my_bool innobase_flush_log_at_trx_commit, innobase_log_archive, +extern my_bool innobase_log_archive, innobase_use_native_aio, innobase_fast_shutdown; extern TYPELIB innobase_lock_typelib;