diff --git a/server/modules/filter/masking/maskingfilter.cc b/server/modules/filter/masking/maskingfilter.cc index 54dda8a8c..cd33cc8ae 100644 --- a/server/modules/filter/masking/maskingfilter.cc +++ b/server/modules/filter/masking/maskingfilter.cc @@ -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;