test(sqlness): release databases after tests (#3648)

This commit is contained in:
Weny Xu
2024-04-07 17:35:34 +08:00
committed by GitHub
parent b9890ab870
commit 097a0371dc
8 changed files with 31 additions and 17 deletions

View File

@@ -21,3 +21,7 @@ show databases;
| public |
+--------------------+
drop database 'illegal-database';
Affected Rows: 0

View File

@@ -5,3 +5,5 @@ create database 'illegal-database';
create database 'database';
show databases;
drop database 'illegal-database';

View File

@@ -98,6 +98,10 @@ drop table abcdefge;
Affected Rows: 0
drop database upper_case_table_name;
Affected Rows: 0
use public;
Affected Rows: 0

View File

@@ -40,4 +40,6 @@ desc table abcdefge;
drop table abcdefge;
drop database upper_case_table_name;
use public;

View File

@@ -1,14 +1,12 @@
show databases;
+-----------------------+
| Database |
+-----------------------+
| greptime_private |
| illegal-database |
| information_schema |
| public |
| upper_case_table_name |
+-----------------------+
+--------------------+
| Database |
+--------------------+
| greptime_private |
| information_schema |
| public |
+--------------------+
use information_schema;

View File

@@ -501,14 +501,12 @@ desc table schemata;
select * from schemata where catalog_name = 'greptime' and schema_name != 'public' order by catalog_name, schema_name;
+--------------+-----------------------+----------------------------+------------------------+----------+
| catalog_name | schema_name | default_character_set_name | default_collation_name | sql_path |
+--------------+-----------------------+----------------------------+------------------------+----------+
| greptime | greptime_private | utf8 | utf8_bin | |
| greptime | illegal-database | utf8 | utf8_bin | |
| greptime | information_schema | utf8 | utf8_bin | |
| greptime | upper_case_table_name | utf8 | utf8_bin | |
+--------------+-----------------------+----------------------------+------------------------+----------+
+--------------+--------------------+----------------------------+------------------------+----------+
| catalog_name | schema_name | default_character_set_name | default_collation_name | sql_path |
+--------------+--------------------+----------------------------+------------------------+----------+
| greptime | greptime_private | utf8 | utf8_bin | |
| greptime | information_schema | utf8 | utf8_bin | |
+--------------+--------------------+----------------------------+------------------------+----------+
-- test engines
select * from engines;

View File

@@ -75,3 +75,7 @@ drop table "AnotherSchema"."MemTotal";
Affected Rows: 0
drop schema "AnotherSchema";
Affected Rows: 0

View File

@@ -37,3 +37,5 @@ tql eval (0,10,'5s') sum(MemAvailable / 4) + sum({__name__="AnotherSchema.MemTot
drop table "MemAvailable";
drop table "AnotherSchema"."MemTotal";
drop schema "AnotherSchema";