ClickHouse/tests/queries/0_stateless/01060_shutdown_table_after_detach.sql

18 lines
367 B
MySQL
Raw Normal View History

2020-01-24 20:14:42 +00:00
DROP TABLE IF EXISTS test;
CREATE TABLE test Engine = MergeTree ORDER BY number AS SELECT number, toString(rand()) x from numbers(10000000);
2020-01-10 11:20:40 +00:00
2020-01-10 11:22:07 +00:00
SELECT count() FROM test;
2020-01-10 11:20:40 +00:00
ALTER TABLE test detach partition tuple();
SELECT count() FROM test;
DETACH TABLE test;
ATTACH TABLE test;
ALTER TABLE test ATTACH PARTITION tuple();
SELECT count() FROM test;
DROP TABLE test;