mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 20:42:30 +01:00
#209 add tokudb_open_table_check_empty session variable to enable/disable may_table_be_open
This commit is contained in:
parent
d8fdb8dc9f
commit
d9bddf1341
3 changed files with 4 additions and 1 deletions
|
@ -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 {
|
||||
|
|
|
@ -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
|
||||
};
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue