mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-01-14 01:02:55 +00:00
feat: implement drop multiple tables (#4085)
* feat: implement drop multiple tables * fix: pass fmt and clippy checks * add: drop multiple sqlness test * update: accept review suggestions * update: accept reviem suggestion Co-authored-by: Weny Xu <wenymedia@gmail.com> * fix: pass clippy check --------- Co-authored-by: Weny Xu <wenymedia@gmail.com>
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user