ClickHouse/tests/queries/0_stateless/02990_rmt_replica_path_uuid.reference
Azat Khuzhin 58e5d7876b Allow uuid in replica_path if CREATE TABLE explicitly has it
Right now the query with {uuid} macro without ON CLUSTER fails:

    CREATE TABLE x UUID 'aaaaaaaa-1111-2222-3333-aaaaaaaaaaaa' (key Int) ENGINE = ReplicatedMergeTree('/tables/{database}/{uuid}', 'r1') ORDER BY tuple();

There is a workaround right now to use ATTACH instead of CREATE, but
ATTACH is not CREATE.

CREATE still useful for proper RESTORE without ON CLUSTER.

So this patch allows this syntax, but only if UUID had been explicitly
passed in the query. This looks safe.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-02-13 08:01:09 +01:00

5 lines
204 B
Plaintext

aaaaaaaa-1111-2222-3333-aaaaaaaaaaaa
/tables/default/aaaaaaaa-1111-2222-3333-aaaaaaaaaaaa/replicas/r1
aaaaaaaa-1111-2222-3333-aaaaaaaaaaaa
/tables/default/aaaaaaaa-1111-2222-3333-aaaaaaaaaaaa/replicas/r1