ClickHouse/tests/queries/0_stateless/02221_system_zookeeper_unrestricted_like.sh

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

33 lines
1.5 KiB
Bash
Raw Normal View History

2022-03-01 19:02:43 +00:00
#!/usr/bin/env bash
2022-03-02 10:09:12 +00:00
# Tags: no-replicated-database, zookeeper
2022-03-01 19:02:43 +00:00
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# shellcheck source=../shell_config.sh
. "$CURDIR"/../shell_config.sh
${CLICKHOUSE_CLIENT} --query="DROP TABLE IF EXISTS sample_table;"
${CLICKHOUSE_CLIENT} --query="DROP TABLE IF EXISTS sample_table_2;"
${CLICKHOUSE_CLIENT} -n --query="CREATE TABLE sample_table (
key UInt64
)
2022-03-01 19:34:25 +00:00
ENGINE ReplicatedMergeTree('/clickhouse/$CLICKHOUSE_TEST_ZOOKEEPER_PREFIX/02221_system_zookeeper_unrestricted_like', '1')
2022-03-01 19:02:43 +00:00
ORDER BY tuple();
DROP TABLE IF EXISTS sample_table;"
${CLICKHOUSE_CLIENT} -n --query "CREATE TABLE sample_table_2 (
key UInt64
)
2022-03-01 19:34:25 +00:00
ENGINE ReplicatedMergeTree('/clickhouse/$CLICKHOUSE_TEST_ZOOKEEPER_PREFIX/02221_system_zookeeper_unrestricted_like_2', '1')
2022-03-01 19:02:43 +00:00
ORDER BY tuple();"
2022-03-01 19:34:25 +00:00
${CLICKHOUSE_CLIENT} --allow_unrestricted_reads_from_keeper=1 --query="SELECT name FROM (SELECT path, name FROM system.zookeeper WHERE path LIKE '/clickhouse%' ORDER BY name) WHERE path LIKE '%$CLICKHOUSE_TEST_ZOOKEEPER_PREFIX/02221_system_zookeeper_unrestricted_like%'"
2022-03-01 19:02:43 +00:00
${CLICKHOUSE_CLIENT} --query="SELECT '-------------------------'"
2022-03-01 19:34:25 +00:00
${CLICKHOUSE_CLIENT} --allow_unrestricted_reads_from_keeper=1 --query="SELECT name FROM (SELECT path, name FROM system.zookeeper WHERE path LIKE '/clickhouse/%' ORDER BY name) WHERE path LIKE '%$CLICKHOUSE_TEST_ZOOKEEPER_PREFIX/02221_system_zookeeper_unrestricted_like%'"
2022-03-01 19:02:43 +00:00
${CLICKHOUSE_CLIENT} --query="DROP TABLE IF EXISTS sample_table;"
${CLICKHOUSE_CLIENT} --query="DROP TABLE IF EXISTS sample_table_2;"