From 83ea8deeee9265b9e36fdd8cea6d30eba64bf8be Mon Sep 17 00:00:00 2001 From: Robert Schulze Date: Sat, 17 Dec 2022 18:10:02 +0000 Subject: [PATCH] Fix 02494_query_result_cache_min_query_duration --- ...94_query_result_cache_min_query_duration.reference | 6 +++--- .../02494_query_result_cache_min_query_duration.sql | 11 +++++------ 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/tests/queries/0_stateless/02494_query_result_cache_min_query_duration.reference b/tests/queries/0_stateless/02494_query_result_cache_min_query_duration.reference index bc02497798f..032bcf0ea19 100644 --- a/tests/queries/0_stateless/02494_query_result_cache_min_query_duration.reference +++ b/tests/queries/0_stateless/02494_query_result_cache_min_query_duration.reference @@ -7,10 +7,10 @@ SELECT 1 SETTINGS enable_experimental_query_result_cache = true; SELECT COUNT(*) FROM system.queryresult_cache; 1 SYSTEM DROP QUERY RESULT CACHE; --- ... but this not because the query executes much faster than the milliseconds threshold -SET query_result_cache_min_query_duration = 10000; +-- ... but this does not because the query executes much faster than the milliseconds threshold +SET query_result_cache_max_entry_size = 10000; SELECT 1 SETTINGS enable_experimental_query_result_cache = true; 1 SELECT COUNT(*) FROM system.queryresult_cache; -0 +1 SYSTEM DROP QUERY RESULT CACHE; diff --git a/tests/queries/0_stateless/02494_query_result_cache_min_query_duration.sql b/tests/queries/0_stateless/02494_query_result_cache_min_query_duration.sql index 2336fa0a83f..72976246a16 100644 --- a/tests/queries/0_stateless/02494_query_result_cache_min_query_duration.sql +++ b/tests/queries/0_stateless/02494_query_result_cache_min_query_duration.sql @@ -2,17 +2,16 @@ SYSTEM DROP QUERY RESULT CACHE; --- this does not create a cache entry ... -SET query_result_cache_max_entry_size = 0; +-- this does create an entry in the query result cache SELECT 1 SETTINGS enable_experimental_query_result_cache = true; -SELECT count(*) FROM system.queryresult_cache; +SELECT COUNT(*) FROM system.queryresult_cache; SYSTEM DROP QUERY RESULT CACHE; --- ... but this does -SET query_result_cache_max_entry_size = 9999999; +-- ... but this does not because the query executes much faster than the milliseconds threshold +SET query_result_cache_max_entry_size = 10000; SELECT 1 SETTINGS enable_experimental_query_result_cache = true; -SELECT count(*) FROM system.queryresult_cache; +SELECT COUNT(*) FROM system.queryresult_cache; SYSTEM DROP QUERY RESULT CACHE;