You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-01 06:46:55 +03:00
Do not build the cache as a separate user-visible engine.
We are creating a new read-only system variable, columnstore_cache_inserts, to enable/disable the cache. When this variable is set at server start up, any table created with engine=columnstore will also create the corresponding cache table in Aria engine for performing inserts. It is important to note that a ColumnStore table created with this option unset should not be queried when the server is restarted with the option set, as this will most likely result in query failures.
This commit is contained in:
@ -303,6 +303,15 @@ static MYSQL_THDVAR_BOOL(
|
||||
0
|
||||
);
|
||||
|
||||
static MYSQL_THDVAR_BOOL(
|
||||
cache_inserts,
|
||||
PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY,
|
||||
"Perform cache-based inserts to ColumnStore",
|
||||
NULL,
|
||||
NULL,
|
||||
0
|
||||
);
|
||||
|
||||
st_mysql_sys_var* mcs_system_variables[] =
|
||||
{
|
||||
MYSQL_SYSVAR(compression_type),
|
||||
@ -328,6 +337,7 @@ st_mysql_sys_var* mcs_system_variables[] =
|
||||
MYSQL_SYSVAR(import_for_batchinsert_enclosed_by),
|
||||
MYSQL_SYSVAR(varbin_always_hex),
|
||||
MYSQL_SYSVAR(replication_slave),
|
||||
MYSQL_SYSVAR(cache_inserts),
|
||||
NULL
|
||||
};
|
||||
|
||||
@ -559,3 +569,12 @@ void set_replication_slave(THD* thd, bool value)
|
||||
{
|
||||
THDVAR(thd, replication_slave) = value;
|
||||
}
|
||||
|
||||
bool get_cache_inserts(THD* thd)
|
||||
{
|
||||
return ( thd == NULL ) ? false : THDVAR(thd, cache_inserts);
|
||||
}
|
||||
void set_cache_inserts(THD* thd, bool value)
|
||||
{
|
||||
THDVAR(thd, cache_inserts) = value;
|
||||
}
|
||||
|
Reference in New Issue
Block a user