mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-29 02:52:13 +00:00
Remove the setting from tests
This commit is contained in:
parent
9c3ebc5a99
commit
a8683a8bd5
@ -3931,19 +3931,6 @@ For example, `avg(if(cond, col, null))` can be rewritten to `avgOrNullIf(cond, c
|
|||||||
Supported only with experimental analyzer (`allow_experimental_analyzer = 1`).
|
Supported only with experimental analyzer (`allow_experimental_analyzer = 1`).
|
||||||
:::
|
:::
|
||||||
|
|
||||||
## allow_experimental_database_replicated {#allow_experimental_database_replicated}
|
|
||||||
|
|
||||||
Enables to create databases with [Replicated](../../engines/database-engines/replicated.md) engine.
|
|
||||||
|
|
||||||
Possible values:
|
|
||||||
|
|
||||||
- 0 — Disabled.
|
|
||||||
- 1 — Enabled.
|
|
||||||
|
|
||||||
Default value: `0`.
|
|
||||||
|
|
||||||
Cloud default value: `1`.
|
|
||||||
|
|
||||||
## database_replicated_initial_query_timeout_sec {#database_replicated_initial_query_timeout_sec}
|
## database_replicated_initial_query_timeout_sec {#database_replicated_initial_query_timeout_sec}
|
||||||
|
|
||||||
Sets how long initial DDL query should wait for Replicated database to process previous DDL queue entries in seconds.
|
Sets how long initial DDL query should wait for Replicated database to process previous DDL queue entries in seconds.
|
||||||
|
@ -3447,17 +3447,6 @@ SELECT
|
|||||||
FROM fuse_tbl
|
FROM fuse_tbl
|
||||||
```
|
```
|
||||||
|
|
||||||
## allow_experimental_database_replicated {#allow_experimental_database_replicated}
|
|
||||||
|
|
||||||
Позволяет создавать базы данных с движком [Replicated](../../engines/database-engines/replicated.md).
|
|
||||||
|
|
||||||
Возможные значения:
|
|
||||||
|
|
||||||
- 0 — Disabled.
|
|
||||||
- 1 — Enabled.
|
|
||||||
|
|
||||||
Значение по умолчанию: `0`.
|
|
||||||
|
|
||||||
## database_replicated_initial_query_timeout_sec {#database_replicated_initial_query_timeout_sec}
|
## database_replicated_initial_query_timeout_sec {#database_replicated_initial_query_timeout_sec}
|
||||||
|
|
||||||
Устанавливает, как долго начальный DDL-запрос должен ждать, пока реплицированная база данных прецессирует предыдущие записи очереди DDL в секундах.
|
Устанавливает, как долго начальный DDL-запрос должен ждать, пока реплицированная база данных прецессирует предыдущие записи очереди DDL в секундах.
|
||||||
|
@ -19,7 +19,6 @@ def get_options(i: int, upgrade_check: bool) -> str:
|
|||||||
|
|
||||||
if i % 3 == 2 and not upgrade_check:
|
if i % 3 == 2 and not upgrade_check:
|
||||||
options.append(f'''--db-engine="Replicated('/test/db/test_{i}', 's1', 'r1')"''')
|
options.append(f'''--db-engine="Replicated('/test/db/test_{i}', 's1', 'r1')"''')
|
||||||
client_options.append("allow_experimental_database_replicated=1")
|
|
||||||
client_options.append("enable_deflate_qpl_codec=1")
|
client_options.append("enable_deflate_qpl_codec=1")
|
||||||
client_options.append("enable_zstd_qat_codec=1")
|
client_options.append("enable_zstd_qat_codec=1")
|
||||||
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
<clickhouse>
|
<clickhouse>
|
||||||
<profiles>
|
<profiles>
|
||||||
<default>
|
<default>
|
||||||
<allow_experimental_database_replicated>1</allow_experimental_database_replicated>
|
|
||||||
<distributed_ddl_output_mode>none</distributed_ddl_output_mode>
|
<distributed_ddl_output_mode>none</distributed_ddl_output_mode>
|
||||||
<database_replicated_initial_query_timeout_sec>120</database_replicated_initial_query_timeout_sec>
|
<database_replicated_initial_query_timeout_sec>120</database_replicated_initial_query_timeout_sec>
|
||||||
<distributed_ddl_task_timeout>120</distributed_ddl_task_timeout>
|
<distributed_ddl_task_timeout>120</distributed_ddl_task_timeout>
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
<clickhouse>
|
<clickhouse>
|
||||||
<profiles>
|
<profiles>
|
||||||
<default>
|
<default>
|
||||||
<allow_experimental_database_replicated>1</allow_experimental_database_replicated>
|
|
||||||
</default>
|
</default>
|
||||||
</profiles>
|
</profiles>
|
||||||
<users>
|
<users>
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
<clickhouse>
|
<clickhouse>
|
||||||
<profiles>
|
<profiles>
|
||||||
<default>
|
<default>
|
||||||
<allow_experimental_database_replicated>1</allow_experimental_database_replicated>
|
|
||||||
<allow_deprecated_database_ordinary>1</allow_deprecated_database_ordinary>
|
<allow_deprecated_database_ordinary>1</allow_deprecated_database_ordinary>
|
||||||
</default>
|
</default>
|
||||||
</profiles>
|
</profiles>
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
<clickhouse>
|
<clickhouse>
|
||||||
<profiles>
|
<profiles>
|
||||||
<default>
|
<default>
|
||||||
<allow_experimental_database_replicated>1</allow_experimental_database_replicated>
|
|
||||||
</default>
|
</default>
|
||||||
</profiles>
|
</profiles>
|
||||||
</clickhouse>
|
</clickhouse>
|
||||||
|
@ -295,7 +295,6 @@ def test_replicated_database(cluster):
|
|||||||
node1 = cluster.instances["node3"]
|
node1 = cluster.instances["node3"]
|
||||||
node1.query(
|
node1.query(
|
||||||
"CREATE DATABASE rdb ENGINE=Replicated('/test/rdb', 's1', 'r1')",
|
"CREATE DATABASE rdb ENGINE=Replicated('/test/rdb', 's1', 'r1')",
|
||||||
settings={"allow_experimental_database_replicated": 1},
|
|
||||||
)
|
)
|
||||||
|
|
||||||
global uuids
|
global uuids
|
||||||
@ -312,7 +311,6 @@ def test_replicated_database(cluster):
|
|||||||
node2 = cluster.instances["node2"]
|
node2 = cluster.instances["node2"]
|
||||||
node2.query(
|
node2.query(
|
||||||
"CREATE DATABASE rdb ENGINE=Replicated('/test/rdb', 's1', 'r2')",
|
"CREATE DATABASE rdb ENGINE=Replicated('/test/rdb', 's1', 'r2')",
|
||||||
settings={"allow_experimental_database_replicated": 1},
|
|
||||||
)
|
)
|
||||||
node2.query("SYSTEM SYNC DATABASE REPLICA rdb")
|
node2.query("SYSTEM SYNC DATABASE REPLICA rdb")
|
||||||
|
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
<tcp_port>9000</tcp_port>
|
<tcp_port>9000</tcp_port>
|
||||||
<profiles>
|
<profiles>
|
||||||
<default>
|
<default>
|
||||||
<allow_experimental_database_replicated>1</allow_experimental_database_replicated>
|
|
||||||
</default>
|
</default>
|
||||||
</profiles>
|
</profiles>
|
||||||
<users>
|
<users>
|
||||||
|
@ -37,18 +37,13 @@ def start_cluster():
|
|||||||
|
|
||||||
|
|
||||||
def test_drop_if_empty(start_cluster):
|
def test_drop_if_empty(start_cluster):
|
||||||
settings = {
|
|
||||||
"allow_experimental_database_replicated": 1,
|
|
||||||
}
|
|
||||||
node1.query(
|
node1.query(
|
||||||
"CREATE DATABASE replicateddb "
|
"CREATE DATABASE replicateddb "
|
||||||
"ENGINE = Replicated('/clickhouse/databases/replicateddb', 'shard1', 'node1')",
|
"ENGINE = Replicated('/clickhouse/databases/replicateddb', 'shard1', 'node1')",
|
||||||
settings=settings,
|
|
||||||
)
|
)
|
||||||
node2.query(
|
node2.query(
|
||||||
"CREATE DATABASE replicateddb "
|
"CREATE DATABASE replicateddb "
|
||||||
"ENGINE = Replicated('/clickhouse/databases/replicateddb', 'shard1', 'node2')",
|
"ENGINE = Replicated('/clickhouse/databases/replicateddb', 'shard1', 'node2')",
|
||||||
settings=settings,
|
|
||||||
)
|
)
|
||||||
node1.query(
|
node1.query(
|
||||||
"CREATE TABLE default.tbl ON CLUSTER 'cluster' ("
|
"CREATE TABLE default.tbl ON CLUSTER 'cluster' ("
|
||||||
|
@ -66,7 +66,6 @@ def test_ddl(started_cluster):
|
|||||||
def test_ddl_replicated(started_cluster):
|
def test_ddl_replicated(started_cluster):
|
||||||
control_node.query(
|
control_node.query(
|
||||||
"CREATE DATABASE test_db ON CLUSTER 'external' ENGINE=Replicated('/replicated')",
|
"CREATE DATABASE test_db ON CLUSTER 'external' ENGINE=Replicated('/replicated')",
|
||||||
settings={"allow_experimental_database_replicated": 1},
|
|
||||||
)
|
)
|
||||||
# Exception is expected
|
# Exception is expected
|
||||||
assert "It's not initial query" in control_node.query_and_get_error(
|
assert "It's not initial query" in control_node.query_and_get_error(
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
<profiles>
|
<profiles>
|
||||||
<default>
|
<default>
|
||||||
<allow_drop_detached>1</allow_drop_detached>
|
<allow_drop_detached>1</allow_drop_detached>
|
||||||
<allow_experimental_database_replicated>1</allow_experimental_database_replicated>
|
|
||||||
<allow_experimental_alter_materialized_view_structure>1</allow_experimental_alter_materialized_view_structure>
|
<allow_experimental_alter_materialized_view_structure>1</allow_experimental_alter_materialized_view_structure>
|
||||||
<allow_experimental_object_type>0</allow_experimental_object_type>
|
<allow_experimental_object_type>0</allow_experimental_object_type>
|
||||||
<allow_suspicious_codecs>0</allow_suspicious_codecs>
|
<allow_suspicious_codecs>0</allow_suspicious_codecs>
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
<profiles>
|
<profiles>
|
||||||
<default>
|
<default>
|
||||||
<allow_drop_detached>1</allow_drop_detached>
|
<allow_drop_detached>1</allow_drop_detached>
|
||||||
<allow_experimental_database_replicated>1</allow_experimental_database_replicated>
|
|
||||||
<allow_experimental_alter_materialized_view_structure>1</allow_experimental_alter_materialized_view_structure>
|
<allow_experimental_alter_materialized_view_structure>1</allow_experimental_alter_materialized_view_structure>
|
||||||
</default>
|
</default>
|
||||||
</profiles>
|
</profiles>
|
||||||
|
@ -15,7 +15,7 @@ function create_db()
|
|||||||
SUFFIX=$(($RANDOM % 16))
|
SUFFIX=$(($RANDOM % 16))
|
||||||
# Multiple database replicas on one server are actually not supported (until we have namespaces).
|
# Multiple database replicas on one server are actually not supported (until we have namespaces).
|
||||||
# So CREATE TABLE queries will fail on all replicas except one. But it's still makes sense for a stress test.
|
# So CREATE TABLE queries will fail on all replicas except one. But it's still makes sense for a stress test.
|
||||||
$CLICKHOUSE_CLIENT --allow_experimental_database_replicated=1 --query \
|
$CLICKHOUSE_CLIENT --query \
|
||||||
"create database if not exists ${CLICKHOUSE_DATABASE}_repl_01111_$SUFFIX engine=Replicated('/test/01111/$CLICKHOUSE_TEST_ZOOKEEPER_PREFIX', '$SHARD', '$REPLICA')" \
|
"create database if not exists ${CLICKHOUSE_DATABASE}_repl_01111_$SUFFIX engine=Replicated('/test/01111/$CLICKHOUSE_TEST_ZOOKEEPER_PREFIX', '$SHARD', '$REPLICA')" \
|
||||||
2>&1| grep -Fa "Exception: " | grep -Fv "REPLICA_ALREADY_EXISTS" | grep -Fiv "Will not try to start it up" | \
|
2>&1| grep -Fa "Exception: " | grep -Fv "REPLICA_ALREADY_EXISTS" | grep -Fiv "Will not try to start it up" | \
|
||||||
grep -Fv "Coordination::Exception" | grep -Fv "already contains some data and it does not look like Replicated database path"
|
grep -Fv "Coordination::Exception" | grep -Fv "already contains some data and it does not look like Replicated database path"
|
||||||
|
@ -43,7 +43,6 @@ DROP DATABASE test_01148_atomic;
|
|||||||
DROP TABLE rmt;
|
DROP TABLE rmt;
|
||||||
DROP TABLE rmt1;
|
DROP TABLE rmt1;
|
||||||
|
|
||||||
SET allow_experimental_database_replicated=1;
|
|
||||||
DROP DATABASE IF EXISTS imdb_01148;
|
DROP DATABASE IF EXISTS imdb_01148;
|
||||||
CREATE DATABASE imdb_01148 ENGINE = Replicated('/test/databases/imdb_01148', '{shard}', '{replica}');
|
CREATE DATABASE imdb_01148 ENGINE = Replicated('/test/databases/imdb_01148', '{shard}', '{replica}');
|
||||||
CREATE TABLE imdb_01148.movie_directors (`director_id` UInt64, `movie_id` UInt64) ENGINE = ReplicatedMergeTree ORDER BY (director_id, movie_id) SETTINGS index_granularity = 8192;
|
CREATE TABLE imdb_01148.movie_directors (`director_id` UInt64, `movie_id` UInt64) ENGINE = ReplicatedMergeTree ORDER BY (director_id, movie_id) SETTINGS index_granularity = 8192;
|
||||||
|
@ -34,5 +34,4 @@ test_db_comments "Ordinary"
|
|||||||
test_db_comments "Lazy(1)"
|
test_db_comments "Lazy(1)"
|
||||||
# test_db_comments "MySQL('127.0.0.1:9004', 'default', 'default', '')" # fails due to CH internal reasons
|
# test_db_comments "MySQL('127.0.0.1:9004', 'default', 'default', '')" # fails due to CH internal reasons
|
||||||
# test_db_comments "SQLite('dummy_sqlitedb')"
|
# test_db_comments "SQLite('dummy_sqlitedb')"
|
||||||
## needs to be explicitly enabled with `SET allow_experimental_database_replicated=1`
|
|
||||||
# test_db_comments "Replicated('/clickhouse/$CLICKHOUSE_TEST_ZOOKEEPER_PREFIX', '1') ORDER BY k"
|
# test_db_comments "Replicated('/clickhouse/$CLICKHOUSE_TEST_ZOOKEEPER_PREFIX', '1') ORDER BY k"
|
||||||
|
@ -10,7 +10,7 @@ ${CLICKHOUSE_CLIENT} -q "create table mute_stylecheck (x UInt32) engine = Replic
|
|||||||
${CLICKHOUSE_CLIENT} -q "CREATE USER user_${CLICKHOUSE_DATABASE} settings database_replicated_allow_only_replicated_engine=1"
|
${CLICKHOUSE_CLIENT} -q "CREATE USER user_${CLICKHOUSE_DATABASE} settings database_replicated_allow_only_replicated_engine=1"
|
||||||
${CLICKHOUSE_CLIENT} -q "GRANT CREATE TABLE ON ${CLICKHOUSE_DATABASE}_db.* TO user_${CLICKHOUSE_DATABASE}"
|
${CLICKHOUSE_CLIENT} -q "GRANT CREATE TABLE ON ${CLICKHOUSE_DATABASE}_db.* TO user_${CLICKHOUSE_DATABASE}"
|
||||||
${CLICKHOUSE_CLIENT} -q "GRANT TABLE ENGINE ON Memory, TABLE ENGINE ON MergeTree, TABLE ENGINE ON ReplicatedMergeTree TO user_${CLICKHOUSE_DATABASE}"
|
${CLICKHOUSE_CLIENT} -q "GRANT TABLE ENGINE ON Memory, TABLE ENGINE ON MergeTree, TABLE ENGINE ON ReplicatedMergeTree TO user_${CLICKHOUSE_DATABASE}"
|
||||||
${CLICKHOUSE_CLIENT} --allow_experimental_database_replicated=1 --query "CREATE DATABASE ${CLICKHOUSE_DATABASE}_db engine = Replicated('/clickhouse/databases/${CLICKHOUSE_TEST_ZOOKEEPER_PREFIX}/${CLICKHOUSE_DATABASE}_db', '{shard}', '{replica}')"
|
${CLICKHOUSE_CLIENT} -q "CREATE DATABASE ${CLICKHOUSE_DATABASE}_db engine = Replicated('/clickhouse/databases/${CLICKHOUSE_TEST_ZOOKEEPER_PREFIX}/${CLICKHOUSE_DATABASE}_db', '{shard}', '{replica}')"
|
||||||
${CLICKHOUSE_CLIENT} --distributed_ddl_output_mode=none --user "user_${CLICKHOUSE_DATABASE}" --query "CREATE TABLE ${CLICKHOUSE_DATABASE}_db.tab_memory (x UInt32) engine = Memory;"
|
${CLICKHOUSE_CLIENT} --distributed_ddl_output_mode=none --user "user_${CLICKHOUSE_DATABASE}" --query "CREATE TABLE ${CLICKHOUSE_DATABASE}_db.tab_memory (x UInt32) engine = Memory;"
|
||||||
${CLICKHOUSE_CLIENT} --distributed_ddl_output_mode=none --user "user_${CLICKHOUSE_DATABASE}" -n --query "CREATE TABLE ${CLICKHOUSE_DATABASE}_db.tab_mt (x UInt32) engine = MergeTree order by x;" 2>&1 | grep -o "Only tables with a Replicated engine"
|
${CLICKHOUSE_CLIENT} --distributed_ddl_output_mode=none --user "user_${CLICKHOUSE_DATABASE}" -n --query "CREATE TABLE ${CLICKHOUSE_DATABASE}_db.tab_mt (x UInt32) engine = MergeTree order by x;" 2>&1 | grep -o "Only tables with a Replicated engine"
|
||||||
${CLICKHOUSE_CLIENT} --distributed_ddl_output_mode=none -n --query "CREATE TABLE ${CLICKHOUSE_DATABASE}_db.tab_mt (x UInt32) engine = MergeTree order by x;"
|
${CLICKHOUSE_CLIENT} --distributed_ddl_output_mode=none -n --query "CREATE TABLE ${CLICKHOUSE_DATABASE}_db.tab_mt (x UInt32) engine = MergeTree order by x;"
|
||||||
|
@ -21,7 +21,6 @@ select * from t_l5ydey order by c_qv5rv;
|
|||||||
show create t_l5ydey;
|
show create t_l5ydey;
|
||||||
|
|
||||||
-- Correct error code if creating database with the same path as table has
|
-- Correct error code if creating database with the same path as table has
|
||||||
set allow_experimental_database_replicated=1;
|
|
||||||
create database local_t_l5ydey engine=Replicated('/clickhouse/tables/test_' || currentDatabase() || '/{shard}/local_t_l5ydey', '1', '1'); -- { serverError BAD_ARGUMENTS }
|
create database local_t_l5ydey engine=Replicated('/clickhouse/tables/test_' || currentDatabase() || '/{shard}/local_t_l5ydey', '1', '1'); -- { serverError BAD_ARGUMENTS }
|
||||||
|
|
||||||
drop table local_t_l5ydey;
|
drop table local_t_l5ydey;
|
||||||
|
@ -8,7 +8,7 @@ db="rdb_$CLICKHOUSE_DATABASE"
|
|||||||
db2="${db}_2"
|
db2="${db}_2"
|
||||||
db3="${db}_3"
|
db3="${db}_3"
|
||||||
|
|
||||||
$CLICKHOUSE_CLIENT --allow_experimental_database_replicated=1 -q "create database $db engine=Replicated('/test/$CLICKHOUSE_DATABASE/rdb', 's1', 'r1')"
|
$CLICKHOUSE_CLIENT -q "create database $db engine=Replicated('/test/$CLICKHOUSE_DATABASE/rdb', 's1', 'r1')"
|
||||||
|
|
||||||
$CLICKHOUSE_CLIENT --distributed_ddl_output_mode=none -q "create table $db.mt (n int) engine=MergeTree order by tuple()"
|
$CLICKHOUSE_CLIENT --distributed_ddl_output_mode=none -q "create table $db.mt (n int) engine=MergeTree order by tuple()"
|
||||||
$CLICKHOUSE_CLIENT --distributed_ddl_output_mode=none -q "create table $db.rmt (n int) engine=ReplicatedMergeTree order by tuple()"
|
$CLICKHOUSE_CLIENT --distributed_ddl_output_mode=none -q "create table $db.rmt (n int) engine=ReplicatedMergeTree order by tuple()"
|
||||||
@ -16,8 +16,8 @@ $CLICKHOUSE_CLIENT --distributed_ddl_output_mode=none -q "create table $db.rmt (
|
|||||||
$CLICKHOUSE_CLIENT -q "insert into $db.rmt values (0), (1)"
|
$CLICKHOUSE_CLIENT -q "insert into $db.rmt values (0), (1)"
|
||||||
$CLICKHOUSE_CLIENT -q "insert into $db.mt values (0), (1)"
|
$CLICKHOUSE_CLIENT -q "insert into $db.mt values (0), (1)"
|
||||||
|
|
||||||
$CLICKHOUSE_CLIENT --allow_experimental_database_replicated=1 -q "create database $db2 engine=Replicated('/test/$CLICKHOUSE_DATABASE/rdb', 's1', 'r2')"
|
$CLICKHOUSE_CLIENT -q "create database $db2 engine=Replicated('/test/$CLICKHOUSE_DATABASE/rdb', 's1', 'r2')"
|
||||||
$CLICKHOUSE_CLIENT --allow_experimental_database_replicated=1 -q "create database $db3 engine=Replicated('/test/$CLICKHOUSE_DATABASE/rdb', 's2', 'r1')"
|
$CLICKHOUSE_CLIENT -q "create database $db3 engine=Replicated('/test/$CLICKHOUSE_DATABASE/rdb', 's2', 'r1')"
|
||||||
|
|
||||||
$CLICKHOUSE_CLIENT -q "alter table $db.mt drop partition id 'all', add column m int" 2>&1| grep -Eo "not allowed to execute ALTERs of different types" | head -1
|
$CLICKHOUSE_CLIENT -q "alter table $db.mt drop partition id 'all', add column m int" 2>&1| grep -Eo "not allowed to execute ALTERs of different types" | head -1
|
||||||
$CLICKHOUSE_CLIENT -q "alter table $db.rmt drop partition id 'all', add column m int" 2>&1| grep -Eo "not allowed to execute ALTERs of different types" | head -1
|
$CLICKHOUSE_CLIENT -q "alter table $db.rmt drop partition id 'all', add column m int" 2>&1| grep -Eo "not allowed to execute ALTERs of different types" | head -1
|
||||||
|
@ -7,7 +7,7 @@ CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
|||||||
db="rdb_$CLICKHOUSE_DATABASE"
|
db="rdb_$CLICKHOUSE_DATABASE"
|
||||||
|
|
||||||
$CLICKHOUSE_CLIENT -q "system flush logs"
|
$CLICKHOUSE_CLIENT -q "system flush logs"
|
||||||
$CLICKHOUSE_CLIENT --allow_experimental_database_replicated=1 -q "create database $db engine=Replicated('/test/$CLICKHOUSE_DATABASE/rdb', 's1', 'r1')"
|
$CLICKHOUSE_CLIENT -q "create database $db engine=Replicated('/test/$CLICKHOUSE_DATABASE/rdb', 's1', 'r1')"
|
||||||
$CLICKHOUSE_CLIENT --distributed_ddl_output_mode=none -q "create table $db.t as system.query_log" # Suppress style check: current_database=$CLICKHOUSE_DATABASE
|
$CLICKHOUSE_CLIENT --distributed_ddl_output_mode=none -q "create table $db.t as system.query_log" # Suppress style check: current_database=$CLICKHOUSE_DATABASE
|
||||||
$CLICKHOUSE_CLIENT -q "show tables from $db"
|
$CLICKHOUSE_CLIENT -q "show tables from $db"
|
||||||
|
|
||||||
@ -26,8 +26,8 @@ $CLICKHOUSE_CLIENT -q "system drop database replica 's2/r1' from zkpath '/test/$
|
|||||||
|
|
||||||
db2="${db}_2"
|
db2="${db}_2"
|
||||||
db3="${db}_3"
|
db3="${db}_3"
|
||||||
$CLICKHOUSE_CLIENT --allow_experimental_database_replicated=1 -q "create database $db2 engine=Replicated('/test/$CLICKHOUSE_DATABASE/rdb', 's1', 'r2')"
|
$CLICKHOUSE_CLIENT -q "create database $db2 engine=Replicated('/test/$CLICKHOUSE_DATABASE/rdb', 's1', 'r2')"
|
||||||
$CLICKHOUSE_CLIENT --allow_experimental_database_replicated=1 -q "create database $db3 engine=Replicated('/test/$CLICKHOUSE_DATABASE/rdb', 's2', 'r1')"
|
$CLICKHOUSE_CLIENT -q "create database $db3 engine=Replicated('/test/$CLICKHOUSE_DATABASE/rdb', 's2', 'r1')"
|
||||||
$CLICKHOUSE_CLIENT -q "system sync database replica $db"
|
$CLICKHOUSE_CLIENT -q "system sync database replica $db"
|
||||||
$CLICKHOUSE_CLIENT -q "select cluster, shard_num, replica_num, database_shard_name, database_replica_name, is_active from system.clusters where cluster='$db' and shard_num=1 and replica_num=1"
|
$CLICKHOUSE_CLIENT -q "select cluster, shard_num, replica_num, database_shard_name, database_replica_name, is_active from system.clusters where cluster='$db' and shard_num=1 and replica_num=1"
|
||||||
$CLICKHOUSE_CLIENT -q "system drop database replica 's1|r1' from database $db2" 2>&1| grep -Fac "is active, cannot drop it"
|
$CLICKHOUSE_CLIENT -q "system drop database replica 's1|r1' from database $db2" 2>&1| grep -Fac "is active, cannot drop it"
|
||||||
@ -56,7 +56,7 @@ $CLICKHOUSE_CLIENT --distributed_ddl_output_mode=none -q "create table $db.t2 as
|
|||||||
$CLICKHOUSE_CLIENT -q "show tables from $db"
|
$CLICKHOUSE_CLIENT -q "show tables from $db"
|
||||||
|
|
||||||
db4="${db}_4"
|
db4="${db}_4"
|
||||||
$CLICKHOUSE_CLIENT --allow_experimental_database_replicated=1 -q "create database $db4 engine=Replicated('/test/$CLICKHOUSE_DATABASE/rdb', 's1', 'r1')"
|
$CLICKHOUSE_CLIENT -q "create database $db4 engine=Replicated('/test/$CLICKHOUSE_DATABASE/rdb', 's1', 'r1')"
|
||||||
$CLICKHOUSE_CLIENT -q "system sync database replica $db4"
|
$CLICKHOUSE_CLIENT -q "system sync database replica $db4"
|
||||||
$CLICKHOUSE_CLIENT -q "select cluster, shard_num, replica_num, database_shard_name, database_replica_name, is_active from system.clusters where cluster='$db4'"
|
$CLICKHOUSE_CLIENT -q "select cluster, shard_num, replica_num, database_shard_name, database_replica_name, is_active from system.clusters where cluster='$db4'"
|
||||||
|
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
-- Tags: no-parallel
|
-- Tags: no-parallel
|
||||||
|
|
||||||
DROP DATABASE IF EXISTS replicated_database_test;
|
DROP DATABASE IF EXISTS replicated_database_test;
|
||||||
SET allow_experimental_database_replicated=1;
|
|
||||||
CREATE DATABASE IF NOT EXISTS replicated_database_test ENGINE = Replicated('some/path/' || currentDatabase() || '/replicated_database_test', 'shard_1', 'replica_1') SETTINGS max_broken_tables_ratio=1;
|
CREATE DATABASE IF NOT EXISTS replicated_database_test ENGINE = Replicated('some/path/' || currentDatabase() || '/replicated_database_test', 'shard_1', 'replica_1') SETTINGS max_broken_tables_ratio=1;
|
||||||
SELECT engine_full FROM system.databases WHERE name = 'replicated_database_test';
|
SELECT engine_full FROM system.databases WHERE name = 'replicated_database_test';
|
||||||
DROP DATABASE IF EXISTS replicated_database_test;
|
DROP DATABASE IF EXISTS replicated_database_test;
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ ${CLICKHOUSE_CLIENT} -q "create table mute_stylecheck (x UInt32) engine = Replic
|
|||||||
${CLICKHOUSE_CLIENT} -q "CREATE USER user_${CLICKHOUSE_DATABASE} settings database_replicated_allow_replicated_engine_arguments=0"
|
${CLICKHOUSE_CLIENT} -q "CREATE USER user_${CLICKHOUSE_DATABASE} settings database_replicated_allow_replicated_engine_arguments=0"
|
||||||
${CLICKHOUSE_CLIENT} -q "GRANT CREATE TABLE ON ${CLICKHOUSE_DATABASE}_db.* TO user_${CLICKHOUSE_DATABASE}"
|
${CLICKHOUSE_CLIENT} -q "GRANT CREATE TABLE ON ${CLICKHOUSE_DATABASE}_db.* TO user_${CLICKHOUSE_DATABASE}"
|
||||||
${CLICKHOUSE_CLIENT} -q "GRANT TABLE ENGINE ON ReplicatedMergeTree TO user_${CLICKHOUSE_DATABASE}"
|
${CLICKHOUSE_CLIENT} -q "GRANT TABLE ENGINE ON ReplicatedMergeTree TO user_${CLICKHOUSE_DATABASE}"
|
||||||
${CLICKHOUSE_CLIENT} --allow_experimental_database_replicated=1 --query "CREATE DATABASE ${CLICKHOUSE_DATABASE}_db engine = Replicated('/clickhouse/databases/${CLICKHOUSE_TEST_ZOOKEEPER_PREFIX}/${CLICKHOUSE_DATABASE}_db', '{shard}', '{replica}')"
|
${CLICKHOUSE_CLIENT} -q "CREATE DATABASE ${CLICKHOUSE_DATABASE}_db engine = Replicated('/clickhouse/databases/${CLICKHOUSE_TEST_ZOOKEEPER_PREFIX}/${CLICKHOUSE_DATABASE}_db', '{shard}', '{replica}')"
|
||||||
${CLICKHOUSE_CLIENT} --distributed_ddl_output_mode=none --user "user_${CLICKHOUSE_DATABASE}" -n --query "CREATE TABLE ${CLICKHOUSE_DATABASE}_db.tab_rmt_ok (x UInt32) engine = ReplicatedMergeTree order by x;"
|
${CLICKHOUSE_CLIENT} --distributed_ddl_output_mode=none --user "user_${CLICKHOUSE_DATABASE}" -n --query "CREATE TABLE ${CLICKHOUSE_DATABASE}_db.tab_rmt_ok (x UInt32) engine = ReplicatedMergeTree order by x;"
|
||||||
${CLICKHOUSE_CLIENT} --distributed_ddl_output_mode=none --user "user_${CLICKHOUSE_DATABASE}" -n --query "CREATE TABLE ${CLICKHOUSE_DATABASE}_db.tab_rmt_fail (x UInt32) engine = ReplicatedMergeTree('/clickhouse/tables/$CLICKHOUSE_TEST_ZOOKEEPER_PREFIX/root/{shard}', '{replica}') order by x; -- { serverError 80 }"
|
${CLICKHOUSE_CLIENT} --distributed_ddl_output_mode=none --user "user_${CLICKHOUSE_DATABASE}" -n --query "CREATE TABLE ${CLICKHOUSE_DATABASE}_db.tab_rmt_fail (x UInt32) engine = ReplicatedMergeTree('/clickhouse/tables/$CLICKHOUSE_TEST_ZOOKEEPER_PREFIX/root/{shard}', '{replica}') order by x; -- { serverError 80 }"
|
||||||
${CLICKHOUSE_CLIENT} --query "DROP DATABASE ${CLICKHOUSE_DATABASE}_db"
|
${CLICKHOUSE_CLIENT} --query "DROP DATABASE ${CLICKHOUSE_DATABASE}_db"
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
-- Tags: no-parallel
|
-- Tags: no-parallel
|
||||||
|
|
||||||
SET allow_experimental_database_replicated=1;
|
|
||||||
|
|
||||||
DROP DATABASE IF EXISTS replicated_database_params;
|
DROP DATABASE IF EXISTS replicated_database_params;
|
||||||
|
|
||||||
CREATE DATABASE replicated_database_params ENGINE = Replicated('some/path/' || currentDatabase() || '/replicated_database_params');
|
CREATE DATABASE replicated_database_params ENGINE = Replicated('some/path/' || currentDatabase() || '/replicated_database_params');
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
-- Tags: no-parallel
|
-- Tags: no-parallel
|
||||||
|
|
||||||
set allow_experimental_database_replicated=1;
|
|
||||||
create database replicated_db_no_args engine=Replicated; -- { serverError BAD_ARGUMENTS }
|
create database replicated_db_no_args engine=Replicated; -- { serverError BAD_ARGUMENTS }
|
||||||
|
@ -8,7 +8,7 @@ CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
|||||||
# shellcheck source=../shell_config.sh
|
# shellcheck source=../shell_config.sh
|
||||||
. "$CURDIR"/../shell_config.sh
|
. "$CURDIR"/../shell_config.sh
|
||||||
|
|
||||||
${CLICKHOUSE_CLIENT} --allow_experimental_database_replicated=1 --query "CREATE DATABASE ${CLICKHOUSE_DATABASE}_db engine = Replicated('/clickhouse/databases/${CLICKHOUSE_TEST_ZOOKEEPER_PREFIX}/${CLICKHOUSE_DATABASE}_db', '{shard}', '{replica}')"
|
${CLICKHOUSE_CLIENT} --query "CREATE DATABASE ${CLICKHOUSE_DATABASE}_db engine = Replicated('/clickhouse/databases/${CLICKHOUSE_TEST_ZOOKEEPER_PREFIX}/${CLICKHOUSE_DATABASE}_db', '{shard}', '{replica}')"
|
||||||
# Non-replicated engines are allowed
|
# Non-replicated engines are allowed
|
||||||
${CLICKHOUSE_CLIENT} --distributed_ddl_output_mode=none --query "CREATE TABLE ${CLICKHOUSE_DATABASE}_db.test (id UInt64) ENGINE = MergeTree() ORDER BY id AS SELECT 1"
|
${CLICKHOUSE_CLIENT} --distributed_ddl_output_mode=none --query "CREATE TABLE ${CLICKHOUSE_DATABASE}_db.test (id UInt64) ENGINE = MergeTree() ORDER BY id AS SELECT 1"
|
||||||
# Replicated storafes are forbidden
|
# Replicated storafes are forbidden
|
||||||
|
Loading…
Reference in New Issue
Block a user