From 756987d7a989232fc2230bdbdabd2e2cef7ea7b0 Mon Sep 17 00:00:00 2001 From: sarailQAQ Date: Sat, 1 Jun 2024 15:27:38 +0800 Subject: [PATCH] add: drop multiple sqlness test --- .../standalone/common/drop/drop_table.result | 55 +++++++++++++++++++ .../standalone/common/drop/drop_table.sql | 35 ++++++++++++ 2 files changed, 90 insertions(+) diff --git a/tests/cases/standalone/common/drop/drop_table.result b/tests/cases/standalone/common/drop/drop_table.result index d554a33a1bc1..0f1c07993822 100644 --- a/tests/cases/standalone/common/drop/drop_table.result +++ b/tests/cases/standalone/common/drop/drop_table.result @@ -20,3 +20,58 @@ DROP TABLE IF EXISTS foo; Affected Rows: 0 +DROP TABLE IF EXISTS foo, bar; + +Affected Rows: 0 + +create table foo ( + host string, + ts timestamp DEFAULT '2024-06-01 00:00:00+00:00', + cpu double default 0, + TIME INDEX (ts), + PRIMARY KEY(host) +) engine=mito; + +Affected Rows: 0 + +DROP TABLE foo, bar; + +Error: 4001(TableNotFound), Table not found: greptime.public.bar + +SHOW TABLES; + ++---------+ +| Tables | ++---------+ +| foo | +| numbers | ++---------+ + +DROP TABLE IF EXISTS foo, bar; + +Affected Rows: 0 + +create table foo ( + host string, + ts timestamp DEFAULT '2024-06-01 00:00:00+00:00', + cpu double default 0, + TIME INDEX (ts), + PRIMARY KEY(host) +) engine=mito; + +Affected Rows: 0 + +create table bar ( + host string, + ts timestamp DEFAULT '2024-06-01 00:00:00+00:00', + cpu double default 0, + TIME INDEX (ts), + PRIMARY KEY(host) +) engine=mito; + +Affected Rows: 0 + +DROP TABLE foo, bar; + +Affected Rows: 0 + diff --git a/tests/cases/standalone/common/drop/drop_table.sql b/tests/cases/standalone/common/drop/drop_table.sql index 65a092ce401f..be671809f9e4 100644 --- a/tests/cases/standalone/common/drop/drop_table.sql +++ b/tests/cases/standalone/common/drop/drop_table.sql @@ -11,3 +11,38 @@ create table foo ( DROP TABLE IF EXISTS foo; DROP TABLE IF EXISTS foo; + +DROP TABLE IF EXISTS foo, bar; + +create table foo ( + host string, + ts timestamp DEFAULT '2024-06-01 00:00:00+00:00', + cpu double default 0, + TIME INDEX (ts), + PRIMARY KEY(host) +) engine=mito; + +DROP TABLE foo, bar; + +SHOW TABLES; + +DROP TABLE IF EXISTS foo, bar; + +create table foo ( + host string, + ts timestamp DEFAULT '2024-06-01 00:00:00+00:00', + cpu double default 0, + TIME INDEX (ts), + PRIMARY KEY(host) +) engine=mito; + +create table bar ( + host string, + ts timestamp DEFAULT '2024-06-01 00:00:00+00:00', + cpu double default 0, + TIME INDEX (ts), + PRIMARY KEY(host) +) engine=mito; + +DROP TABLE foo, bar; +