diff --git a/check_mysqlserver b/check_mysqlserver index 5a9912d98efbfc27d6fb48653bfc8e1683aa8e15..a6d58b2fc27c0f2c60b29d54d13fd603785140f2 100755 --- a/check_mysqlserver +++ b/check_mysqlserver @@ -187,10 +187,19 @@ function _mysqlrenderdelta() { } # helper function for caching checks -# The function aborts the check +# The function aborts the check ending with OK. function _verify_cache(){ - _mysqlgetvar "have_query_cache" | grep "YES" >/dev/null || ph.abort "Query cache (have_query_cache) is not active" - _mysqlgetvar "query_cache_type" | grep "OFF" >/dev/null && ph.abort "Query cache (have_query_cache) is active but query_cache_type is OFF" + local bCacheEnabled= + _mysqlgetvar "have_query_cache" | grep "YES" >/dev/null + if [ $? -ne 0 ]; then + _mysqlgetvar "query_cache_type" | grep "OFF" >/dev/null + if [ $? -eq 0 ]; then + echo "INFO: Query cache (have_query_cache) is active but query_cache_type is OFF." + else + echo "INFO: Query cache (have_query_cache) is not active." + fi + ph.exit + fi } # ---------------------------------------------------------------------- # MAIN