summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorRich Prohaska <prohaska@tokutek.com>2014-04-03 11:21:00 -0400
committerRich Prohaska <prohaska@tokutek.com>2014-04-03 11:21:00 -0400
commit22bf01e7f582063444e7b9b58f5fc2410ca85df6 (patch)
treeb8d8a57184c2191f110246a58d78de7d9a6ab312 /storage
parentdc9ed4c5fed4c332427974edab657ba83a03fa91 (diff)
downloadmariadb-git-22bf01e7f582063444e7b9b58f5fc2410ca85df6.tar.gz
#209 add tokudb_open_table_check_empty session variable to enable/disable may_table_be_open
Diffstat (limited to 'storage')
-rw-r--r--storage/tokudb/ha_tokudb.cc2
-rw-r--r--storage/tokudb/hatoku_hton.cc1
-rw-r--r--storage/tokudb/hatoku_hton.h2
3 files changed, 4 insertions, 1 deletions
diff --git a/storage/tokudb/ha_tokudb.cc b/storage/tokudb/ha_tokudb.cc
index 19ee41fc4dd..27485ab121c 100644
--- a/storage/tokudb/ha_tokudb.cc
+++ b/storage/tokudb/ha_tokudb.cc
@@ -1732,7 +1732,7 @@ int ha_tokudb::initialize_share(
init_auto_increment();
}
- if (may_table_be_empty(txn)) {
+ if (THDVAR(thd, open_table_check_empty) && may_table_be_empty(txn)) {
share->try_table_lock = true;
}
else {
diff --git a/storage/tokudb/hatoku_hton.cc b/storage/tokudb/hatoku_hton.cc
index f91cbeb302f..fcfdc5e419f 100644
--- a/storage/tokudb/hatoku_hton.cc
+++ b/storage/tokudb/hatoku_hton.cc
@@ -1394,6 +1394,7 @@ static struct st_mysql_sys_var *tokudb_system_variables[] = {
MYSQL_SYSVAR(loader_memory_size),
MYSQL_SYSVAR(hide_default_row_format),
MYSQL_SYSVAR(killed_time),
+ MYSQL_SYSVAR(open_table_check_empty),
NULL
};
diff --git a/storage/tokudb/hatoku_hton.h b/storage/tokudb/hatoku_hton.h
index b2e5c6eeb9c..2163775f0b1 100644
--- a/storage/tokudb/hatoku_hton.h
+++ b/storage/tokudb/hatoku_hton.h
@@ -484,6 +484,8 @@ static int tokudb_killed_callback(void) {
return thd->killed;
}
+static MYSQL_THDVAR_BOOL(open_table_check_empty, 0, "Check if table is empty at first open", NULL /*check*/, NULL /*update*/, true /*default*/);
+
extern HASH tokudb_open_tables;
extern pthread_mutex_t tokudb_mutex;
extern uint32_t tokudb_write_status_frequency;