Skip to content

Commit b16b461

Browse files
committed
DB-506 add a session variable to enable/disable bulk fetch default enabled
1 parent f011f45 commit b16b461

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

storage/tokudb/ha_tokudb.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4370,7 +4370,7 @@ static bool tokudb_do_bulk_fetch(THD *thd) {
43704370
case SQLCOM_CREATE_TABLE:
43714371
case SQLCOM_INSERT_SELECT:
43724372
case SQLCOM_REPLACE_SELECT:
4373-
return true;
4373+
return THDVAR(thd, bulk_fetch) != 0;
43744374
default:
43754375
return false;
43764376
}

storage/tokudb/hatoku_hton.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1428,6 +1428,7 @@ static struct st_mysql_sys_var *tokudb_system_variables[] = {
14281428
#if TOKUDB_CHECK_JEMALLOC
14291429
MYSQL_SYSVAR(check_jemalloc),
14301430
#endif
1431+
MYSQL_SYSVAR(bulk_fetch),
14311432
NULL
14321433
};
14331434

storage/tokudb/hatoku_hton.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -515,6 +515,8 @@ static uint tokudb_check_jemalloc;
515515
static MYSQL_SYSVAR_UINT(check_jemalloc, tokudb_check_jemalloc, 0, "Check if jemalloc is linked", NULL, NULL, 1, 0, 1, 0);
516516
#endif
517517

518+
static MYSQL_THDVAR_BOOL(bulk_fetch, PLUGIN_VAR_THDLOCAL, "enable bulk fetch", NULL /*check*/, NULL /*update*/, true /*default*/);
519+
518520
extern HASH tokudb_open_tables;
519521
extern pthread_mutex_t tokudb_mutex;
520522
extern uint32_t tokudb_write_status_frequency;

0 commit comments

Comments
 (0)