Attempt to create replicated table with invalid zk path leads to empty table data dir on file system, and subsequent attempts results to "Directory for table data already exists" errors.
sas-644d9zs4v9adt4ka.db.yandex.net :) create table test (date Date, n UInt32) ENGINE = ReplicatedMergeTree('/{invalid}/table', '{replica}') PARTITION BY date ORDER BY (date, n)
CREATE TABLE test
(
`date` Date,
`n` UInt32
)
ENGINE = ReplicatedMergeTree('/{invalid}/table', '{replica}')
PARTITION BY date
ORDER BY (date, n)
Received exception from server (version 20.6.4):
Code: 62. DB::Exception: Received from localhost:9001. DB::Exception: No macro 'invalid' in config while processing substitutions in '/{invalid}/table' at 2.
0 rows in set. Elapsed: 0.020 sec.
sas-644d9zs4v9adt4ka.db.yandex.net :) create table test (date Date, n UInt32) ENGINE = ReplicatedMergeTree('/table', '{replica}') PARTITION BY date ORDER BY (date, n)
CREATE TABLE test
(
`date` Date,
`n` UInt32
)
ENGINE = ReplicatedMergeTree('/table', '{replica}')
PARTITION BY date
ORDER BY (date, n)
Received exception from server (version 20.6.4):
Code: 57. DB::Exception: Received from localhost:9001. DB::Exception: Directory for table data data/default/test/ already exists.
0 rows in set. Elapsed: 0.011 sec.
Attempt to create replicated table with invalid zk path leads to empty table data dir on file system, and subsequent attempts results to "Directory for table data already exists" errors.
ClickHouse version: 20.6.4
Steps to reproduce
Similar issue: #11432