ClickHouse/tests/queries/0_stateless/01323_too_many_threads_bug.sql

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

25 lines
1.3 KiB
MySQL
Raw Normal View History

2020-06-19 11:13:03 +00:00
drop table if exists table_01323_many_parts;
2022-04-18 00:30:45 +00:00
set remote_filesystem_read_method = 'read';
set local_filesystem_read_method = 'pread';
2022-08-31 10:48:12 +00:00
set load_marks_asynchronously = 0;
2022-11-16 20:48:44 +00:00
set allow_asynchronous_read_from_io_pool_for_merge_tree = 0;
2022-03-08 08:17:04 +00:00
2020-06-19 11:13:03 +00:00
create table table_01323_many_parts (x UInt64) engine = MergeTree order by x partition by x % 100;
set max_partitions_per_insert_block = 100;
insert into table_01323_many_parts select number from numbers(100000);
set max_threads = 16;
set log_queries = 1;
2020-06-19 12:26:03 +00:00
select x from table_01323_many_parts limit 10 format Null;
2020-06-19 11:13:03 +00:00
system flush logs;
select arrayUniq(thread_ids) <= 4 from system.query_log where current_database = currentDatabase() AND event_date >= today() - 1 and query ilike '%select x from table_01323_many_parts%' and query not like '%system.query_log%' and type = 'QueryFinish' order by query_start_time desc limit 1;
2020-06-19 12:26:03 +00:00
select x from table_01323_many_parts order by x limit 10 format Null;
system flush logs;
select arrayUniq(thread_ids) <= 36 from system.query_log where current_database = currentDatabase() AND event_date >= today() - 1 and query ilike '%select x from table_01323_many_parts order by x%' and query not like '%system.query_log%' and type = 'QueryFinish' order by query_start_time desc limit 1;
2020-06-19 11:13:03 +00:00
drop table if exists table_01323_many_parts;