From a7cc80013806efc8149192688e7d502a2517641c Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Sat, 20 Jun 2020 10:36:17 +0300 Subject: [PATCH] Added a test for #6549 --- .../01325_freeze_mutation_stuck.reference | 3 +++ .../0_stateless/01325_freeze_mutation_stuck.sql | 13 +++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 tests/queries/0_stateless/01325_freeze_mutation_stuck.reference create mode 100644 tests/queries/0_stateless/01325_freeze_mutation_stuck.sql diff --git a/tests/queries/0_stateless/01325_freeze_mutation_stuck.reference b/tests/queries/0_stateless/01325_freeze_mutation_stuck.reference new file mode 100644 index 00000000000..6065b966dcb --- /dev/null +++ b/tests/queries/0_stateless/01325_freeze_mutation_stuck.reference @@ -0,0 +1,3 @@ +Hello, world 1 +Hello, world 1 +Goodbye 1 diff --git a/tests/queries/0_stateless/01325_freeze_mutation_stuck.sql b/tests/queries/0_stateless/01325_freeze_mutation_stuck.sql new file mode 100644 index 00000000000..ce2f760cd58 --- /dev/null +++ b/tests/queries/0_stateless/01325_freeze_mutation_stuck.sql @@ -0,0 +1,13 @@ +DROP TABLE IF EXISTS mt; +CREATE TABLE mt (x String, y UInt64, INDEX idx (y) TYPE minmax GRANULARITY 1) ENGINE = MergeTree ORDER BY y; +INSERT INTO mt VALUES ('Hello, world', 1); + +SELECT * FROM mt; +ALTER TABLE mt FREEZE; +SELECT * FROM mt; + +SET mutations_sync = 1; +ALTER TABLE mt UPDATE x = 'Goodbye' WHERE y = 1; +SELECT * FROM mt; + +DROP TABLE mt;