ClickHouse/tests/queries/0_stateless/02494_query_cache_nondeterministic_functions.sql
2023-11-13 10:57:33 +00:00

24 lines
1.0 KiB
SQL

-- Tags: no-parallel
-- Tag no-parallel: Messes with internal cache
SYSTEM DROP QUERY CACHE;
SELECT '-- query_cache_nondeterministic_function_handling = throw';
SELECT count(now()) SETTINGS use_query_cache = true; -- { serverError QUERY_CACHE_USED_WITH_NONDETERMINISTIC_FUNCTIONS }
SELECT count(now()) SETTINGS use_query_cache = true, query_cache_nondeterministic_function_handling = 'throw'; -- { serverError QUERY_CACHE_USED_WITH_NONDETERMINISTIC_FUNCTIONS }
SELECT count(*) FROM system.query_cache;
SYSTEM DROP QUERY CACHE;
SELECT '-- query_cache_nondeterministic_function_handling = save';
SELECT count(now()) SETTINGS use_query_cache = true, query_cache_nondeterministic_function_handling = 'save';
SELECT count(*) FROM system.query_cache;
SYSTEM DROP QUERY CACHE;
SELECT '-- query_cache_nondeterministic_function_handling = ignore';
SELECT count(now()) SETTINGS use_query_cache = true, query_cache_nondeterministic_function_handling = 'ignore';
SELECT count(*) FROM system.query_cache;
SYSTEM DROP QUERY CACHE;