mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 07:31:57 +00:00
Fixed tests isolation. [#CLICKHOUSE-2]
This commit is contained in:
parent
0957fd08a6
commit
ed25e6d634
@ -1,20 +1,21 @@
|
||||
DROP TABLE IF EXISTS test.clear_column1;
|
||||
DROP TABLE IF EXISTS test.clear_column2;
|
||||
CREATE TABLE test.clear_column1 (p Int64, i Int64, v UInt64) ENGINE = ReplicatedReplacingMergeTree('/clickhouse/tables/test/clear_column', '1', v) PARTITION BY p ORDER BY i;
|
||||
CREATE TABLE test.clear_column2 (p Int64, i Int64, v UInt64) ENGINE = ReplicatedReplacingMergeTree('/clickhouse/tables/test/clear_column', '2', v) PARTITION BY p ORDER BY i;
|
||||
DROP TABLE IF EXISTS test.rename1;
|
||||
DROP TABLE IF EXISTS test.rename2;
|
||||
CREATE TABLE test.rename1 (p Int64, i Int64, v UInt64) ENGINE = ReplicatedReplacingMergeTree('/clickhouse/test/tables/rename', '1', v) PARTITION BY p ORDER BY i;
|
||||
CREATE TABLE test.rename2 (p Int64, i Int64, v UInt64) ENGINE = ReplicatedReplacingMergeTree('/clickhouse/test/tables/rename', '2', v) PARTITION BY p ORDER BY i;
|
||||
|
||||
INSERT INTO test.clear_column1 VALUES (0, 1, 0);
|
||||
INSERT INTO test.clear_column1 VALUES (0, 1, 1);
|
||||
INSERT INTO test.rename1 VALUES (0, 1, 0);
|
||||
INSERT INTO test.rename1 VALUES (0, 1, 1);
|
||||
|
||||
OPTIMIZE TABLE test.clear_column1;
|
||||
OPTIMIZE TABLE test.clear_column2;
|
||||
SELECT * FROM test.clear_column1;
|
||||
OPTIMIZE TABLE test.rename1;
|
||||
OPTIMIZE TABLE test.rename2;
|
||||
SELECT * FROM test.rename1;
|
||||
|
||||
RENAME TABLE test.clear_column2 TO test.clear_column3;
|
||||
RENAME TABLE test.rename2 TO test.rename3;
|
||||
|
||||
INSERT INTO test.clear_column1 VALUES (0, 1, 2);
|
||||
OPTIMIZE TABLE test.clear_column3;
|
||||
SELECT * FROM test.clear_column1;
|
||||
INSERT INTO test.rename1 VALUES (0, 1, 2);
|
||||
OPTIMIZE TABLE test.rename3;
|
||||
SELECT * FROM test.rename1;
|
||||
|
||||
DROP TABLE IF EXISTS test.clear_column1;
|
||||
DROP TABLE IF EXISTS test.clear_column2;
|
||||
DROP TABLE IF EXISTS test.rename1;
|
||||
DROP TABLE IF EXISTS test.rename2;
|
||||
DROP TABLE IF EXISTS test.rename3;
|
Loading…
Reference in New Issue
Block a user