Commit 8b848f3e authored by Zardosht Kasheff's avatar Zardosht Kasheff Committed by Yoni Fogel

closes #5955, fix ticket

git-svn-id: file:///svn/mysql/tokudb-engine/tokudb-engine@53733 c7de825b-a66e-492c-adef-691d508d4ae1
parent 542b13d9
...@@ -285,6 +285,7 @@ static uint32_t tokudb_env_flags = 0; ...@@ -285,6 +285,7 @@ static uint32_t tokudb_env_flags = 0;
// static ulong tokudb_log_buffer_size = 0; // static ulong tokudb_log_buffer_size = 0;
// static ulong tokudb_log_file_size = 0; // static ulong tokudb_log_file_size = 0;
static my_bool tokudb_directio = FALSE; static my_bool tokudb_directio = FALSE;
static my_bool tokudb_checkpoint_on_flush_logs = FALSE;
static ulonglong tokudb_cache_size = 0; static ulonglong tokudb_cache_size = 0;
static ulonglong tokudb_max_lock_memory = 0; static ulonglong tokudb_max_lock_memory = 0;
static char *tokudb_home; static char *tokudb_home;
...@@ -643,6 +644,7 @@ bool tokudb_flush_logs(handlerton * hton) { ...@@ -643,6 +644,7 @@ bool tokudb_flush_logs(handlerton * hton) {
int error; int error;
bool result = 0; bool result = 0;
if (tokudb_checkpoint_on_flush_logs) {
// //
// take the checkpoint // take the checkpoint
// //
...@@ -652,6 +654,11 @@ bool tokudb_flush_logs(handlerton * hton) { ...@@ -652,6 +654,11 @@ bool tokudb_flush_logs(handlerton * hton) {
result = 1; result = 1;
goto exit; goto exit;
} }
}
else {
error = db_env->log_flush(db_env, NULL);
assert(error == 0);
}
result = 0; result = 0;
exit: exit:
...@@ -1855,6 +1862,10 @@ static MYSQL_SYSVAR_BOOL(directio, tokudb_directio, ...@@ -1855,6 +1862,10 @@ static MYSQL_SYSVAR_BOOL(directio, tokudb_directio,
PLUGIN_VAR_READONLY, PLUGIN_VAR_READONLY,
"TokuDB Enable Direct I/O ", "TokuDB Enable Direct I/O ",
NULL, NULL, FALSE); NULL, NULL, FALSE);
static MYSQL_SYSVAR_BOOL(checkpoint_on_flush_logs, tokudb_checkpoint_on_flush_logs,
0,
"TokuDB Checkpoint on Flush Logs ",
NULL, NULL, FALSE);
static MYSQL_SYSVAR_ULONG(cleaner_iterations, tokudb_cleaner_iterations, static MYSQL_SYSVAR_ULONG(cleaner_iterations, tokudb_cleaner_iterations,
0, "TokuDB cleaner_iterations", 0, "TokuDB cleaner_iterations",
...@@ -1915,6 +1926,7 @@ static struct st_mysql_sys_var *tokudb_system_variables[] = { ...@@ -1915,6 +1926,7 @@ static struct st_mysql_sys_var *tokudb_system_variables[] = {
MYSQL_SYSVAR(read_buf_size), MYSQL_SYSVAR(read_buf_size),
MYSQL_SYSVAR(row_format), MYSQL_SYSVAR(row_format),
MYSQL_SYSVAR(directio), MYSQL_SYSVAR(directio),
MYSQL_SYSVAR(checkpoint_on_flush_logs),
#if TOKU_INCLUDE_UPSERT #if TOKU_INCLUDE_UPSERT
MYSQL_SYSVAR(disable_slow_update), MYSQL_SYSVAR(disable_slow_update),
MYSQL_SYSVAR(disable_slow_upsert), MYSQL_SYSVAR(disable_slow_upsert),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment