Skip to content
Snippets Groups Projects
Commit 2e9e6dd6 authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

mysql: check if query cache is enabled as a shared function

parent d5405859
Branches
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment