Skip to content

Commit

Permalink
add: drop multiple sqlness test
Browse files Browse the repository at this point in the history
  • Loading branch information
sarailQAQ committed Jun 3, 2024
1 parent 8aea15a commit 756987d
Show file tree
Hide file tree
Showing 2 changed files with 90 additions and 0 deletions.
55 changes: 55 additions & 0 deletions tests/cases/standalone/common/drop/drop_table.result
Original file line number Diff line number Diff line change
Expand Up @@ -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

35 changes: 35 additions & 0 deletions tests/cases/standalone/common/drop/drop_table.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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;

0 comments on commit 756987d

Please sign in to comment.