diff --git a/server/core/query_classifier.cc b/server/core/query_classifier.cc index cfb195591..665d57d64 100644 --- a/server/core/query_classifier.cc +++ b/server/core/query_classifier.cc @@ -1321,6 +1321,11 @@ bool qc_set_cache_properties(const QC_CACHE_PROPERTIES* properties) if (properties->max_size >= 0) { + if (properties->max_size == 0) + { + MXS_NOTICE("Query classifier cache disabled."); + } + this_unit.set_cache_max_size(properties->max_size); rv = true; } diff --git a/server/modules/filter/dbfwfilter/dbfwfilter.cc b/server/modules/filter/dbfwfilter/dbfwfilter.cc index a4044f2ca..338a5fe23 100644 --- a/server/modules/filter/dbfwfilter/dbfwfilter.cc +++ b/server/modules/filter/dbfwfilter/dbfwfilter.cc @@ -1287,24 +1287,18 @@ Dbfw* Dbfw::create(const char* zName, MXS_CONFIG_PARAMETER* pParams) { if (rval->treat_string_as_field() || rval->treat_string_arg_as_field()) { - MXS_NOTICE("The parameter 'treat_string_arg_as_field' and/or " - "'treat_string_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) { + MXS_NOTICE("The parameter 'treat_string_arg_as_field' or(and) " + "'treat_string_as_field' is enabled for %s, " + "disabling the query classifier cache.", + zName); + 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."); } } } diff --git a/server/modules/filter/masking/maskingfilter.cc b/server/modules/filter/masking/maskingfilter.cc index cd33cc8ae..5930fd0c6 100644 --- a/server/modules/filter/masking/maskingfilter.cc +++ b/server/modules/filter/masking/maskingfilter.cc @@ -188,23 +188,17 @@ MaskingFilter* MaskingFilter::create(const char* zName, MXS_CONFIG_PARAMETER* pP 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) { + MXS_NOTICE("The parameter 'treat_string_arg_as_field' is enabled for %s, " + "disabling the query classifier cache.", + zName); + 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."); } } }