mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-01-17 02:32:56 +00:00
* refactor: remove Sync trait of Procedure * refactor: remove unnecessary async * feat: implement the drop database procedure * refactor: refactor DdlManager register_loaders * feat: register the DropDatabaseProcedureLoader * chore: fmt toml * feat: support to submit DropDatabaseTask * feat: support drop database stmt * fix: empty the tables stream * fix: ensure the factory always exists * test: update sqlness results * chore: correct comments * test: update sqlness results * test: update sqlness results * chore: apply suggestions from CR * chore: apply suggestions from CR
133 lines
2.0 KiB
Plaintext
133 lines
2.0 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%';
|
|
|
|
+--------------------+
|
|
| Database |
|
|
+--------------------+
|
|
| public |
|
|
| test_public_schema |
|
|
+--------------------+
|
|
|
|
SHOW DATABASES WHERE Database = 'test_public_schema';
|
|
|
|
+--------------------+
|
|
| Database |
|
|
+--------------------+
|
|
| test_public_schema |
|
|
+--------------------+
|
|
|
|
USE test_public_schema;
|
|
|
|
Affected Rows: 0
|
|
|
|
CREATE TABLE hello(i TIMESTAMP TIME INDEX);
|
|
|
|
Affected Rows: 0
|
|
|
|
DROP TABLE hello;
|
|
|
|
Affected Rows: 0
|
|
|
|
CREATE TABLE hello(i TIMESTAMP TIME INDEX);
|
|
|
|
Affected Rows: 0
|
|
|
|
SHOW TABLES FROM test_public_schema;
|
|
|
|
+--------+
|
|
| Tables |
|
|
+--------+
|
|
| hello |
|
|
+--------+
|
|
|
|
SHOW TABLES FROM public;
|
|
|
|
+---------+
|
|
| Tables |
|
|
+---------+
|
|
| numbers |
|
|
+---------+
|
|
|
|
INSERT INTO hello VALUES (2), (3), (4);
|
|
|
|
Affected Rows: 3
|
|
|
|
SELECT * FROM hello;
|
|
|
|
+-------------------------+
|
|
| i |
|
|
+-------------------------+
|
|
| 1970-01-01T00:00:00.002 |
|
|
| 1970-01-01T00:00:00.003 |
|
|
| 1970-01-01T00:00:00.004 |
|
|
+-------------------------+
|
|
|
|
SHOW TABLES;
|
|
|
|
+--------+
|
|
| Tables |
|
|
+--------+
|
|
| hello |
|
|
+--------+
|
|
|
|
SHOW FULL TABLES WHERE Table_type != 'VIEW';
|
|
|
|
+--------+------------+
|
|
| Tables | Table_type |
|
|
+--------+------------+
|
|
| hello | BASE TABLE |
|
|
+--------+------------+
|
|
|
|
DROP TABLE hello;
|
|
|
|
Affected Rows: 0
|
|
|
|
DROP TABLE hello;
|
|
|
|
Error: 4001(TableNotFound), Table not found: greptime.test_public_schema.hello
|
|
|
|
SHOW TABLES FROM test_public_schema;
|
|
|
|
++
|
|
++
|
|
|
|
SHOW TABLES FROM public;
|
|
|
|
+---------+
|
|
| Tables |
|
|
+---------+
|
|
| numbers |
|
|
+---------+
|
|
|
|
SHOW TABLES FROM public WHERE Tables = 'numbers';
|
|
|
|
+---------+
|
|
| Tables |
|
|
+---------+
|
|
| numbers |
|
|
+---------+
|
|
|
|
DROP SCHEMA test_public_schema;
|
|
|
|
Affected Rows: 0
|
|
|
|
SELECT * FROM test_public_schema.hello;
|
|
|
|
Error: 3000(PlanQuery), Failed to plan SQL: Error during planning: Table not found: greptime.test_public_schema.hello
|
|
|
|
USE public;
|
|
|
|
Affected Rows: 0
|
|
|