Files
greptimedb/tests/cases/standalone/common/catalog/schema.result
Niwaka 8dcb12e317 feat: support where in show (#1829)
* feat: support where in show

* fix: lift schema out of match

* fix: rename

* fix: improve error handling
2023-07-07 13:45:54 +08:00

123 lines
1.7 KiB
Plaintext

CREATE SCHEMA test_public_schema;
Affected Rows: 1
CREATE SCHEMA test_public_schema;
Error: 1004(InvalidArguments), Schema test_public_schema already exists
CREATE SCHEMA IF NOT EXISTS test_public_schema;
Affected Rows: 1
SHOW DATABASES LIKE '%public%';
+--------------------+
| Schemas |
+--------------------+
| public |
| test_public_schema |
+--------------------+
USE test_public_schema;
++
++
CREATE TABLE hello(i BIGINT TIME INDEX);
Affected Rows: 0
DROP TABLE hello;
Affected Rows: 1
CREATE TABLE hello(i BIGINT TIME INDEX);
Affected Rows: 0
SHOW TABLES FROM test_public_schema;
+--------+
| Tables |
+--------+
| hello |
+--------+
SHOW TABLES FROM public;
+---------+
| Tables |
+---------+
| numbers |
| scripts |
+---------+
INSERT INTO hello VALUES (2), (3), (4);
Affected Rows: 3
SELECT * FROM hello;
+---+
| i |
+---+
| 2 |
| 3 |
| 4 |
+---+
SHOW TABLES;
+--------+
| Tables |
+--------+
| hello |
+--------+
DROP TABLE hello;
Affected Rows: 1
DROP TABLE hello;
Error: 4001(TableNotFound), Table not found: greptime.test_public_schema.hello
SHOW TABLES FROM test_public_schema;
+--------+
| Tables |
+--------+
+--------+
SHOW TABLES FROM public;
+---------+
| Tables |
+---------+
| numbers |
| scripts |
+---------+
SHOW TABLES FROM public WHERE Tables='numbers';
+---------+
| Tables |
+---------+
| numbers |
+---------+
DROP SCHEMA test_public_schema;
Error: 1001(Unsupported), SQL statement is not supported: DROP SCHEMA test_public_schema;, keyword: SCHEMA
SELECT * FROM test_public_schema.hello;
Error: 3000(PlanQuery), Error during planning: Table not found: greptime.test_public_schema.hello
USE public;
++
++