mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-11 10:04:06 +00:00
107d83b654
Also mark some tests as sequential-only.
43 lines
1.0 KiB
SQL
43 lines
1.0 KiB
SQL
DROP TABLE IF EXISTS mt_01451;
|
|
|
|
CREATE TABLE mt_01451 (v UInt8) ENGINE = MergeTree() order by tuple();
|
|
SYSTEM STOP MERGES mt_01451;
|
|
|
|
INSERT INTO mt_01451 VALUES (0);
|
|
INSERT INTO mt_01451 VALUES (1);
|
|
INSERT INTO mt_01451 VALUES (2);
|
|
|
|
SELECT v FROM mt_01451 ORDER BY v;
|
|
|
|
ALTER TABLE mt_01451 DETACH PART 'all_100_100_0'; -- { serverError 232 }
|
|
|
|
ALTER TABLE mt_01451 DETACH PART 'all_2_2_0';
|
|
|
|
SELECT v FROM mt_01451 ORDER BY v;
|
|
|
|
SELECT name FROM system.detached_parts WHERE table = 'mt_01451';
|
|
|
|
ALTER TABLE mt_01451 ATTACH PART 'all_2_2_0';
|
|
|
|
SELECT v FROM mt_01451 ORDER BY v;
|
|
|
|
SELECT name FROM system.detached_parts WHERE table = 'mt_01451';
|
|
|
|
SELECT '-- drop part --';
|
|
|
|
ALTER TABLE mt_01451 DROP PART 'all_4_4_0';
|
|
|
|
ALTER TABLE mt_01451 ATTACH PART 'all_4_4_0'; -- { serverError 233 }
|
|
|
|
SELECT v FROM mt_01451 ORDER BY v;
|
|
|
|
SELECT '-- resume merges --';
|
|
SYSTEM START MERGES mt_01451;
|
|
OPTIMIZE TABLE mt_01451 FINAL;
|
|
|
|
SELECT v FROM mt_01451 ORDER BY v;
|
|
|
|
SELECT name FROM system.parts WHERE table = 'mt_01451' AND active;
|
|
|
|
DROP TABLE mt_01451;
|