ClickHouse/tests/queries/0_stateless/01700_system_zookeeper_path_in.sql

23 lines
1.3 KiB
MySQL
Raw Normal View History

2021-02-12 19:42:20 +00:00
DROP TABLE IF EXISTS sample_table;
CREATE TABLE sample_table (
key UInt64
)
2021-03-18 12:49:31 +00:00
ENGINE ReplicatedMergeTree('/clickhouse/01700_system_zookeeper_path_in/{shard}', '{replica}')
2021-02-12 19:42:20 +00:00
ORDER BY tuple();
2021-03-18 12:49:31 +00:00
SELECT name FROM system.zookeeper WHERE path = '/clickhouse/01700_system_zookeeper_path_in/s1' AND name like 'block%' ORDER BY name;
SELECT name FROM system.zookeeper WHERE path = '/clickhouse/01700_system_zookeeper_path_in/s1/replicas' AND name LIKE '%r1%' ORDER BY name;
2021-03-19 04:24:43 +00:00
2021-02-12 19:42:20 +00:00
SELECT '========';
2021-03-18 12:49:31 +00:00
SELECT name FROM system.zookeeper WHERE path IN ('/clickhouse/01700_system_zookeeper_path_in/s1') AND name LIKE 'block%' ORDER BY name;
SELECT name FROM system.zookeeper WHERE path IN ('/clickhouse/01700_system_zookeeper_path_in/s1/replicas') AND name LIKE '%r1%' ORDER BY name;
2021-02-12 19:42:20 +00:00
SELECT '========';
2021-03-18 12:49:31 +00:00
SELECT name FROM system.zookeeper WHERE path IN ('/clickhouse/01700_system_zookeeper_path_in/s1',
'/clickhouse/01700_system_zookeeper_path_in/s1/replicas') AND name LIKE 'block%' ORDER BY name;
2021-02-12 19:42:20 +00:00
SELECT '========';
2021-03-18 12:49:31 +00:00
SELECT name FROM system.zookeeper WHERE path IN (SELECT concat('/clickhouse/01700_system_zookeeper_path_in/s1/', name)
FROM system.zookeeper WHERE (name != 'replicas' AND name NOT LIKE 'leader_election%' AND path = '/clickhouse/01700_system_zookeeper_path_in/s1')) ORDER BY name;
2021-02-12 19:42:20 +00:00
DROP TABLE IF EXISTS sample_table;