Commit fad930a2 authored by Rich Prohaska's avatar Rich Prohaska

#81 cleanup thread variables a bit

parent 33882d1c
...@@ -279,7 +279,7 @@ int ha_tokudb::fast_update(THD *thd, List<Item> &update_fields, List<Item> &upda ...@@ -279,7 +279,7 @@ int ha_tokudb::fast_update(THD *thd, List<Item> &update_fields, List<Item> &upda
check_error: check_error:
if (error != 0) { if (error != 0) {
if (get_disable_slow_update(thd)) if (THDVAR(thd, disable_slow_update) != 0)
error = HA_ERR_UNSUPPORTED; error = HA_ERR_UNSUPPORTED;
if (error != ENOTSUP) if (error != ENOTSUP)
print_error(error, MYF(0)); print_error(error, MYF(0));
...@@ -882,7 +882,7 @@ int ha_tokudb::upsert(THD *thd, List<Item> &update_fields, List<Item> &update_va ...@@ -882,7 +882,7 @@ int ha_tokudb::upsert(THD *thd, List<Item> &update_fields, List<Item> &update_va
check_error: check_error:
if (error != 0) { if (error != 0) {
if (get_disable_slow_upsert(thd)) if (THDVAR(thd, disable_slow_upsert) != 0)
error = HA_ERR_UNSUPPORTED; error = HA_ERR_UNSUPPORTED;
if (error != ENOTSUP) if (error != ENOTSUP)
print_error(error, MYF(0)); print_error(error, MYF(0));
......
...@@ -133,7 +133,6 @@ static uint get_pk_insert_mode(THD* thd) { ...@@ -133,7 +133,6 @@ static uint get_pk_insert_mode(THD* thd) {
return THDVAR(thd, pk_insert_mode); return THDVAR(thd, pk_insert_mode);
} }
static MYSQL_THDVAR_BOOL(load_save_space, static MYSQL_THDVAR_BOOL(load_save_space,
0, 0,
"if on, intial loads are slower but take less space", "if on, intial loads are slower but take less space",
...@@ -260,10 +259,6 @@ static MYSQL_THDVAR_BOOL(disable_slow_update, ...@@ -260,10 +259,6 @@ static MYSQL_THDVAR_BOOL(disable_slow_update,
false // default false // default
); );
static bool get_disable_slow_update(THD *thd) {
return (THDVAR(thd, disable_slow_update) != 0);
}
static MYSQL_THDVAR_BOOL(disable_slow_upsert, static MYSQL_THDVAR_BOOL(disable_slow_upsert,
PLUGIN_VAR_THDLOCAL, PLUGIN_VAR_THDLOCAL,
"disable slow upsert", "disable slow upsert",
...@@ -271,10 +266,6 @@ static MYSQL_THDVAR_BOOL(disable_slow_upsert, ...@@ -271,10 +266,6 @@ static MYSQL_THDVAR_BOOL(disable_slow_upsert,
NULL, // update NULL, // update
false // default false // default
); );
static bool get_disable_slow_upsert(THD *thd) {
return (THDVAR(thd, disable_slow_upsert) != 0);
}
#endif #endif
static MYSQL_THDVAR_UINT(analyze_time, static MYSQL_THDVAR_UINT(analyze_time,
...@@ -348,12 +339,6 @@ static MYSQL_THDVAR_UINT(lock_timeout_debug, 0, "TokuDB lock timeout debug", NUL ...@@ -348,12 +339,6 @@ static MYSQL_THDVAR_UINT(lock_timeout_debug, 0, "TokuDB lock timeout debug", NUL
static MYSQL_THDVAR_STR(last_lock_timeout, PLUGIN_VAR_MEMALLOC, "last TokuDB lock timeout", NULL, NULL, NULL); static MYSQL_THDVAR_STR(last_lock_timeout, PLUGIN_VAR_MEMALLOC, "last TokuDB lock timeout", NULL, NULL, NULL);
extern HASH tokudb_open_tables; extern HASH tokudb_open_tables;
extern pthread_mutex_t tokudb_mutex; extern pthread_mutex_t tokudb_mutex;
extern pthread_mutex_t tokudb_meta_mutex; extern pthread_mutex_t tokudb_meta_mutex;
......
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