From 180221240a756d6ea53179d773040fb02a3d484e Mon Sep 17 00:00:00 2001 From: dennis zhuang Date: Mon, 28 Sep 2026 12:34:54 +0000 Subject: [PATCH] test: remove unused legacy compatibility test suites (#9378) Signed-off-by: Dennis Zhuang --- tests/compat/README.md | 31 ---- tests/compat/case/read/standalone/read.result | 13 -- tests/compat/case/read/standalone/read.sql | 1 - .../compat/case/write/standalone/write.result | 25 --- tests/compat/case/write/standalone/write.sql | 16 -- tests/compat/test-compat.sh | 37 ----- tests/compat/util.sh | 82 ---------- tests/upgrade-compat/distributed/common | 1 - .../common/table_engine_0_10_2.result | 137 ---------------- .../standalone/common/table_engine_0_10_2.sql | 60 ------- .../common/table_engine_v0_11_0.result | 137 ---------------- .../common/table_engine_v0_11_0.sql | 60 ------- .../common/table_engine_v0_9_5.result | 137 ---------------- .../standalone/common/table_engine_v0_9_5.sql | 60 ------- .../common/test_alter_drop_column.result | 62 ------- .../common/test_alter_drop_column.sql | 23 --- .../standalone/common/test_alter_table.result | 54 ------- .../standalone/common/test_alter_table.sql | 20 --- .../standalone/common/test_simple.result | 47 ------ .../standalone/common/test_simple.sql | 22 --- .../standalone/common/test_ttl.result | 153 ------------------ .../standalone/common/test_ttl.sql | 42 ----- .../standalone/common/test_update.result | 32 ---- .../standalone/common/test_update.sql | 16 -- 24 files changed, 1268 deletions(-) delete mode 100644 tests/compat/README.md delete mode 100644 tests/compat/case/read/standalone/read.result delete mode 100644 tests/compat/case/read/standalone/read.sql delete mode 100644 tests/compat/case/write/standalone/write.result delete mode 100644 tests/compat/case/write/standalone/write.sql delete mode 100755 tests/compat/test-compat.sh delete mode 100755 tests/compat/util.sh delete mode 120000 tests/upgrade-compat/distributed/common delete mode 100644 tests/upgrade-compat/standalone/common/table_engine_0_10_2.result delete mode 100644 tests/upgrade-compat/standalone/common/table_engine_0_10_2.sql delete mode 100644 tests/upgrade-compat/standalone/common/table_engine_v0_11_0.result delete mode 100644 tests/upgrade-compat/standalone/common/table_engine_v0_11_0.sql delete mode 100644 tests/upgrade-compat/standalone/common/table_engine_v0_9_5.result delete mode 100644 tests/upgrade-compat/standalone/common/table_engine_v0_9_5.sql delete mode 100644 tests/upgrade-compat/standalone/common/test_alter_drop_column.result delete mode 100644 tests/upgrade-compat/standalone/common/test_alter_drop_column.sql delete mode 100644 tests/upgrade-compat/standalone/common/test_alter_table.result delete mode 100644 tests/upgrade-compat/standalone/common/test_alter_table.sql delete mode 100644 tests/upgrade-compat/standalone/common/test_simple.result delete mode 100644 tests/upgrade-compat/standalone/common/test_simple.sql delete mode 100644 tests/upgrade-compat/standalone/common/test_ttl.result delete mode 100644 tests/upgrade-compat/standalone/common/test_ttl.sql delete mode 100644 tests/upgrade-compat/standalone/common/test_update.result delete mode 100644 tests/upgrade-compat/standalone/common/test_update.sql diff --git a/tests/compat/README.md b/tests/compat/README.md deleted file mode 100644 index 07c4cb494f1..00000000000 --- a/tests/compat/README.md +++ /dev/null @@ -1,31 +0,0 @@ -# GreptimeDB compatibility test - -The compatibility test check whether a newer version of GreptimeDB can read from the data written by an old version of -GreptimeDB (the "backward" compatibility), and vice-versa (the "forward" compatibility). It's often ran in the Github -Actions to ensure there are no breaking changes by accident. - -The test work like this: reuse the sqlness-runner two times but each for a read or write side. For example, if we are -testing backward compatibility, we use sqlness-runner to run the SQLs with writes against the old GreptimeDB binary, and -use the same sqlness-runner to run the SQLs with reads against the new GreptimeDB binary. If the reads were executed -expectedly, we have achieved backward compatibility. - -This compatibility test is inspired by [Databend](https://github.com/datafuselabs/databend/). - -## Usage - -```shell -tests/compat/test-compat.sh -``` - -E.g. `tests/compat/test-compat.sh 0.6.0` tests if the data written by GreptimeDB **v0.6.0** can be read by **current** -version of GreptimeDB, and vice-versa. By "current", it's meant the fresh binary built by current codes. - -## Prerequisites - -Current version of GreptimeDB's binaries must reside in `./bins`: - -- `./bins/current/greptime` -- `./bins/current/sqlness-runner` - -The steps in Github Action already assure that. When running in local host, you have to `cp` them from target directory -manually. diff --git a/tests/compat/case/read/standalone/read.result b/tests/compat/case/read/standalone/read.result deleted file mode 100644 index ba59e7a4628..00000000000 --- a/tests/compat/case/read/standalone/read.result +++ /dev/null @@ -1,13 +0,0 @@ -select ts, i, s, f from foo order by ts; - -+---------------------+---+----------+-----+ -| ts | i | s | f | -+---------------------+---+----------+-----+ -| 2024-02-01T17:00:00 | 1 | my_tag_1 | | -| 2024-02-01T18:00:00 | 2 | my_tag_2 | | -| 2024-02-01T19:00:00 | 3 | my_tag_3 | | -| 2024-02-01T20:00:00 | 4 | my_tag_4 | 4.4 | -| 2024-02-01T21:00:00 | 5 | my_tag_5 | 5.5 | -| 2024-02-01T22:00:00 | 6 | my_tag_6 | 6.6 | -+---------------------+---+----------+-----+ - diff --git a/tests/compat/case/read/standalone/read.sql b/tests/compat/case/read/standalone/read.sql deleted file mode 100644 index e83d62d1ce9..00000000000 --- a/tests/compat/case/read/standalone/read.sql +++ /dev/null @@ -1 +0,0 @@ -select ts, i, s, f from foo order by ts; diff --git a/tests/compat/case/write/standalone/write.result b/tests/compat/case/write/standalone/write.result deleted file mode 100644 index 85ea219981c..00000000000 --- a/tests/compat/case/write/standalone/write.result +++ /dev/null @@ -1,25 +0,0 @@ -create table foo(ts timestamp time index, s string primary key, i int); - -Affected Rows: 0 - -insert into foo values -("2024-02-02 01:00:00+0800", "my_tag_1", 1), -("2024-02-02 02:00:00+0800", "my_tag_2", 2), -("2024-02-02 03:00:00+0800", "my_tag_3", 3); - -Affected Rows: 3 - --- Alter the table to trigger a flush (will be executed before process being terminated). --- Otherwise the SST might not be generated (the data could be remained in WAL). --- If we have the explicitly flush table interface in the future, it's still good to have the alter table in the test. -alter table foo add column f float; - -Affected Rows: 0 - -insert into foo values -("2024-02-02 04:00:00+0800", "my_tag_4", 4, 4.4), -("2024-02-02 05:00:00+0800", "my_tag_5", 5, 5.5), -("2024-02-02 06:00:00+0800", "my_tag_6", 6, 6.6); - -Affected Rows: 3 - diff --git a/tests/compat/case/write/standalone/write.sql b/tests/compat/case/write/standalone/write.sql deleted file mode 100644 index d7403a8e267..00000000000 --- a/tests/compat/case/write/standalone/write.sql +++ /dev/null @@ -1,16 +0,0 @@ -create table foo(ts timestamp time index, s string primary key, i int); - -insert into foo values -("2024-02-02 01:00:00+0800", "my_tag_1", 1), -("2024-02-02 02:00:00+0800", "my_tag_2", 2), -("2024-02-02 03:00:00+0800", "my_tag_3", 3); - --- Alter the table to trigger a flush (will be executed before process being terminated). --- Otherwise the SST might not be generated (the data could be remained in WAL). --- If we have the explicitly flush table interface in the future, it's still good to have the alter table in the test. -alter table foo add column f float; - -insert into foo values -("2024-02-02 04:00:00+0800", "my_tag_4", 4, 4.4), -("2024-02-02 05:00:00+0800", "my_tag_5", 5, 5.5), -("2024-02-02 06:00:00+0800", "my_tag_6", 6, 6.6); diff --git a/tests/compat/test-compat.sh b/tests/compat/test-compat.sh deleted file mode 100755 index 837a523b2ec..00000000000 --- a/tests/compat/test-compat.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/bash - -set -o errexit - -usage() { - echo " Tests the compatibility between different versions of GreptimeDB." - echo " Expects the directory './bins/current' contains the newly built binaries." - echo " Usage: $0 " -} - -# The previous version of GreptimeDB to test compatibility with. -# e.g. old_ver="0.6.0" -old_ver="$1" - -if [ -z $old_ver ] -then - usage - exit -1 -fi - -SCRIPT_PATH="$(cd "$(dirname "$0")" >/dev/null 2>&1 && pwd)" -echo " === SCRIPT_PATH: $SCRIPT_PATH" -source "${SCRIPT_PATH}/util.sh" - -# go to work tree root -cd "$SCRIPT_PATH/../../" - -download_binary "$old_ver" - -run_test $old_ver "backward" - -echo " === Clear GreptimeDB data before running forward compatibility test" -rm -rf /tmp/greptimedb-standalone - -run_test $old_ver "forward" - -echo "Compatibility test run successfully!" diff --git a/tests/compat/util.sh b/tests/compat/util.sh deleted file mode 100755 index 94ec7ea3a2d..00000000000 --- a/tests/compat/util.sh +++ /dev/null @@ -1,82 +0,0 @@ -#!/bin/bash - -# Assemble the GreptimeDB binary download URL for a specific version. -binary_url() { - local ver="$1" - local bin_tar="greptime-$(uname -s | tr '[:upper:]' '[:lower:]')-amd64-v$ver.tar.gz" - echo "https://github.com/GreptimeTeam/greptimedb/releases/download/v$ver/$bin_tar" -} - -# Download a specific version of GreptimeDB binary tar file, untar it to folder `./bins/$ver`. -# `ver` is semver without prefix `v` -download_binary() { - local ver="$1" - local url="$(binary_url $ver)" - local bin_tar="greptime-$(uname -s | tr '[:upper:]' '[:lower:]')-amd64-v$ver.tar.gz" - - if [ -f ./bins/$ver/greptime ]; then - echo " === binaries exist: $(ls ./bins/$ver/* | tr '\n' ' ')" - chmod +x ./bins/$ver/* - return - fi - - if [ -f "$bin_tar" ]; then - echo " === tar file exists: $bin_tar" - else - echo " === Download binary ver: $ver" - echo " === Download binary url: $url" - curl --connect-timeout 5 --retry 5 --retry-delay 1 -L "$url" -o "$bin_tar" - fi - - mkdir -p ./bins/$ver - tar -xf "$bin_tar" --strip-components=1 -C ./bins/$ver - - echo " === unpacked: ./bins/$ver:" - ls -lh ./bins/$ver - - chmod +x ./bins/$ver/* -} - -# Test data compatibility that: -# - the data written by an old version of GreptimeDB can be read by the current one -# - the data written by the current version of GreptimeDB can be read by an old one ("forward" compatibility) -run_test() { - local old_ver="$1" - local forward="$2" - - local write_case_dir="./tests/compat/case/write" - local read_case_dir="./tests/compat/case/read" - local bin_old="./bins/$old_ver/greptime" - local bin_new="./bins/current/greptime" - local runner="./bins/current/sqlness-runner" - - echo " === Test with:" - echo " === old greptimedb version:" - "$bin_old" --version - echo " === new greptimedb version:" - "$bin_new" --version - - # "forward" means we are testing forward compatibility: - # the data generated by current version GreptimeDB can be used by old. - # So we run new GreptimeDB binary first to write, then run old to read. - # And the opposite for backward compatibility. - if [ "$forward" == "forward" ] - then - echo " === Running forward compat test ..." - echo " === Run test: write with current GreptimeDB" - $runner bare --bins-dir $(dirname $bin_new) --case-dir $write_case_dir - else - echo " === Running backward compat test ..." - echo " === Run test: write with old GreptimeDB" - $runner bare --bins-dir $(dirname $bin_old) --case-dir $write_case_dir - fi - - if [ "$forward" == 'forward' ] - then - echo " === Run test: read with old GreptimeDB" - $runner bare --bins-dir $(dirname $bin_old) --case-dir $read_case_dir - else - echo " === Run test: read with current GreptimeDB" - $runner bare --bins-dir $(dirname $bin_new) --case-dir $read_case_dir - fi -} diff --git a/tests/upgrade-compat/distributed/common b/tests/upgrade-compat/distributed/common deleted file mode 120000 index 2b0920287dc..00000000000 --- a/tests/upgrade-compat/distributed/common +++ /dev/null @@ -1 +0,0 @@ -../standalone/common \ No newline at end of file diff --git a/tests/upgrade-compat/standalone/common/table_engine_0_10_2.result b/tests/upgrade-compat/standalone/common/table_engine_0_10_2.result deleted file mode 100644 index 046255a641f..00000000000 --- a/tests/upgrade-compat/standalone/common/table_engine_0_10_2.result +++ /dev/null @@ -1,137 +0,0 @@ --- SQLNESS ARG version=v0.10.2 -CREATE TABLE mito_system_metrics ( - host STRING, - idc STRING, - cpu_util DOUBLE, - memory_util DOUBLE, - disk_util DOUBLE, - ts TIMESTAMP DEFAULT CURRENT_TIMESTAMP(), - PRIMARY KEY(host, idc), - TIME INDEX(ts) -)ENGINE=mito; - -Affected Rows: 0 - -INSERT INTO mito_system_metrics -VALUES - ("host1", "idc_a", 11.8, 10.3, 10.3, 1667446797450), - ("host2", "idc_a", 80.0, 70.3, 90.0, 1667446797450), - ("host1", "idc_b", 50.0, 66.7, 40.6, 1667446797450); - -Affected Rows: 3 - -CREATE TABLE phy (ts timestamp time index, cpu_util double) engine=metric with ("physical_metric_table" = ""); - -Affected Rows: 0 - -CREATE TABLE system_metrics ( - host STRING, - cpu_util DOUBLE, - ts TIMESTAMP DEFAULT CURRENT_TIMESTAMP(), - PRIMARY KEY(host), - TIME INDEX(ts) -)ENGINE=metric with ("on_physical_table" = "phy"); - -Affected Rows: 0 - -INSERT INTO system_metrics (host, cpu_util, ts) -VALUES - ('host1', 11.8, 1667446797450), - ('host2', 80.0, 1667446797450), - ('host1', 50.0, 1667446797450); - -Affected Rows: 3 - --- SQLNESS ARG version=latest -SHOW CREATE TABLE mito_system_metrics; - -+---------------------+-----------------------------------------------------------+ -| Table | Create Table | -+---------------------+-----------------------------------------------------------+ -| mito_system_metrics | CREATE TABLE IF NOT EXISTS "mito_system_metrics" ( | -| | "host" STRING NULL, | -| | "idc" STRING NULL, | -| | "cpu_util" DOUBLE NULL, | -| | "memory_util" DOUBLE NULL, | -| | "disk_util" DOUBLE NULL, | -| | "ts" TIMESTAMP(3) NOT NULL DEFAULT current_timestamp(), | -| | TIME INDEX ("ts"), | -| | PRIMARY KEY ("host", "idc") | -| | ) | -| | | -| | ENGINE=mito | -| | | -+---------------------+-----------------------------------------------------------+ - -SHOW CREATE TABLE system_metrics; - -+----------------+-----------------------------------------------------------+ -| Table | Create Table | -+----------------+-----------------------------------------------------------+ -| system_metrics | CREATE TABLE IF NOT EXISTS "system_metrics" ( | -| | "cpu_util" DOUBLE NULL, | -| | "host" STRING NULL, | -| | "ts" TIMESTAMP(3) NOT NULL DEFAULT current_timestamp(), | -| | TIME INDEX ("ts"), | -| | PRIMARY KEY ("host") | -| | ) | -| | | -| | ENGINE=metric | -| | WITH( | -| | on_physical_table = 'phy' | -| | ) | -+----------------+-----------------------------------------------------------+ - -INSERT INTO mito_system_metrics -VALUES - ("host3", "idc_a", 90.0, 70.3, 90.0, 1667446797450), - ("host4", "idc_a", 70.0, 70.3, 90.0, 1667446797450), - ("host5", "idc_a", 60.0, 70.3, 90.0, 1667446797450); - -Affected Rows: 3 - -INSERT INTO system_metrics (host, cpu_util, ts) -VALUES - ('host3', 90.0, 1667446797450), - ('host4', 70.0, 1667446797450), - ('host5', 60.0, 1667446797450); - -Affected Rows: 3 - -SELECT * FROM mito_system_metrics; - -+-------+-------+----------+-------------+-----------+-------------------------+ -| host | idc | cpu_util | memory_util | disk_util | ts | -+-------+-------+----------+-------------+-----------+-------------------------+ -| host1 | idc_a | 11.8 | 10.3 | 10.3 | 2022-11-03T03:39:57.450 | -| host1 | idc_b | 50.0 | 66.7 | 40.6 | 2022-11-03T03:39:57.450 | -| host2 | idc_a | 80.0 | 70.3 | 90.0 | 2022-11-03T03:39:57.450 | -| host3 | idc_a | 90.0 | 70.3 | 90.0 | 2022-11-03T03:39:57.450 | -| host4 | idc_a | 70.0 | 70.3 | 90.0 | 2022-11-03T03:39:57.450 | -| host5 | idc_a | 60.0 | 70.3 | 90.0 | 2022-11-03T03:39:57.450 | -+-------+-------+----------+-------------+-----------+-------------------------+ - -SELECT * FROM system_metrics; - -+----------+-------+-------------------------+ -| cpu_util | host | ts | -+----------+-------+-------------------------+ -| 80.0 | host2 | 2022-11-03T03:39:57.450 | -| 70.0 | host4 | 2022-11-03T03:39:57.450 | -| 60.0 | host5 | 2022-11-03T03:39:57.450 | -| 90.0 | host3 | 2022-11-03T03:39:57.450 | -| 50.0 | host1 | 2022-11-03T03:39:57.450 | -+----------+-------+-------------------------+ - -DROP TABLE mito_system_metrics; - -Affected Rows: 0 - -DROP TABLE system_metrics; - -Affected Rows: 0 - -DROP TABLE phy; - -Affected Rows: 0 - diff --git a/tests/upgrade-compat/standalone/common/table_engine_0_10_2.sql b/tests/upgrade-compat/standalone/common/table_engine_0_10_2.sql deleted file mode 100644 index 1907533b159..00000000000 --- a/tests/upgrade-compat/standalone/common/table_engine_0_10_2.sql +++ /dev/null @@ -1,60 +0,0 @@ --- SQLNESS ARG version=v0.10.2 -CREATE TABLE mito_system_metrics ( - host STRING, - idc STRING, - cpu_util DOUBLE, - memory_util DOUBLE, - disk_util DOUBLE, - ts TIMESTAMP DEFAULT CURRENT_TIMESTAMP(), - PRIMARY KEY(host, idc), - TIME INDEX(ts) -)ENGINE=mito; - -INSERT INTO mito_system_metrics -VALUES - ("host1", "idc_a", 11.8, 10.3, 10.3, 1667446797450), - ("host2", "idc_a", 80.0, 70.3, 90.0, 1667446797450), - ("host1", "idc_b", 50.0, 66.7, 40.6, 1667446797450); - -CREATE TABLE phy (ts timestamp time index, cpu_util double) engine=metric with ("physical_metric_table" = ""); - -CREATE TABLE system_metrics ( - host STRING, - cpu_util DOUBLE, - ts TIMESTAMP DEFAULT CURRENT_TIMESTAMP(), - PRIMARY KEY(host), - TIME INDEX(ts) -)ENGINE=metric with ("on_physical_table" = "phy"); - -INSERT INTO system_metrics (host, cpu_util, ts) -VALUES - ('host1', 11.8, 1667446797450), - ('host2', 80.0, 1667446797450), - ('host1', 50.0, 1667446797450); - --- SQLNESS ARG version=latest -SHOW CREATE TABLE mito_system_metrics; - -SHOW CREATE TABLE system_metrics; - -INSERT INTO mito_system_metrics -VALUES - ("host3", "idc_a", 90.0, 70.3, 90.0, 1667446797450), - ("host4", "idc_a", 70.0, 70.3, 90.0, 1667446797450), - ("host5", "idc_a", 60.0, 70.3, 90.0, 1667446797450); - -INSERT INTO system_metrics (host, cpu_util, ts) -VALUES - ('host3', 90.0, 1667446797450), - ('host4', 70.0, 1667446797450), - ('host5', 60.0, 1667446797450); - -SELECT * FROM mito_system_metrics; - -SELECT * FROM system_metrics; - -DROP TABLE mito_system_metrics; - -DROP TABLE system_metrics; - -DROP TABLE phy; diff --git a/tests/upgrade-compat/standalone/common/table_engine_v0_11_0.result b/tests/upgrade-compat/standalone/common/table_engine_v0_11_0.result deleted file mode 100644 index 7ce230a6881..00000000000 --- a/tests/upgrade-compat/standalone/common/table_engine_v0_11_0.result +++ /dev/null @@ -1,137 +0,0 @@ --- SQLNESS ARG version=v0.11.0 -CREATE TABLE mito_system_metrics ( - host STRING, - idc STRING, - cpu_util DOUBLE, - memory_util DOUBLE, - disk_util DOUBLE, - ts TIMESTAMP DEFAULT CURRENT_TIMESTAMP(), - PRIMARY KEY(host, idc), - TIME INDEX(ts) -)ENGINE=mito; - -Affected Rows: 0 - -INSERT INTO mito_system_metrics -VALUES - ("host1", "idc_a", 11.8, 10.3, 10.3, 1667446797450), - ("host2", "idc_a", 80.0, 70.3, 90.0, 1667446797450), - ("host1", "idc_b", 50.0, 66.7, 40.6, 1667446797450); - -Affected Rows: 3 - -CREATE TABLE phy (ts timestamp time index, cpu_util double) engine=metric with ("physical_metric_table" = ""); - -Affected Rows: 0 - -CREATE TABLE system_metrics ( - host STRING, - cpu_util DOUBLE, - ts TIMESTAMP DEFAULT CURRENT_TIMESTAMP(), - PRIMARY KEY(host), - TIME INDEX(ts) -)ENGINE=metric with ("on_physical_table" = "phy"); - -Affected Rows: 0 - -INSERT INTO system_metrics (host, cpu_util, ts) -VALUES - ('host1', 11.8, 1667446797450), - ('host2', 80.0, 1667446797450), - ('host1', 50.0, 1667446797450); - -Affected Rows: 3 - --- SQLNESS ARG version=latest -SHOW CREATE TABLE mito_system_metrics; - -+---------------------+-----------------------------------------------------------+ -| Table | Create Table | -+---------------------+-----------------------------------------------------------+ -| mito_system_metrics | CREATE TABLE IF NOT EXISTS "mito_system_metrics" ( | -| | "host" STRING NULL, | -| | "idc" STRING NULL, | -| | "cpu_util" DOUBLE NULL, | -| | "memory_util" DOUBLE NULL, | -| | "disk_util" DOUBLE NULL, | -| | "ts" TIMESTAMP(3) NOT NULL DEFAULT current_timestamp(), | -| | TIME INDEX ("ts"), | -| | PRIMARY KEY ("host", "idc") | -| | ) | -| | | -| | ENGINE=mito | -| | | -+---------------------+-----------------------------------------------------------+ - -SHOW CREATE TABLE system_metrics; - -+----------------+-----------------------------------------------------------+ -| Table | Create Table | -+----------------+-----------------------------------------------------------+ -| system_metrics | CREATE TABLE IF NOT EXISTS "system_metrics" ( | -| | "cpu_util" DOUBLE NULL, | -| | "host" STRING NULL, | -| | "ts" TIMESTAMP(3) NOT NULL DEFAULT current_timestamp(), | -| | TIME INDEX ("ts"), | -| | PRIMARY KEY ("host") | -| | ) | -| | | -| | ENGINE=metric | -| | WITH( | -| | on_physical_table = 'phy' | -| | ) | -+----------------+-----------------------------------------------------------+ - -INSERT INTO mito_system_metrics -VALUES - ("host3", "idc_a", 90.0, 70.3, 90.0, 1667446797450), - ("host4", "idc_a", 70.0, 70.3, 90.0, 1667446797450), - ("host5", "idc_a", 60.0, 70.3, 90.0, 1667446797450); - -Affected Rows: 3 - -INSERT INTO system_metrics (host, cpu_util, ts) -VALUES - ('host3', 90.0, 1667446797450), - ('host4', 70.0, 1667446797450), - ('host5', 60.0, 1667446797450); - -Affected Rows: 3 - -SELECT * FROM mito_system_metrics; - -+-------+-------+----------+-------------+-----------+-------------------------+ -| host | idc | cpu_util | memory_util | disk_util | ts | -+-------+-------+----------+-------------+-----------+-------------------------+ -| host1 | idc_a | 11.8 | 10.3 | 10.3 | 2022-11-03T03:39:57.450 | -| host1 | idc_b | 50.0 | 66.7 | 40.6 | 2022-11-03T03:39:57.450 | -| host2 | idc_a | 80.0 | 70.3 | 90.0 | 2022-11-03T03:39:57.450 | -| host3 | idc_a | 90.0 | 70.3 | 90.0 | 2022-11-03T03:39:57.450 | -| host4 | idc_a | 70.0 | 70.3 | 90.0 | 2022-11-03T03:39:57.450 | -| host5 | idc_a | 60.0 | 70.3 | 90.0 | 2022-11-03T03:39:57.450 | -+-------+-------+----------+-------------+-----------+-------------------------+ - -SELECT * FROM system_metrics; - -+----------+-------+-------------------------+ -| cpu_util | host | ts | -+----------+-------+-------------------------+ -| 80.0 | host2 | 2022-11-03T03:39:57.450 | -| 70.0 | host4 | 2022-11-03T03:39:57.450 | -| 60.0 | host5 | 2022-11-03T03:39:57.450 | -| 90.0 | host3 | 2022-11-03T03:39:57.450 | -| 50.0 | host1 | 2022-11-03T03:39:57.450 | -+----------+-------+-------------------------+ - -DROP TABLE mito_system_metrics; - -Affected Rows: 0 - -DROP TABLE system_metrics; - -Affected Rows: 0 - -DROP TABLE phy; - -Affected Rows: 0 - diff --git a/tests/upgrade-compat/standalone/common/table_engine_v0_11_0.sql b/tests/upgrade-compat/standalone/common/table_engine_v0_11_0.sql deleted file mode 100644 index 963170fdf58..00000000000 --- a/tests/upgrade-compat/standalone/common/table_engine_v0_11_0.sql +++ /dev/null @@ -1,60 +0,0 @@ --- SQLNESS ARG version=v0.11.0 -CREATE TABLE mito_system_metrics ( - host STRING, - idc STRING, - cpu_util DOUBLE, - memory_util DOUBLE, - disk_util DOUBLE, - ts TIMESTAMP DEFAULT CURRENT_TIMESTAMP(), - PRIMARY KEY(host, idc), - TIME INDEX(ts) -)ENGINE=mito; - -INSERT INTO mito_system_metrics -VALUES - ("host1", "idc_a", 11.8, 10.3, 10.3, 1667446797450), - ("host2", "idc_a", 80.0, 70.3, 90.0, 1667446797450), - ("host1", "idc_b", 50.0, 66.7, 40.6, 1667446797450); - -CREATE TABLE phy (ts timestamp time index, cpu_util double) engine=metric with ("physical_metric_table" = ""); - -CREATE TABLE system_metrics ( - host STRING, - cpu_util DOUBLE, - ts TIMESTAMP DEFAULT CURRENT_TIMESTAMP(), - PRIMARY KEY(host), - TIME INDEX(ts) -)ENGINE=metric with ("on_physical_table" = "phy"); - -INSERT INTO system_metrics (host, cpu_util, ts) -VALUES - ('host1', 11.8, 1667446797450), - ('host2', 80.0, 1667446797450), - ('host1', 50.0, 1667446797450); - --- SQLNESS ARG version=latest -SHOW CREATE TABLE mito_system_metrics; - -SHOW CREATE TABLE system_metrics; - -INSERT INTO mito_system_metrics -VALUES - ("host3", "idc_a", 90.0, 70.3, 90.0, 1667446797450), - ("host4", "idc_a", 70.0, 70.3, 90.0, 1667446797450), - ("host5", "idc_a", 60.0, 70.3, 90.0, 1667446797450); - -INSERT INTO system_metrics (host, cpu_util, ts) -VALUES - ('host3', 90.0, 1667446797450), - ('host4', 70.0, 1667446797450), - ('host5', 60.0, 1667446797450); - -SELECT * FROM mito_system_metrics; - -SELECT * FROM system_metrics; - -DROP TABLE mito_system_metrics; - -DROP TABLE system_metrics; - -DROP TABLE phy; diff --git a/tests/upgrade-compat/standalone/common/table_engine_v0_9_5.result b/tests/upgrade-compat/standalone/common/table_engine_v0_9_5.result deleted file mode 100644 index 41b81f01c08..00000000000 --- a/tests/upgrade-compat/standalone/common/table_engine_v0_9_5.result +++ /dev/null @@ -1,137 +0,0 @@ --- SQLNESS ARG version=v0.9.5 -CREATE TABLE mito_system_metrics ( - host STRING, - idc STRING, - cpu_util DOUBLE, - memory_util DOUBLE, - disk_util DOUBLE, - ts TIMESTAMP DEFAULT CURRENT_TIMESTAMP(), - PRIMARY KEY(host, idc), - TIME INDEX(ts) -)ENGINE=mito; - -Affected Rows: 0 - -INSERT INTO mito_system_metrics -VALUES - ("host1", "idc_a", 11.8, 10.3, 10.3, 1667446797450), - ("host2", "idc_a", 80.0, 70.3, 90.0, 1667446797450), - ("host1", "idc_b", 50.0, 66.7, 40.6, 1667446797450); - -Affected Rows: 3 - -CREATE TABLE phy (ts timestamp time index, cpu_util double) engine=metric with ("physical_metric_table" = ""); - -Affected Rows: 0 - -CREATE TABLE system_metrics ( - host STRING, - cpu_util DOUBLE, - ts TIMESTAMP DEFAULT CURRENT_TIMESTAMP(), - PRIMARY KEY(host), - TIME INDEX(ts) -)ENGINE=metric with ("on_physical_table" = "phy"); - -Affected Rows: 0 - -INSERT INTO system_metrics (host, cpu_util, ts) -VALUES - ('host1', 11.8, 1667446797450), - ('host2', 80.0, 1667446797450), - ('host1', 50.0, 1667446797450); - -Affected Rows: 3 - --- SQLNESS ARG version=latest -SHOW CREATE TABLE mito_system_metrics; - -+---------------------+-----------------------------------------------------------+ -| Table | Create Table | -+---------------------+-----------------------------------------------------------+ -| mito_system_metrics | CREATE TABLE IF NOT EXISTS "mito_system_metrics" ( | -| | "host" STRING NULL, | -| | "idc" STRING NULL, | -| | "cpu_util" DOUBLE NULL, | -| | "memory_util" DOUBLE NULL, | -| | "disk_util" DOUBLE NULL, | -| | "ts" TIMESTAMP(3) NOT NULL DEFAULT current_timestamp(), | -| | TIME INDEX ("ts"), | -| | PRIMARY KEY ("host", "idc") | -| | ) | -| | | -| | ENGINE=mito | -| | | -+---------------------+-----------------------------------------------------------+ - -SHOW CREATE TABLE system_metrics; - -+----------------+-----------------------------------------------------------+ -| Table | Create Table | -+----------------+-----------------------------------------------------------+ -| system_metrics | CREATE TABLE IF NOT EXISTS "system_metrics" ( | -| | "cpu_util" DOUBLE NULL, | -| | "host" STRING NULL, | -| | "ts" TIMESTAMP(3) NOT NULL DEFAULT current_timestamp(), | -| | TIME INDEX ("ts"), | -| | PRIMARY KEY ("host") | -| | ) | -| | | -| | ENGINE=metric | -| | WITH( | -| | on_physical_table = 'phy' | -| | ) | -+----------------+-----------------------------------------------------------+ - -INSERT INTO mito_system_metrics -VALUES - ("host3", "idc_a", 90.0, 70.3, 90.0, 1667446797450), - ("host4", "idc_a", 70.0, 70.3, 90.0, 1667446797450), - ("host5", "idc_a", 60.0, 70.3, 90.0, 1667446797450); - -Affected Rows: 3 - -INSERT INTO system_metrics (host, cpu_util, ts) -VALUES - ('host3', 90.0, 1667446797450), - ('host4', 70.0, 1667446797450), - ('host5', 60.0, 1667446797450); - -Affected Rows: 3 - -SELECT * FROM mito_system_metrics; - -+-------+-------+----------+-------------+-----------+-------------------------+ -| host | idc | cpu_util | memory_util | disk_util | ts | -+-------+-------+----------+-------------+-----------+-------------------------+ -| host1 | idc_a | 11.8 | 10.3 | 10.3 | 2022-11-03T03:39:57.450 | -| host1 | idc_b | 50.0 | 66.7 | 40.6 | 2022-11-03T03:39:57.450 | -| host2 | idc_a | 80.0 | 70.3 | 90.0 | 2022-11-03T03:39:57.450 | -| host3 | idc_a | 90.0 | 70.3 | 90.0 | 2022-11-03T03:39:57.450 | -| host4 | idc_a | 70.0 | 70.3 | 90.0 | 2022-11-03T03:39:57.450 | -| host5 | idc_a | 60.0 | 70.3 | 90.0 | 2022-11-03T03:39:57.450 | -+-------+-------+----------+-------------+-----------+-------------------------+ - -SELECT * FROM system_metrics; - -+----------+-------+-------------------------+ -| cpu_util | host | ts | -+----------+-------+-------------------------+ -| 80.0 | host2 | 2022-11-03T03:39:57.450 | -| 70.0 | host4 | 2022-11-03T03:39:57.450 | -| 60.0 | host5 | 2022-11-03T03:39:57.450 | -| 90.0 | host3 | 2022-11-03T03:39:57.450 | -| 50.0 | host1 | 2022-11-03T03:39:57.450 | -+----------+-------+-------------------------+ - -DROP TABLE mito_system_metrics; - -Affected Rows: 0 - -DROP TABLE system_metrics; - -Affected Rows: 0 - -DROP TABLE phy; - -Affected Rows: 0 - diff --git a/tests/upgrade-compat/standalone/common/table_engine_v0_9_5.sql b/tests/upgrade-compat/standalone/common/table_engine_v0_9_5.sql deleted file mode 100644 index 9908085213e..00000000000 --- a/tests/upgrade-compat/standalone/common/table_engine_v0_9_5.sql +++ /dev/null @@ -1,60 +0,0 @@ --- SQLNESS ARG version=v0.9.5 -CREATE TABLE mito_system_metrics ( - host STRING, - idc STRING, - cpu_util DOUBLE, - memory_util DOUBLE, - disk_util DOUBLE, - ts TIMESTAMP DEFAULT CURRENT_TIMESTAMP(), - PRIMARY KEY(host, idc), - TIME INDEX(ts) -)ENGINE=mito; - -INSERT INTO mito_system_metrics -VALUES - ("host1", "idc_a", 11.8, 10.3, 10.3, 1667446797450), - ("host2", "idc_a", 80.0, 70.3, 90.0, 1667446797450), - ("host1", "idc_b", 50.0, 66.7, 40.6, 1667446797450); - -CREATE TABLE phy (ts timestamp time index, cpu_util double) engine=metric with ("physical_metric_table" = ""); - -CREATE TABLE system_metrics ( - host STRING, - cpu_util DOUBLE, - ts TIMESTAMP DEFAULT CURRENT_TIMESTAMP(), - PRIMARY KEY(host), - TIME INDEX(ts) -)ENGINE=metric with ("on_physical_table" = "phy"); - -INSERT INTO system_metrics (host, cpu_util, ts) -VALUES - ('host1', 11.8, 1667446797450), - ('host2', 80.0, 1667446797450), - ('host1', 50.0, 1667446797450); - --- SQLNESS ARG version=latest -SHOW CREATE TABLE mito_system_metrics; - -SHOW CREATE TABLE system_metrics; - -INSERT INTO mito_system_metrics -VALUES - ("host3", "idc_a", 90.0, 70.3, 90.0, 1667446797450), - ("host4", "idc_a", 70.0, 70.3, 90.0, 1667446797450), - ("host5", "idc_a", 60.0, 70.3, 90.0, 1667446797450); - -INSERT INTO system_metrics (host, cpu_util, ts) -VALUES - ('host3', 90.0, 1667446797450), - ('host4', 70.0, 1667446797450), - ('host5', 60.0, 1667446797450); - -SELECT * FROM mito_system_metrics; - -SELECT * FROM system_metrics; - -DROP TABLE mito_system_metrics; - -DROP TABLE system_metrics; - -DROP TABLE phy; diff --git a/tests/upgrade-compat/standalone/common/test_alter_drop_column.result b/tests/upgrade-compat/standalone/common/test_alter_drop_column.result deleted file mode 100644 index 605f8711642..00000000000 --- a/tests/upgrade-compat/standalone/common/test_alter_drop_column.result +++ /dev/null @@ -1,62 +0,0 @@ --- SQLNESS ARG version=v0.9.5 -CREATE TABLE alter_drop_test ( - id INT, - val_to_drop STRING, - val_to_keep STRING, - ts TIMESTAMP TIME INDEX, - PRIMARY KEY(id) -); - -Affected Rows: 0 - -INSERT INTO alter_drop_test(id, val_to_drop, val_to_keep, ts) VALUES (1, 'a', 'x', 1672531200000); - -Affected Rows: 1 - --- SQLNESS ARG version=latest -ALTER TABLE alter_drop_test DROP COLUMN val_to_drop; - -Affected Rows: 0 - -SHOW CREATE TABLE alter_drop_test; - -+-----------------+------------------------------------------------+ -| Table | Create Table | -+-----------------+------------------------------------------------+ -| alter_drop_test | CREATE TABLE IF NOT EXISTS "alter_drop_test" ( | -| | "id" INT NULL, | -| | "val_to_keep" STRING NULL, | -| | "ts" TIMESTAMP(3) NOT NULL, | -| | TIME INDEX ("ts"), | -| | PRIMARY KEY ("id") | -| | ) | -| | | -| | ENGINE=mito | -| | | -+-----------------+------------------------------------------------+ - -SELECT * FROM alter_drop_test ORDER BY id; - -+----+-------------+---------------------+ -| id | val_to_keep | ts | -+----+-------------+---------------------+ -| 1 | x | 2023-01-01T00:00:00 | -+----+-------------+---------------------+ - -INSERT INTO alter_drop_test(id, val_to_keep, ts) VALUES (2, 'y', 1672531201000); - -Affected Rows: 1 - -SELECT * FROM alter_drop_test ORDER BY id; - -+----+-------------+---------------------+ -| id | val_to_keep | ts | -+----+-------------+---------------------+ -| 1 | x | 2023-01-01T00:00:00 | -| 2 | y | 2023-01-01T00:00:01 | -+----+-------------+---------------------+ - -DROP TABLE alter_drop_test; - -Affected Rows: 0 - diff --git a/tests/upgrade-compat/standalone/common/test_alter_drop_column.sql b/tests/upgrade-compat/standalone/common/test_alter_drop_column.sql deleted file mode 100644 index df52affe522..00000000000 --- a/tests/upgrade-compat/standalone/common/test_alter_drop_column.sql +++ /dev/null @@ -1,23 +0,0 @@ --- SQLNESS ARG version=v0.9.5 -CREATE TABLE alter_drop_test ( - id INT, - val_to_drop STRING, - val_to_keep STRING, - ts TIMESTAMP TIME INDEX, - PRIMARY KEY(id) -); - -INSERT INTO alter_drop_test(id, val_to_drop, val_to_keep, ts) VALUES (1, 'a', 'x', 1672531200000); - --- SQLNESS ARG version=latest -ALTER TABLE alter_drop_test DROP COLUMN val_to_drop; - -SHOW CREATE TABLE alter_drop_test; - -SELECT * FROM alter_drop_test ORDER BY id; - -INSERT INTO alter_drop_test(id, val_to_keep, ts) VALUES (2, 'y', 1672531201000); - -SELECT * FROM alter_drop_test ORDER BY id; - -DROP TABLE alter_drop_test; diff --git a/tests/upgrade-compat/standalone/common/test_alter_table.result b/tests/upgrade-compat/standalone/common/test_alter_table.result deleted file mode 100644 index df9bbe1a91c..00000000000 --- a/tests/upgrade-compat/standalone/common/test_alter_table.result +++ /dev/null @@ -1,54 +0,0 @@ --- SQLNESS ARG version=v0.9.5 -CREATE TABLE alter_test ( - id INT, - val STRING, - ts TIMESTAMP TIME INDEX, - PRIMARY KEY(id) -); - -Affected Rows: 0 - -INSERT INTO alter_test(id, val, ts) VALUES (1, 'a', 1672531200000); - -Affected Rows: 1 - --- SQLNESS ARG version=latest -ALTER TABLE alter_test ADD COLUMN new_col INT; - -Affected Rows: 0 - -SHOW CREATE TABLE alter_test; - -+------------+-------------------------------------------+ -| Table | Create Table | -+------------+-------------------------------------------+ -| alter_test | CREATE TABLE IF NOT EXISTS "alter_test" ( | -| | "id" INT NULL, | -| | "val" STRING NULL, | -| | "ts" TIMESTAMP(3) NOT NULL, | -| | "new_col" INT NULL, | -| | TIME INDEX ("ts"), | -| | PRIMARY KEY ("id") | -| | ) | -| | | -| | ENGINE=mito | -| | | -+------------+-------------------------------------------+ - -INSERT INTO alter_test(id, val, ts, new_col) VALUES (2, 'b', 1672531201000, 100); - -Affected Rows: 1 - -SELECT * FROM alter_test ORDER BY id; - -+----+-----+---------------------+---------+ -| id | val | ts | new_col | -+----+-----+---------------------+---------+ -| 1 | a | 2023-01-01T00:00:00 | | -| 2 | b | 2023-01-01T00:00:01 | 100 | -+----+-----+---------------------+---------+ - -DROP TABLE alter_test; - -Affected Rows: 0 - diff --git a/tests/upgrade-compat/standalone/common/test_alter_table.sql b/tests/upgrade-compat/standalone/common/test_alter_table.sql deleted file mode 100644 index 41b1555d8a8..00000000000 --- a/tests/upgrade-compat/standalone/common/test_alter_table.sql +++ /dev/null @@ -1,20 +0,0 @@ --- SQLNESS ARG version=v0.9.5 -CREATE TABLE alter_test ( - id INT, - val STRING, - ts TIMESTAMP TIME INDEX, - PRIMARY KEY(id) -); - -INSERT INTO alter_test(id, val, ts) VALUES (1, 'a', 1672531200000); - --- SQLNESS ARG version=latest -ALTER TABLE alter_test ADD COLUMN new_col INT; - -SHOW CREATE TABLE alter_test; - -INSERT INTO alter_test(id, val, ts, new_col) VALUES (2, 'b', 1672531201000, 100); - -SELECT * FROM alter_test ORDER BY id; - -DROP TABLE alter_test; diff --git a/tests/upgrade-compat/standalone/common/test_simple.result b/tests/upgrade-compat/standalone/common/test_simple.result deleted file mode 100644 index ff2c340598a..00000000000 --- a/tests/upgrade-compat/standalone/common/test_simple.result +++ /dev/null @@ -1,47 +0,0 @@ --- SQLNESS ARG version=v0.9.5 -CREATE TABLE system_metrics ( - host STRING, - idc STRING, - cpu_util DOUBLE, - memory_util DOUBLE, - disk_util DOUBLE, - ts TIMESTAMP DEFAULT CURRENT_TIMESTAMP(), - PRIMARY KEY(host, idc), - TIME INDEX(ts) -); - -Affected Rows: 0 - -INSERT INTO system_metrics -VALUES - ("host1", "idc_a", 11.8, 10.3, 10.3, 1667446797450), - ("host2", "idc_a", 80.0, 70.3, 90.0, 1667446797450), - ("host1", "idc_b", 50.0, 66.7, 40.6, 1667446797450); - -Affected Rows: 3 - --- SQLNESS ARG version=latest -SHOW CREATE TABLE system_metrics; - -+----------------+-----------------------------------------------------------+ -| Table | Create Table | -+----------------+-----------------------------------------------------------+ -| system_metrics | CREATE TABLE IF NOT EXISTS "system_metrics" ( | -| | "host" STRING NULL, | -| | "idc" STRING NULL, | -| | "cpu_util" DOUBLE NULL, | -| | "memory_util" DOUBLE NULL, | -| | "disk_util" DOUBLE NULL, | -| | "ts" TIMESTAMP(3) NOT NULL DEFAULT current_timestamp(), | -| | TIME INDEX ("ts"), | -| | PRIMARY KEY ("host", "idc") | -| | ) | -| | | -| | ENGINE=mito | -| | | -+----------------+-----------------------------------------------------------+ - -DROP TABLE system_metrics; - -Affected Rows: 0 - diff --git a/tests/upgrade-compat/standalone/common/test_simple.sql b/tests/upgrade-compat/standalone/common/test_simple.sql deleted file mode 100644 index 0f8daa0985a..00000000000 --- a/tests/upgrade-compat/standalone/common/test_simple.sql +++ /dev/null @@ -1,22 +0,0 @@ --- SQLNESS ARG version=v0.9.5 -CREATE TABLE system_metrics ( - host STRING, - idc STRING, - cpu_util DOUBLE, - memory_util DOUBLE, - disk_util DOUBLE, - ts TIMESTAMP DEFAULT CURRENT_TIMESTAMP(), - PRIMARY KEY(host, idc), - TIME INDEX(ts) -); - -INSERT INTO system_metrics -VALUES - ("host1", "idc_a", 11.8, 10.3, 10.3, 1667446797450), - ("host2", "idc_a", 80.0, 70.3, 90.0, 1667446797450), - ("host1", "idc_b", 50.0, 66.7, 40.6, 1667446797450); - --- SQLNESS ARG version=latest -SHOW CREATE TABLE system_metrics; - -DROP TABLE system_metrics; diff --git a/tests/upgrade-compat/standalone/common/test_ttl.result b/tests/upgrade-compat/standalone/common/test_ttl.result deleted file mode 100644 index c368d13e4c1..00000000000 --- a/tests/upgrade-compat/standalone/common/test_ttl.result +++ /dev/null @@ -1,153 +0,0 @@ --- SQLNESS ARG version=v0.9.5 -CREATE TABLE test_ttl_0s(ts TIMESTAMP TIME INDEX, val INT) WITH (ttl = '0 second'); - -Affected Rows: 0 - -CREATE TABLE test_ttl_1s(ts TIMESTAMP TIME INDEX, val INT) WITH (ttl = '1 second'); - -Affected Rows: 0 - -CREATE TABLE test_ttl_none(ts TIMESTAMP TIME INDEX, val INT); - -Affected Rows: 0 - -CREATE DATABASE ttl_db_1s WITH (ttl = '1 second'); - -Affected Rows: 1 - -CREATE DATABASE ttl_db_0s WITH (ttl = '0 second'); - -Affected Rows: 1 - -CREATE DATABASE ttl_db_none; - -Affected Rows: 1 - --- SQLNESS ARG version=latest -SHOW TABLES; - -+------------------+ -| Tables_in_public | -+------------------+ -| numbers | -| test_ttl_0s | -| test_ttl_1s | -| test_ttl_none | -+------------------+ - -SHOW CREATE TABLE test_ttl_1s; - -+-------------+--------------------------------------------+ -| Table | Create Table | -+-------------+--------------------------------------------+ -| test_ttl_1s | CREATE TABLE IF NOT EXISTS "test_ttl_1s" ( | -| | "ts" TIMESTAMP(3) NOT NULL, | -| | "val" INT NULL, | -| | TIME INDEX ("ts") | -| | ) | -| | | -| | ENGINE=mito | -| | WITH( | -| | ttl = '1s' | -| | ) | -+-------------+--------------------------------------------+ - -SHOW CREATE TABLE test_ttl_0s; - -+-------------+--------------------------------------------+ -| Table | Create Table | -+-------------+--------------------------------------------+ -| test_ttl_0s | CREATE TABLE IF NOT EXISTS "test_ttl_0s" ( | -| | "ts" TIMESTAMP(3) NOT NULL, | -| | "val" INT NULL, | -| | TIME INDEX ("ts") | -| | ) | -| | | -| | ENGINE=mito | -| | WITH( | -| | ttl = '0s' | -| | ) | -+-------------+--------------------------------------------+ - -SHOW CREATE TABLE test_ttl_none; - -+---------------+----------------------------------------------+ -| Table | Create Table | -+---------------+----------------------------------------------+ -| test_ttl_none | CREATE TABLE IF NOT EXISTS "test_ttl_none" ( | -| | "ts" TIMESTAMP(3) NOT NULL, | -| | "val" INT NULL, | -| | TIME INDEX ("ts") | -| | ) | -| | | -| | ENGINE=mito | -| | | -+---------------+----------------------------------------------+ - -DROP TABLE test_ttl_1s; - -Affected Rows: 0 - -DROP TABLE test_ttl_0s; - -Affected Rows: 0 - -DROP TABLE test_ttl_none; - -Affected Rows: 0 - -SHOW DATABASES; - -+--------------------+ -| Database | -+--------------------+ -| greptime_private | -| information_schema | -| public | -| ttl_db_0s | -| ttl_db_1s | -| ttl_db_none | -+--------------------+ - -SHOW CREATE DATABASE ttl_db_1s; - -+-----------+-----------------------------------------+ -| Database | Create Database | -+-----------+-----------------------------------------+ -| ttl_db_1s | CREATE DATABASE IF NOT EXISTS ttl_db_1s | -| | WITH( | -| | ttl = '1s' | -| | ) | -+-----------+-----------------------------------------+ - -SHOW CREATE DATABASE ttl_db_0s; - -+-----------+-----------------------------------------+ -| Database | Create Database | -+-----------+-----------------------------------------+ -| ttl_db_0s | CREATE DATABASE IF NOT EXISTS ttl_db_0s | -| | WITH( | -| | ttl = '0s' | -| | ) | -+-----------+-----------------------------------------+ - -SHOW CREATE DATABASE ttl_db_none; - -+-------------+-------------------------------------------+ -| Database | Create Database | -+-------------+-------------------------------------------+ -| ttl_db_none | CREATE DATABASE IF NOT EXISTS ttl_db_none | -+-------------+-------------------------------------------+ - -DROP DATABASE ttl_db_1s; - -Affected Rows: 0 - -DROP DATABASE ttl_db_0s; - -Affected Rows: 0 - -DROP DATABASE ttl_db_none; - -Affected Rows: 0 - diff --git a/tests/upgrade-compat/standalone/common/test_ttl.sql b/tests/upgrade-compat/standalone/common/test_ttl.sql deleted file mode 100644 index 3462fd22444..00000000000 --- a/tests/upgrade-compat/standalone/common/test_ttl.sql +++ /dev/null @@ -1,42 +0,0 @@ - --- SQLNESS ARG version=v0.9.5 -CREATE TABLE test_ttl_0s(ts TIMESTAMP TIME INDEX, val INT) WITH (ttl = '0 second'); - -CREATE TABLE test_ttl_1s(ts TIMESTAMP TIME INDEX, val INT) WITH (ttl = '1 second'); - -CREATE TABLE test_ttl_none(ts TIMESTAMP TIME INDEX, val INT); - -CREATE DATABASE ttl_db_1s WITH (ttl = '1 second'); - -CREATE DATABASE ttl_db_0s WITH (ttl = '0 second'); - -CREATE DATABASE ttl_db_none; - --- SQLNESS ARG version=latest -SHOW TABLES; - -SHOW CREATE TABLE test_ttl_1s; - -SHOW CREATE TABLE test_ttl_0s; - -SHOW CREATE TABLE test_ttl_none; - -DROP TABLE test_ttl_1s; - -DROP TABLE test_ttl_0s; - -DROP TABLE test_ttl_none; - -SHOW DATABASES; - -SHOW CREATE DATABASE ttl_db_1s; - -SHOW CREATE DATABASE ttl_db_0s; - -SHOW CREATE DATABASE ttl_db_none; - -DROP DATABASE ttl_db_1s; - -DROP DATABASE ttl_db_0s; - -DROP DATABASE ttl_db_none; diff --git a/tests/upgrade-compat/standalone/common/test_update.result b/tests/upgrade-compat/standalone/common/test_update.result deleted file mode 100644 index 872878cb152..00000000000 --- a/tests/upgrade-compat/standalone/common/test_update.result +++ /dev/null @@ -1,32 +0,0 @@ --- SQLNESS ARG version=v0.9.5 -CREATE TABLE update_test ( - id INT, - val INT, - ts TIMESTAMP TIME INDEX, - PRIMARY KEY(id) -); - -Affected Rows: 0 - -INSERT INTO update_test(id, val, ts) VALUES (1, 10, 1672531200000), (2, 20, 1672531201000); - -Affected Rows: 2 - --- SQLNESS ARG version=latest -UPDATE update_test SET val = 100 WHERE id = 1; - -Error: 1001(Unsupported), SQL statement is not supported, keyword: UPDATE - -SELECT * FROM update_test ORDER BY id; - -+----+-----+---------------------+ -| id | val | ts | -+----+-----+---------------------+ -| 1 | 10 | 2023-01-01T00:00:00 | -| 2 | 20 | 2023-01-01T00:00:01 | -+----+-----+---------------------+ - -DROP TABLE update_test; - -Affected Rows: 0 - diff --git a/tests/upgrade-compat/standalone/common/test_update.sql b/tests/upgrade-compat/standalone/common/test_update.sql deleted file mode 100644 index 33eedcd2061..00000000000 --- a/tests/upgrade-compat/standalone/common/test_update.sql +++ /dev/null @@ -1,16 +0,0 @@ --- SQLNESS ARG version=v0.9.5 -CREATE TABLE update_test ( - id INT, - val INT, - ts TIMESTAMP TIME INDEX, - PRIMARY KEY(id) -); - -INSERT INTO update_test(id, val, ts) VALUES (1, 10, 1672531200000), (2, 20, 1672531201000); - --- SQLNESS ARG version=latest -UPDATE update_test SET val = 100 WHERE id = 1; - -SELECT * FROM update_test ORDER BY id; - -DROP TABLE update_test;