Fix flaky test #56926

This commit is contained in:
Robert Schulze 2023-11-17 15:25:43 +00:00
parent 2f696c166b
commit a530d8c80d
No known key found for this signature in database
GPG Key ID: 26703B55FB13728A
2 changed files with 2 additions and 16 deletions

View File

@ -1,7 +1,4 @@
---
1
0 1
---
1
0 1
1 0

View File

@ -4,20 +4,7 @@
-- Start with empty query cache QC
SYSTEM DROP QUERY CACHE;
-- Run a query with QC on. The first execution is a QC miss.
SELECT '---';
SELECT 1 SETTINGS use_query_cache = true;
SYSTEM FLUSH LOGS;
SELECT ProfileEvents['QueryCacheHits'], ProfileEvents['QueryCacheMisses']
FROM system.query_log
WHERE type = 'QueryFinish'
AND current_database = currentDatabase()
AND query = 'SELECT 1 SETTINGS use_query_cache = true;';
-- Run previous query again with query cache on
SELECT '---';
SELECT 1 SETTINGS use_query_cache = true;
SYSTEM FLUSH LOGS;
@ -28,4 +15,6 @@ WHERE type = 'QueryFinish'
AND query = 'SELECT 1 SETTINGS use_query_cache = true;'
ORDER BY event_time_microseconds;
-- (The 1st execution was a cache miss, the 2nd execution was a cache hit)
SYSTEM DROP QUERY CACHE;