From 877a3725eb8b8a91e79f179acd4c25dba6535da9 Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Tue, 2 Jun 2020 03:33:53 +0300 Subject: [PATCH] Added a test --- .../01293_optimize_final_force.reference | 100 ++++++++++++++++++ .../0_stateless/01293_optimize_final_force.sh | 25 +++++ 2 files changed, 125 insertions(+) create mode 100644 tests/queries/0_stateless/01293_optimize_final_force.reference create mode 100755 tests/queries/0_stateless/01293_optimize_final_force.sh diff --git a/tests/queries/0_stateless/01293_optimize_final_force.reference b/tests/queries/0_stateless/01293_optimize_final_force.reference new file mode 100644 index 00000000000..b0b9422adf0 --- /dev/null +++ b/tests/queries/0_stateless/01293_optimize_final_force.reference @@ -0,0 +1,100 @@ +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 +55 0 diff --git a/tests/queries/0_stateless/01293_optimize_final_force.sh b/tests/queries/0_stateless/01293_optimize_final_force.sh new file mode 100755 index 00000000000..50cba1e7534 --- /dev/null +++ b/tests/queries/0_stateless/01293_optimize_final_force.sh @@ -0,0 +1,25 @@ +#!/usr/bin/env bash + +CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) +. $CURDIR/../shell_config.sh + +for i in {1..100}; do $CLICKHOUSE_CLIENT --multiquery --query " +DROP TABLE IF EXISTS mt; +CREATE TABLE mt (x UInt8, k UInt8 DEFAULT 0) ENGINE = SummingMergeTree ORDER BY k; + +INSERT INTO mt (x) VALUES (1); +INSERT INTO mt (x) VALUES (2); +INSERT INTO mt (x) VALUES (3); +INSERT INTO mt (x) VALUES (4); +INSERT INTO mt (x) VALUES (5); +INSERT INTO mt (x) VALUES (6); +INSERT INTO mt (x) VALUES (7); +INSERT INTO mt (x) VALUES (8); +INSERT INTO mt (x) VALUES (9); +INSERT INTO mt (x) VALUES (10); + +OPTIMIZE TABLE mt FINAL; +SELECT * FROM mt; + +DROP TABLE mt; +"; done