Commit 1cba8e02 authored by Zardosht Kasheff's avatar Zardosht Kasheff Committed by Yoni Fogel

refs #5888, add server variable to control directIO

git-svn-id: file:///svn/mysql/tokudb-engine/tokudb-engine@52240 c7de825b-a66e-492c-adef-691d508d4ae1
parent 72885f47
...@@ -284,6 +284,7 @@ static uint32_t tokudb_env_flags = 0; ...@@ -284,6 +284,7 @@ static uint32_t tokudb_env_flags = 0;
// static uint32_t tokudb_lock_type = DB_LOCK_DEFAULT; // static uint32_t tokudb_lock_type = DB_LOCK_DEFAULT;
// 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 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;
...@@ -510,6 +511,7 @@ static int tokudb_init_func(void *p) { ...@@ -510,6 +511,7 @@ static int tokudb_init_func(void *p) {
r = db_env->set_generate_row_callback_for_del(db_env,generate_row_for_del); r = db_env->set_generate_row_callback_for_del(db_env,generate_row_for_del);
assert(!r); assert(!r);
db_env->set_update(db_env, tokudb_update_fun); db_env->set_update(db_env, tokudb_update_fun);
db_env_set_direct_io(tokudb_directIO == TRUE);
r = db_env->open(db_env, tokudb_home, tokudb_init_flags, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH); r = db_env->open(db_env, tokudb_home, tokudb_init_flags, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH);
if (tokudb_debug & TOKUDB_DEBUG_INIT) TOKUDB_TRACE("%s:env opened:return=%d\n", __FUNCTION__, r); if (tokudb_debug & TOKUDB_DEBUG_INIT) TOKUDB_TRACE("%s:env opened:return=%d\n", __FUNCTION__, r);
...@@ -1880,6 +1882,12 @@ static void tokudb_cleaner_iterations_update(THD * thd, ...@@ -1880,6 +1882,12 @@ static void tokudb_cleaner_iterations_update(THD * thd,
#define DEFAULT_CLEANER_ITERATIONS 5 #define DEFAULT_CLEANER_ITERATIONS 5
static MYSQL_SYSVAR_BOOL(directIO, tokudb_directIO,
PLUGIN_VAR_READONLY,
"TokuDB Enable Direct I/O ",
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",
NULL, tokudb_cleaner_iterations_update, DEFAULT_CLEANER_ITERATIONS, NULL, tokudb_cleaner_iterations_update, DEFAULT_CLEANER_ITERATIONS,
...@@ -1935,6 +1943,7 @@ static struct st_mysql_sys_var *tokudb_system_variables[] = { ...@@ -1935,6 +1943,7 @@ static struct st_mysql_sys_var *tokudb_system_variables[] = {
MYSQL_SYSVAR(read_block_size), MYSQL_SYSVAR(read_block_size),
MYSQL_SYSVAR(read_buf_size), MYSQL_SYSVAR(read_buf_size),
MYSQL_SYSVAR(row_format), MYSQL_SYSVAR(row_format),
MYSQL_SYSVAR(directIO),
#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