From 07d7fd413f0b2d9e9fb0b8b2fd5ddfdfb35da158 Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Tue, 3 Dec 2019 02:25:08 +0300 Subject: [PATCH] Fixed bad test --- .../01035_lc_empty_part_bug.reference | 2 +- .../0_stateless/01035_lc_empty_part_bug.sh | 26 +++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100755 dbms/tests/queries/0_stateless/01035_lc_empty_part_bug.sh diff --git a/dbms/tests/queries/0_stateless/01035_lc_empty_part_bug.reference b/dbms/tests/queries/0_stateless/01035_lc_empty_part_bug.reference index 8d250d0033f..1ca0ea26354 100644 --- a/dbms/tests/queries/0_stateless/01035_lc_empty_part_bug.reference +++ b/dbms/tests/queries/0_stateless/01035_lc_empty_part_bug.reference @@ -1,3 +1,3 @@ -wait for delete to finish 0 +Waiting for mutation to finish still alive 100 diff --git a/dbms/tests/queries/0_stateless/01035_lc_empty_part_bug.sh b/dbms/tests/queries/0_stateless/01035_lc_empty_part_bug.sh new file mode 100755 index 00000000000..21f029f27f1 --- /dev/null +++ b/dbms/tests/queries/0_stateless/01035_lc_empty_part_bug.sh @@ -0,0 +1,26 @@ +#!/usr/bin/env bash + +CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +. $CURDIR/../shell_config.sh +. $CURDIR/mergetree_mutations.lib + +# that test is failing on versions <= 19.11.12 + +${CLICKHOUSE_CLIENT} --multiquery --query=" + DROP TABLE IF EXISTS lc_empty_part_bug; + create table lc_empty_part_bug (id UInt64, s String) Engine=MergeTree ORDER BY id; + insert into lc_empty_part_bug select number as id, toString(rand()) from numbers(100); + alter table lc_empty_part_bug delete where id < 100; +" + +wait_for_mutation 'lc_empty_part_bug' 'mutation_2.txt' + +echo 'Waiting for mutation to finish' + +${CLICKHOUSE_CLIENT} --multiquery --query=" + alter table lc_empty_part_bug modify column s LowCardinality(String); + SELECT 'still alive'; + insert into lc_empty_part_bug select number+100 as id, toString(rand()) from numbers(100); + SELECT count() FROM lc_empty_part_bug WHERE not ignore(*); + DROP TABLE lc_empty_part_bug; +"