2021-02-11 11:46:18 +00:00
|
|
|
DROP TABLE IF EXISTS i20203_1;
|
|
|
|
DROP TABLE IF EXISTS i20203_2;
|
|
|
|
|
|
|
|
CREATE TABLE i20203_1 (a Int8)
|
2021-02-11 15:29:08 +00:00
|
|
|
ENGINE = ReplicatedMergeTree('/clickhouse/01715_background_checker_i20203', 'r1')
|
2021-02-11 11:46:18 +00:00
|
|
|
ORDER BY tuple();
|
|
|
|
|
|
|
|
CREATE TABLE i20203_2 (a Int8)
|
2021-02-11 15:29:08 +00:00
|
|
|
ENGINE = ReplicatedMergeTree('/clickhouse/01715_background_checker_i20203', 'r2')
|
2021-02-11 11:46:18 +00:00
|
|
|
ORDER BY tuple();
|
|
|
|
|
|
|
|
DETACH TABLE i20203_2;
|
|
|
|
INSERT INTO i20203_1 VALUES (2);
|
|
|
|
|
|
|
|
DETACH TABLE i20203_1;
|
|
|
|
ATTACH TABLE i20203_2;
|
|
|
|
|
|
|
|
-- sleep 10 seconds
|
|
|
|
SELECT number from numbers(10) where sleepEachRow(1) Format Null;
|
|
|
|
|
|
|
|
SELECT num_tries < 50
|
|
|
|
FROM system.replication_queue
|
|
|
|
WHERE table = 'i20203_2' AND database = currentDatabase();
|
|
|
|
|
2021-02-11 15:29:08 +00:00
|
|
|
ATTACH TABLE i20203_1;
|
|
|
|
|
2021-02-11 11:46:18 +00:00
|
|
|
DROP TABLE IF EXISTS i20203_1;
|
|
|
|
DROP TABLE IF EXISTS i20203_2;
|