Commit 6e53f88c authored by Rich Prohaska's avatar Rich Prohaska Committed by Yoni Fogel

#4013 use milliseconds as the units for the tokudb_lock_timeout variable refs[t:4013]

git-svn-id: file:///svn/mysql/tokudb-engine/tokudb-engine@35410 c7de825b-a66e-492c-adef-691d508d4ae1
parent 3ca4532e
...@@ -422,7 +422,7 @@ static int tokudb_init_func(void *p) { ...@@ -422,7 +422,7 @@ static int tokudb_init_func(void *p) {
r = db_env->checkpointing_set_period(db_env, tokudb_checkpointing_period); r = db_env->checkpointing_set_period(db_env, tokudb_checkpointing_period);
assert(!r); assert(!r);
r = db_env->set_lock_timeout(db_env, tokudb_lock_timeout); r = db_env->set_lock_timeout(db_env, tokudb_lock_timeout * 1000);
assert(r == 0); assert(r == 0);
r = db_create(&metadata_db, db_env, 0); r = db_create(&metadata_db, db_env, 0);
...@@ -1544,14 +1544,14 @@ static void tokudb_lock_timeout_update(THD * thd, ...@@ -1544,14 +1544,14 @@ static void tokudb_lock_timeout_update(THD * thd,
ulonglong * timeout = (ulonglong *) var; ulonglong * timeout = (ulonglong *) var;
*timeout = *(const ulonglong *) save; *timeout = *(const ulonglong *) save;
db_env->set_lock_timeout(db_env, *timeout); db_env->set_lock_timeout(db_env, *timeout * 1000);
} }
#define DEFAULT_LOCK_TIMEOUT_USEC (4UL * 1000 * 1000) #define DEFAULT_LOCK_TIMEOUT_MSEC (4UL * 1000)
static MYSQL_SYSVAR_ULONGLONG(lock_timeout, tokudb_lock_timeout, static MYSQL_SYSVAR_ULONGLONG(lock_timeout, tokudb_lock_timeout,
0, "TokuDB lock timeout", 0, "TokuDB lock timeout",
NULL, tokudb_lock_timeout_update, DEFAULT_LOCK_TIMEOUT_USEC, NULL, tokudb_lock_timeout_update, DEFAULT_LOCK_TIMEOUT_MSEC,
0, ~0LL, 0); 0, ~0LL, 0);
static MYSQL_SYSVAR_ULONGLONG(cache_size, tokudb_cache_size, static MYSQL_SYSVAR_ULONGLONG(cache_size, tokudb_cache_size,
PLUGIN_VAR_READONLY, "TokuDB cache table size", NULL, NULL, 0, PLUGIN_VAR_READONLY, "TokuDB cache table size", NULL, NULL, 0,
......
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