MXS-1624 Add configuration parameter

With the global configuration parameter 'query_classifier_cache'
the query classification cache can be turned on. At the moment it
does not matter what value it has; its presence simply enables the
caching.

Eventually you will be able to specify how much memory the cache
is allowed to consume.
This commit is contained in:
Johan Wikman
2018-07-06 11:09:44 +03:00
parent e7913cc022
commit f2b8487577
4 changed files with 22 additions and 2 deletions

View File

@ -278,7 +278,19 @@ bool qc_setup(const QC_CACHE_PROPERTIES* cache_properties,
if (rv == QC_RESULT_OK)
{
this_unit.qc_sql_mode = sql_mode;
this_unit.use_cached_result = (cache_properties ? true : false);
bool use_cached_result = (cache_properties != nullptr);
if (use_cached_result)
{
MXS_NOTICE("Query classification results are cached and reused.");
}
else
{
MXS_NOTICE("Query classification results are not cached.");
}
this_unit.use_cached_result = use_cached_result;
}
else
{