-
Notifications
You must be signed in to change notification settings - Fork 329
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: switch version restart all node
- Loading branch information
Showing
3 changed files
with
263 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,153 @@ | ||
-- 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 | | ||
+---------------+ | ||
| 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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
|
||
-- 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; |