2020-03-03 13:54:28 +00:00
|
|
|
set log_queries=1;
|
|
|
|
set log_query_threads=1;
|
|
|
|
|
2020-06-22 17:41:49 +00:00
|
|
|
WITH 01091 AS id SELECT 1;
|
2020-03-03 13:55:40 +00:00
|
|
|
SYSTEM FLUSH LOGS;
|
2020-03-03 13:54:28 +00:00
|
|
|
|
2020-06-15 23:42:10 +00:00
|
|
|
WITH
|
2020-03-03 13:54:28 +00:00
|
|
|
(
|
|
|
|
SELECT query_id
|
|
|
|
FROM system.query_log
|
2020-06-22 17:41:49 +00:00
|
|
|
WHERE (query = 'WITH 01091 AS id SELECT 1;\n') AND (event_date >= (today() - 1))
|
2020-03-03 13:54:28 +00:00
|
|
|
ORDER BY event_time DESC
|
|
|
|
LIMIT 1
|
|
|
|
) AS id
|
|
|
|
SELECT uniqExact(thread_id)
|
|
|
|
FROM system.query_thread_log
|
2020-05-25 10:06:27 +00:00
|
|
|
WHERE (event_date >= (today() - 1)) AND (query_id = id) AND (thread_id != master_thread_id);
|
2020-03-03 13:54:28 +00:00
|
|
|
|
2020-06-22 17:41:49 +00:00
|
|
|
with 01091 as id select sum(number) from numbers(1000000);
|
2020-03-03 13:55:40 +00:00
|
|
|
SYSTEM FLUSH LOGS;
|
2020-03-03 13:54:28 +00:00
|
|
|
|
2020-06-15 23:42:10 +00:00
|
|
|
WITH
|
2020-03-03 13:54:28 +00:00
|
|
|
(
|
|
|
|
SELECT query_id
|
|
|
|
FROM system.query_log
|
2020-06-22 17:41:49 +00:00
|
|
|
WHERE (query LIKE 'with 01091 as id select sum(number) from numbers(1000000);%') AND (event_date >= (today() - 1))
|
2020-03-03 13:54:28 +00:00
|
|
|
ORDER BY event_time DESC
|
|
|
|
LIMIT 1
|
|
|
|
) AS id
|
|
|
|
SELECT uniqExact(thread_id)
|
|
|
|
FROM system.query_thread_log
|
2020-05-25 10:06:27 +00:00
|
|
|
WHERE (event_date >= (today() - 1)) AND (query_id = id) AND (thread_id != master_thread_id);
|
2020-03-03 13:54:28 +00:00
|
|
|
|
2020-06-22 17:41:49 +00:00
|
|
|
with 01091 as id select sum(number) from numbers_mt(1000000);
|
2020-03-03 13:55:40 +00:00
|
|
|
SYSTEM FLUSH LOGS;
|
2020-03-03 13:54:28 +00:00
|
|
|
|
2020-06-15 23:42:10 +00:00
|
|
|
WITH
|
2020-03-03 13:54:28 +00:00
|
|
|
(
|
|
|
|
SELECT query_id
|
|
|
|
FROM system.query_log
|
2020-06-22 17:41:49 +00:00
|
|
|
WHERE (query LIKE 'with 01091 as id select sum(number) from numbers_mt(1000000);%') AND (event_date >= (today() - 1))
|
2020-03-03 13:54:28 +00:00
|
|
|
ORDER BY event_time DESC
|
|
|
|
LIMIT 1
|
|
|
|
) AS id
|
|
|
|
SELECT uniqExact(thread_id) > 2
|
|
|
|
FROM system.query_thread_log
|
2020-05-25 10:06:27 +00:00
|
|
|
WHERE (event_date >= (today() - 1)) AND (query_id = id) AND (thread_id != master_thread_id);
|