From ea013cf1a2348aeaee95b924450a511d68cf73ed Mon Sep 17 00:00:00 2001 From: millb Date: Thu, 26 Sep 2019 17:44:04 +0300 Subject: [PATCH] Fixed test --- .../0_stateless/01014_count_of_merges_metrics.sql | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/dbms/tests/queries/0_stateless/01014_count_of_merges_metrics.sql b/dbms/tests/queries/0_stateless/01014_count_of_merges_metrics.sql index 609722fcf7f..85dd8707a90 100644 --- a/dbms/tests/queries/0_stateless/01014_count_of_merges_metrics.sql +++ b/dbms/tests/queries/0_stateless/01014_count_of_merges_metrics.sql @@ -1,11 +1,12 @@ -DROP TABLE IF EXISTs new_table_test; +DROP TABLE IF EXISTS new_table_test; DROP TABLE IF EXISTS check_table_test; -CREATE TABLE IF NOT EXISTS new_table_test(name String) ENGINE = MergeTree Order By name; -CREATE TABLE IF NOT EXISTS check_table_test(value1 UInt64, value2 UInt64) ENGINE = MergeTree Order By tuple(); -INSERT INTO check_table_test (value1) SELECT value from system.events WHERE event = 'Merge'; +CREATE TABLE new_table_test(name String) ENGINE = MergeTree ORDER BY name; +INSERT INTO new_table_test VALUES ('test'); +CREATE TABLE check_table_test(value1 UInt64, value2 UInt64) ENGINE = MergeTree ORDER BY tuple(); +INSERT INTO check_table_test (value1) SELECT value FROM system.events WHERE event = 'Merge'; OPTIMIZE TABLE new_table_test FINAL; -INSERT INTO check_table_test (value2) SELECT value from system.events WHERE event = 'Merge'; +INSERT INTO check_table_test (value2) SELECT value FROM system.events WHERE event = 'Merge'; SELECT count() FROM check_table_test WHERE value2 > value1;