MXS-2457 Disable query classifier cache in masking
As the canonicalization is also not aware of 'ANSI_QUOTES', the cache must be disabled if the masking filter has 'treat_string_arg_as_field' enabled.
This commit is contained in:
parent
4aa8eac799
commit
5833c39a8a
@ -185,6 +185,28 @@ MaskingFilter* MaskingFilter::create(const char* zName, MXS_CONFIG_PARAMETER* pP
|
||||
if (sRules.get())
|
||||
{
|
||||
pFilter = new MaskingFilter(config, sRules);
|
||||
|
||||
if (config.treat_string_arg_as_field())
|
||||
{
|
||||
MXS_NOTICE("The parameter 'treat_string_arg_as_field' is enabled for %s. "
|
||||
"As a consequence, the query classifier cache must be disabled.",
|
||||
zName);
|
||||
|
||||
QC_CACHE_PROPERTIES cache_properties;
|
||||
qc_get_cache_properties(&cache_properties);
|
||||
|
||||
if (cache_properties.max_size != 0)
|
||||
{
|
||||
cache_properties.max_size = 0;
|
||||
qc_set_cache_properties(&cache_properties);
|
||||
|
||||
MXS_NOTICE("Query classifier cache disabled.");
|
||||
}
|
||||
else
|
||||
{
|
||||
MXS_NOTICE("The query classifier cache was disabled already.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return pFilter;
|
||||
|
Loading…
x
Reference in New Issue
Block a user