Re-enabled the ignore list, it uses the parameter 'ignore databases=<list of db names>'.
Added routing of trivial queries and ignored databases to the first available backend.
This commit is contained in:
@ -450,6 +450,58 @@ int error_count = 0;
|
||||
param->value)));
|
||||
}
|
||||
}
|
||||
|
||||
if(is_dbshard)
|
||||
{
|
||||
CONFIG_PARAMETER* param = NULL;
|
||||
char* ignore_databases;
|
||||
bool succp;
|
||||
ignore_databases =
|
||||
config_get_value(obj->parameters,
|
||||
"ignore_databases");
|
||||
|
||||
if (ignore_databases != NULL)
|
||||
{
|
||||
param = config_get_param(
|
||||
obj->parameters,
|
||||
"ignore_databases");
|
||||
}
|
||||
|
||||
if (param == NULL)
|
||||
{
|
||||
succp = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
param->qfd.valstr = strdup(param->value);
|
||||
param->qfd_param_type = STRING_TYPE;
|
||||
succp = service_set_param_value(obj->element,
|
||||
param,
|
||||
ignore_databases,
|
||||
COUNT_NONE,
|
||||
STRING_TYPE);
|
||||
}
|
||||
if (!succp)
|
||||
{
|
||||
if(param){
|
||||
LOGIF(LM, (skygw_log_write(
|
||||
LOGFILE_MESSAGE,
|
||||
"* Warning : invalid value type "
|
||||
"for parameter \'%s.%s = %s\'\n\tExpected "
|
||||
"type is [master|all] for "
|
||||
"use sql variables in.",
|
||||
((SERVICE*)obj->element)->name,
|
||||
param->name,
|
||||
param->value)));
|
||||
}else{
|
||||
LOGIF(LE, (skygw_log_write(
|
||||
LOGFILE_ERROR,
|
||||
"Error : parameter was NULL")));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
/** Parameters for rwsplit router only */
|
||||
if (is_rwsplit)
|
||||
{
|
||||
@ -1685,6 +1737,7 @@ static char *service_params[] =
|
||||
"max_slave_connections",
|
||||
"max_slave_replication_lag",
|
||||
"use_sql_variables_in", /*< rwsplit only */
|
||||
"ignore_databases",
|
||||
"version_string",
|
||||
"filters",
|
||||
"weightby",
|
||||
|
Reference in New Issue
Block a user