diff options
author | Rich Prohaska <prohaska@tokutek.com> | 2014-08-14 15:18:27 -0400 |
---|---|---|
committer | Rich Prohaska <prohaska@tokutek.com> | 2014-08-14 15:18:27 -0400 |
commit | b16b461d25a529e7818b5623584077f5a3c52366 (patch) | |
tree | 518290191d1e10345ec7b4c7a837357871c4aa99 /storage | |
parent | f011f45b2eb0e7fe46a4a0d9da2da16e64ae7a43 (diff) | |
download | mariadb-git-b16b461d25a529e7818b5623584077f5a3c52366.tar.gz |
DB-506 add a session variable to enable/disable bulk fetch default enabled
Diffstat (limited to 'storage')
-rw-r--r-- | storage/tokudb/ha_tokudb.cc | 2 | ||||
-rw-r--r-- | storage/tokudb/hatoku_hton.cc | 1 | ||||
-rw-r--r-- | storage/tokudb/hatoku_hton.h | 2 |
3 files changed, 4 insertions, 1 deletions
diff --git a/storage/tokudb/ha_tokudb.cc b/storage/tokudb/ha_tokudb.cc index 76b4b6a0bdc..a53581c8d02 100644 --- a/storage/tokudb/ha_tokudb.cc +++ b/storage/tokudb/ha_tokudb.cc @@ -4370,7 +4370,7 @@ static bool tokudb_do_bulk_fetch(THD *thd) { case SQLCOM_CREATE_TABLE: case SQLCOM_INSERT_SELECT: case SQLCOM_REPLACE_SELECT: - return true; + return THDVAR(thd, bulk_fetch) != 0; default: return false; } diff --git a/storage/tokudb/hatoku_hton.cc b/storage/tokudb/hatoku_hton.cc index d9f86900907..37911a53086 100644 --- a/storage/tokudb/hatoku_hton.cc +++ b/storage/tokudb/hatoku_hton.cc @@ -1428,6 +1428,7 @@ static struct st_mysql_sys_var *tokudb_system_variables[] = { #if TOKUDB_CHECK_JEMALLOC MYSQL_SYSVAR(check_jemalloc), #endif + MYSQL_SYSVAR(bulk_fetch), NULL }; diff --git a/storage/tokudb/hatoku_hton.h b/storage/tokudb/hatoku_hton.h index 6971dce44bf..ac0ddefbe5d 100644 --- a/storage/tokudb/hatoku_hton.h +++ b/storage/tokudb/hatoku_hton.h @@ -515,6 +515,8 @@ static uint tokudb_check_jemalloc; static MYSQL_SYSVAR_UINT(check_jemalloc, tokudb_check_jemalloc, 0, "Check if jemalloc is linked", NULL, NULL, 1, 0, 1, 0); #endif +static MYSQL_THDVAR_BOOL(bulk_fetch, PLUGIN_VAR_THDLOCAL, "enable bulk fetch", NULL /*check*/, NULL /*update*/, true /*default*/); + extern HASH tokudb_open_tables; extern pthread_mutex_t tokudb_mutex; extern uint32_t tokudb_write_status_frequency; |