Commit b6c0fb24 authored by Rich Prohaska's avatar Rich Prohaska Committed by Yoni Fogel

#3453 allow the lock timeout to be set from the mysqld command line refs[t:3453]

git-svn-id: file:///svn/mysql/tokudb-engine/tokudb-engine@35406 c7de825b-a66e-492c-adef-691d508d4ae1
parent 745e9c86
...@@ -1209,7 +1209,6 @@ ha_tokudb::ha_tokudb(handlerton * hton, TABLE_SHARE * table_arg):handler(hton, t ...@@ -1209,7 +1209,6 @@ ha_tokudb::ha_tokudb(handlerton * hton, TABLE_SHARE * table_arg):handler(hton, t
num_blob_bytes = 0; num_blob_bytes = 0;
delay_updating_ai_metadata = false; delay_updating_ai_metadata = false;
ai_metadata_update_required = false; ai_metadata_update_required = false;
read_lock_wait_time = 4000;
bzero(mult_key_dbt, sizeof(mult_key_dbt)); bzero(mult_key_dbt, sizeof(mult_key_dbt));
bzero(mult_rec_dbt, sizeof(mult_rec_dbt)); bzero(mult_rec_dbt, sizeof(mult_rec_dbt));
loader = NULL; loader = NULL;
......
...@@ -306,7 +306,6 @@ class ha_tokudb : public handler { ...@@ -306,7 +306,6 @@ class ha_tokudb : public handler {
char write_status_msg[200]; //buffer of 200 should be a good upper bound. char write_status_msg[200]; //buffer of 200 should be a good upper bound.
struct loader_context lc; struct loader_context lc;
ulonglong read_lock_wait_time;
DB_LOADER* loader; DB_LOADER* loader;
bool abort_loader; bool abort_loader;
int loader_error; int loader_error;
......
...@@ -32,8 +32,6 @@ extern "C" { ...@@ -32,8 +32,6 @@ extern "C" {
#define TOKU_METADB_NAME "tokudb_meta" #define TOKU_METADB_NAME "tokudb_meta"
#define DEFAULT_LOCK_TIMEOUT_USEC (4UL * 1000 * 1000)
typedef struct savepoint_info { typedef struct savepoint_info {
DB_TXN* txn; DB_TXN* txn;
tokudb_trx_data* trx; tokudb_trx_data* trx;
...@@ -424,7 +422,7 @@ static int tokudb_init_func(void *p) { ...@@ -424,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, DEFAULT_LOCK_TIMEOUT_USEC); r = db_env->set_lock_timeout(db_env, tokudb_lock_timeout);
assert(r == 0); assert(r == 0);
r = db_create(&metadata_db, db_env, 0); r = db_create(&metadata_db, db_env, 0);
...@@ -1549,6 +1547,8 @@ static void tokudb_lock_timeout_update(THD * thd, ...@@ -1549,6 +1547,8 @@ static void tokudb_lock_timeout_update(THD * thd,
db_env->set_lock_timeout(db_env, *timeout); db_env->set_lock_timeout(db_env, *timeout);
} }
#define DEFAULT_LOCK_TIMEOUT_USEC (4UL * 1000 * 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_USEC,
......
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