1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-29 08:21:15 +03:00

Replication improvements

This patch fixes:

MCOL-3557 - Row Based Replication events to ColumnStore tables will no
longer cause MariaDB to crash, it will error instead.

MCOL-3556 - Remove the Columnstore.xml variable to turn on ColumnStore
tables applying replication events and instead make it a system variable
that can be set in my.cnf called "columnstore_replication_slave". This
allows it to be set per-UM.
This commit is contained in:
Andrew Hutchings
2019-10-11 16:54:41 +01:00
parent 8476c81255
commit 20c1949152
7 changed files with 98 additions and 35 deletions

View File

@ -276,6 +276,15 @@ static MYSQL_THDVAR_BOOL(
1 // default
);
static MYSQL_THDVAR_BOOL(
replication_slave,
PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY,
"Allow this MariaDB server to apply replication changes to ColumnStore",
NULL,
NULL,
0
);
st_mysql_sys_var* mcs_system_variables[] =
{
MYSQL_SYSVAR(compression_type),
@ -300,6 +309,7 @@ st_mysql_sys_var* mcs_system_variables[] =
MYSQL_SYSVAR(import_for_batchinsert_delimiter),
MYSQL_SYSVAR(import_for_batchinsert_enclosed_by),
MYSQL_SYSVAR(varbin_always_hex),
MYSQL_SYSVAR(replication_slave),
NULL
};
@ -520,3 +530,12 @@ void set_import_for_batchinsert_enclosed_by(THD* thd, ulong value)
{
THDVAR(thd, import_for_batchinsert_enclosed_by) = value;
}
bool get_replication_slave(THD* thd)
{
return ( thd == NULL ) ? false : THDVAR(thd, replication_slave);
}
void set_replication_slave(THD* thd, bool value)
{
THDVAR(thd, replication_slave) = value;
}