diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 18:00:34 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 18:00:34 +0000 |
commit | 3f619478f796eddbba6e39502fe941b285dd97b1 (patch) | |
tree | e2c7b5777f728320e5b5542b6213fd3591ba51e2 /mysql-test/include/have_query_cache_disabled.inc | |
parent | Initial commit. (diff) | |
download | mariadb-3f619478f796eddbba6e39502fe941b285dd97b1.tar.xz mariadb-3f619478f796eddbba6e39502fe941b285dd97b1.zip |
Adding upstream version 1:10.11.6.upstream/1%10.11.6upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/include/have_query_cache_disabled.inc')
-rw-r--r-- | mysql-test/include/have_query_cache_disabled.inc | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/mysql-test/include/have_query_cache_disabled.inc b/mysql-test/include/have_query_cache_disabled.inc new file mode 100644 index 00000000..9087fa39 --- /dev/null +++ b/mysql-test/include/have_query_cache_disabled.inc @@ -0,0 +1,36 @@ +# Skip the test if 'query cache' is disabled. +# Note : There are 2 techniques to disable query cache : +# (1) Set query_cache_type to 0 or OFF +# (2) Set query_cache_size to 0 + +disable_query_log; + +let $do_skip=0; + +let $qc_var_1= query_get_value("SELECT COUNT(*) AS var1 FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME = 'have_query_cache' AND variable_value = 'YES'", var1, 1); +if ($qc_var_1 == 1) +{ + let $do_skip=1; +} + +# Check if 'query_cache_type' is OFF +let $qc_var_2= query_get_value("SELECT COUNT(*) AS var2 FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME = 'query_cache_type' AND VARIABLE_VALUE = 'OFF'", var2, 1); +if ($qc_var_2 == 1) +{ + let $do_skip=0; +} + +# Check if 'query_cache_size' is 0 +let $qc_var_3= query_get_value("SELECT COUNT(*) AS var3 FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME = 'query_cache_size' AND VARIABLE_VALUE = 0", var3, 1); + +if ($qc_var_3 == 1) +{ + let $do_skip=0; +} + +if ($do_skip) +{ + skip Query Cache enabled, skipping test; +} + +enable_query_log; |