diff --git a/tests/queries/0_stateless/02494_query_result_cache_events.reference b/tests/queries/0_stateless/02494_query_result_cache_events.reference index ad9f5636cf7..abcb957e1b1 100644 --- a/tests/queries/0_stateless/02494_query_result_cache_events.reference +++ b/tests/queries/0_stateless/02494_query_result_cache_events.reference @@ -1,5 +1,12 @@ -- { echoOn } +-- Warm up: If the query result cache has not been used yet, its event counters don't show up in +-- system.events (instead of simply being shown as 0). Insert into query result cache once to +-- initialize the hit (**) and miss counters (*). +SELECT 42 SETTINGS enable_experimental_query_result_cache = true; -- (*) +42 +SELECT 42 SETTINGS enable_experimental_query_result_cache_passive_usage = true; -- (**) +42 SYSTEM DROP QUERY RESULT CACHE; DROP TABLE IF EXISTS old; -- save current event counts for query result cache diff --git a/tests/queries/0_stateless/02494_query_result_cache_events.sql b/tests/queries/0_stateless/02494_query_result_cache_events.sql index 0c308930ff6..8c721eb16f9 100644 --- a/tests/queries/0_stateless/02494_query_result_cache_events.sql +++ b/tests/queries/0_stateless/02494_query_result_cache_events.sql @@ -1,5 +1,11 @@ -- { echoOn } +-- Warm up: If the query result cache has not been used yet, its event counters don't show up in +-- system.events (instead of simply being shown as 0). Insert into query result cache once to +-- initialize the hit (**) and miss counters (*). +SELECT 42 SETTINGS enable_experimental_query_result_cache = true; -- (*) +SELECT 42 SETTINGS enable_experimental_query_result_cache_passive_usage = true; -- (**) + SYSTEM DROP QUERY RESULT CACHE; DROP TABLE IF EXISTS old;