mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 00:22:29 +00:00
Fix 01091_num_threads flaps (by adding unique identifier to the queries)
Actually there were two issues: - missing \n, so it picked the wrong query anway - no unique identifier, hence it may works incorrectly (and actually, event clickhouse-test script executes 'SELECT 1' query)
This commit is contained in:
parent
9744c99f7e
commit
267a6c8639
@ -1,14 +1,14 @@
|
||||
set log_queries=1;
|
||||
set log_query_threads=1;
|
||||
|
||||
SELECT 1;
|
||||
WITH 01091 AS id SELECT 1;
|
||||
SYSTEM FLUSH LOGS;
|
||||
|
||||
WITH
|
||||
(
|
||||
SELECT query_id
|
||||
FROM system.query_log
|
||||
WHERE (query = 'SELECT 1') AND (event_date >= (today() - 1))
|
||||
WHERE (query = 'WITH 01091 AS id SELECT 1;\n') AND (event_date >= (today() - 1))
|
||||
ORDER BY event_time DESC
|
||||
LIMIT 1
|
||||
) AS id
|
||||
@ -16,14 +16,14 @@ SELECT uniqExact(thread_id)
|
||||
FROM system.query_thread_log
|
||||
WHERE (event_date >= (today() - 1)) AND (query_id = id) AND (thread_id != master_thread_id);
|
||||
|
||||
select sum(number) from numbers(1000000);
|
||||
with 01091 as id select sum(number) from numbers(1000000);
|
||||
SYSTEM FLUSH LOGS;
|
||||
|
||||
WITH
|
||||
(
|
||||
SELECT query_id
|
||||
FROM system.query_log
|
||||
WHERE (query LIKE 'select sum(number) from numbers(1000000);%') AND (event_date >= (today() - 1))
|
||||
WHERE (query LIKE 'with 01091 as id select sum(number) from numbers(1000000);%') AND (event_date >= (today() - 1))
|
||||
ORDER BY event_time DESC
|
||||
LIMIT 1
|
||||
) AS id
|
||||
@ -31,14 +31,14 @@ SELECT uniqExact(thread_id)
|
||||
FROM system.query_thread_log
|
||||
WHERE (event_date >= (today() - 1)) AND (query_id = id) AND (thread_id != master_thread_id);
|
||||
|
||||
select sum(number) from numbers_mt(1000000);
|
||||
with 01091 as id select sum(number) from numbers_mt(1000000);
|
||||
SYSTEM FLUSH LOGS;
|
||||
|
||||
WITH
|
||||
(
|
||||
SELECT query_id
|
||||
FROM system.query_log
|
||||
WHERE (query LIKE 'select sum(number) from numbers_mt(1000000);%') AND (event_date >= (today() - 1))
|
||||
WHERE (query LIKE 'with 01091 as id select sum(number) from numbers_mt(1000000);%') AND (event_date >= (today() - 1))
|
||||
ORDER BY event_time DESC
|
||||
LIMIT 1
|
||||
) AS id
|
||||
|
Loading…
Reference in New Issue
Block a user