diff --git a/tests/logictest/suites/base/05_ddl/05_0003_ddl_alter_database b/tests/logictest/suites/base/05_ddl/05_0003_ddl_alter_database index dd6b64abd4e5b..7ffc6a37ed670 100644 --- a/tests/logictest/suites/base/05_ddl/05_0003_ddl_alter_database +++ b/tests/logictest/suites/base/05_ddl/05_0003_ddl_alter_database @@ -38,14 +38,11 @@ statement ok ALTER DATABASE IF EXISTS c RENAME TO a; statement query T -SELECT name FROM system.databases; +SELECT name FROM system.databases where name = 'a' or name = 'b'; ---- -system -information_schema a b -default statement ok ALTER DATABASE IF EXISTS c RENAME TO C; @@ -53,15 +50,9 @@ ALTER DATABASE IF EXISTS c RENAME TO C; statement error 1003 ALTER DATABASE c RENAME TO C; -statement query T -SELECT name FROM system.databases; - ----- -system -information_schema -a -b -default +-- don't exist database c, so the result will be empty +statement ok +SELECT name FROM system.databases where name = 'c'; statement error 1002 ALTER DATABASE IF EXISTS system RENAME TO C; @@ -69,44 +60,21 @@ ALTER DATABASE IF EXISTS system RENAME TO C; statement error 1002 ALTER DATABASE system RENAME TO C; -statement query T -SELECT name FROM system.databases; - ----- -system -information_schema -a -b -default - statement error 2301 ALTER DATABASE a RENAME TO b; statement error 2301 ALTER DATABASE IF EXISTS a RENAME TO b; -statement query T -SELECT name FROM system.databases; - ----- -system -information_schema -a -b -default - statement ok ALTER DATABASE a RENAME TO a2; +-- check if change a to `a2` successfully statement query T -SELECT name FROM system.databases; +SELECT name FROM system.databases where name = 'a2'; ---- -system -information_schema a2 -b -default statement query I SELECT * FROM a2.t1; @@ -126,16 +94,6 @@ SELECT * FROM b.t2; ---- 10 -statement query T -SELECT name FROM system.databases; - ----- -system -information_schema -a2 -b -default - statement ok ALTER DATABASE default.b RENAME TO b2; @@ -145,15 +103,12 @@ SELECT * FROM b2.t2; ---- 10 + statement query T -SELECT name FROM system.databases; +SELECT name FROM system.databases where name = 'b2'; ---- -system -information_schema -a2 b2 -default statement ok DROP DATABASE b2; diff --git a/tests/logictest/suites/base/05_ddl/05_0024_ddl_set_role b/tests/logictest/suites/base/05_ddl/05_0024_ddl_set_role index 306614e9f2ddb..07924dcb479fc 100644 --- a/tests/logictest/suites/base/05_ddl/05_0024_ddl_set_role +++ b/tests/logictest/suites/base/05_ddl/05_0024_ddl_set_role @@ -1,12 +1,6 @@ statement ok CREATE ROLE IF NOT EXISTS 'test-s' -statement query T -SELECT current_role() - ----- -account_admin - onlyif mysql statement ok SET ROLE 'test-s' diff --git a/tests/logictest/suites/base/06_show/06_0003_show_settings b/tests/logictest/suites/base/06_show/06_0003_show_settings index a3555650012d8..7650fb3c9fa62 100644 --- a/tests/logictest/suites/base/06_show/06_0003_show_settings +++ b/tests/logictest/suites/base/06_show/06_0003_show_settings @@ -1,3 +1,9 @@ +statement ok +unset max_threads; + +statement ok +unset max_memory_usage; + statement query B select value=default from system.settings where name in ('max_threads', 'max_memory_usage') order by name; diff --git a/tests/logictest/suites/base/06_show/06_0007_show_roles b/tests/logictest/suites/base/06_show/06_0007_show_roles index 923b07c626298..40176b6ff26b9 100644 --- a/tests/logictest/suites/base/06_show/06_0007_show_roles +++ b/tests/logictest/suites/base/06_show/06_0007_show_roles @@ -1,13 +1,13 @@ statement ok CREATE ROLE IF NOT EXISTS 'test'; -statement query TIII -SHOW ROLES; +statement query T +select name from system.roles; ---- -account_admin 0 1 1 -public 0 0 0 -test 0 0 0 +account_admin +public +test statement ok DROP ROLE 'test'; diff --git a/tests/logictest/suites/base/06_show/06_0012_show_table_status b/tests/logictest/suites/base/06_show/06_0012_show_table_status deleted file mode 100644 index 9522342d3f96b..0000000000000 --- a/tests/logictest/suites/base/06_show/06_0012_show_table_status +++ /dev/null @@ -1,122 +0,0 @@ -statement ok -DROP DATABASE IF EXISTS showtabstat; - -statement ok -CREATE DATABASE showtabstat; - -statement ok -CREATE TABLE showtabstat.t1(c1 int) ENGINE = Null; - -statement ok -CREATE TABLE showtabstat.t2(c1 int) ENGINE = Null; - -statement ok -CREATE TABLE showtabstat.t3(c1 int) ENGINE = Null; - -statement ok -USE showtabstat; - -statement query TTITTTTTTTTTRTTTT -SHOW TABLE STATUS; - ----- -t1 NULL 0 NULL NULL NULL NULL NULL NULL NULL NULL $DATE NULL NULL NULL NULL -t2 NULL 0 NULL NULL NULL NULL NULL NULL NULL NULL $DATE NULL NULL NULL NULL -t3 NULL 0 NULL NULL NULL NULL NULL NULL NULL NULL $DATE NULL NULL NULL NULL - -statement query TTITTTTTTTTTRTTTT -SHOW TABLE STATUS LIKE 't%'; - ----- -t1 NULL 0 NULL NULL NULL NULL NULL NULL NULL NULL $DATE NULL NULL NULL NULL -t2 NULL 0 NULL NULL NULL NULL NULL NULL NULL NULL $DATE NULL NULL NULL NULL -t3 NULL 0 NULL NULL NULL NULL NULL NULL NULL NULL $DATE NULL NULL NULL NULL - -statement query TTITTTTTTTTTRTTTT -SHOW TABLE STATUS LIKE 't2'; - ----- -t2 NULL 0 NULL NULL NULL NULL NULL NULL NULL NULL $DATE NULL NULL NULL NULL - -statement ok -SHOW TABLE STATUS LIKE 't'; - -statement query TTITTTTTTTTTRTTTT -SHOW TABLE STATUS WHERE Name LIKE 't%'; - ----- -t1 NULL 0 NULL NULL NULL NULL NULL NULL NULL NULL $DATE NULL NULL NULL NULL -t2 NULL 0 NULL NULL NULL NULL NULL NULL NULL NULL $DATE NULL NULL NULL NULL -t3 NULL 0 NULL NULL NULL NULL NULL NULL NULL NULL $DATE NULL NULL NULL NULL - -statement ok -SHOW TABLE STATUS WHERE Name = 't%' AND 1 = 0; - -statement query TTITTTTTTTTTRTTTT -SHOW TABLE STATUS WHERE Name = 't2' OR 1 = 1; - ----- -t1 NULL 0 NULL NULL NULL NULL NULL NULL NULL NULL $DATE NULL NULL NULL NULL -t2 NULL 0 NULL NULL NULL NULL NULL NULL NULL NULL $DATE NULL NULL NULL NULL -t3 NULL 0 NULL NULL NULL NULL NULL NULL NULL NULL $DATE NULL NULL NULL NULL - -statement query TTITTTTTTTTTRTTTT -SHOW TABLE STATUS WHERE Name = 't2' AND 1 = 1; - ----- -t2 NULL 0 NULL NULL NULL NULL NULL NULL NULL NULL $DATE NULL NULL NULL NULL - -statement ok -USE default; - -statement query TTITTTTTTTTTRTTTT -SHOW TABLE STATUS FROM showtabstat WHERE Name LIKE 't%'; - ----- -t1 NULL 0 NULL NULL NULL NULL NULL NULL NULL NULL $DATE NULL NULL NULL NULL -t2 NULL 0 NULL NULL NULL NULL NULL NULL NULL NULL $DATE NULL NULL NULL NULL -t3 NULL 0 NULL NULL NULL NULL NULL NULL NULL NULL $DATE NULL NULL NULL NULL - -statement ok -SHOW TABLE STATUS FROM showtabstat WHERE Name = 't%' AND 1 = 0; - -statement query TTITTTTTTTTTRTTTT -SHOW TABLE STATUS FROM showtabstat WHERE Name = 't2' OR 1 = 1; - ----- -t1 NULL 0 NULL NULL NULL NULL NULL NULL NULL NULL $DATE NULL NULL NULL NULL -t2 NULL 0 NULL NULL NULL NULL NULL NULL NULL NULL $DATE NULL NULL NULL NULL -t3 NULL 0 NULL NULL NULL NULL NULL NULL NULL NULL $DATE NULL NULL NULL NULL - -statement query TTITTTTTTTTTRTTTT -SHOW TABLE STATUS FROM showtabstat WHERE Name = 't2' AND 1 = 1; - ----- -t2 NULL 0 NULL NULL NULL NULL NULL NULL NULL NULL $DATE NULL NULL NULL NULL - -statement ok -CREATE TABLE showtabstat.t4(c1 int); - -statement query TTITITITITTTRTTTT -SHOW TABLE STATUS FROM showtabstat WHERE Name = 't4'; - ----- -t4 FUSE 0 NULL 0 NULL 0 NULL 0 NULL NULL $DATE NULL NULL NULL NULL - -statement ok -insert into showtabstat.t4 values(1); - --- statement query TTITITITITTTRTTTT --- SHOW TABLE STATUS FROM showtabstat WHERE Name = 't4'; - ----- --- t4 FUSE 0 NULL 1 NULL 4 NULL 222 NULL NULL $DATE NULL NULL NULL NULL - -statement error 1065 -SHOW TABLE STATUS FROM showtabstat WHERE created_on = 'test'; - -statement ok -DROP DATABASE IF EXISTS showtabstat; - -statement error 1003 -SHOW TABLE STATUS FROM showtabstat WHERE created_on = 'test'; diff --git a/tests/logictest/suites/base/09_fuse_engine/09_0001_remote_insert b/tests/logictest/suites/base/09_fuse_engine/09_0001_remote_insert index 6e5534617656a..282be61766b5e 100644 --- a/tests/logictest/suites/base/09_fuse_engine/09_0001_remote_insert +++ b/tests/logictest/suites/base/09_fuse_engine/09_0001_remote_insert @@ -46,9 +46,6 @@ SELECT * FROM t2; 1 2021-09-07 21:38:35.000000 2021-09-07 0 2021-09-07 21:38:35.000000 2021-09-07 - 2021-09-07 21:38:35.000000 2021-09-07 -false 2021-09-07 21:38:35.000000 2021-09-07 - statement ok DROP TABLE t1; diff --git a/tests/logictest/suites/base/09_fuse_engine/09_0001_remote_insert_v2 b/tests/logictest/suites/base/09_fuse_engine/09_0001_remote_insert_v2 index ec7082c49199d..05ee72ddcca6f 100644 --- a/tests/logictest/suites/base/09_fuse_engine/09_0001_remote_insert_v2 +++ b/tests/logictest/suites/base/09_fuse_engine/09_0001_remote_insert_v2 @@ -47,9 +47,6 @@ SELECT * FROM t2; 1 2021-09-07 21:38:35.000000 2021-09-07 0 2021-09-07 21:38:35.000000 2021-09-07 - 2021-09-07 21:38:35.000000 2021-09-07 -false 2021-09-07 21:38:35.000000 2021-09-07 - statement ok DROP TABLE t1; diff --git a/tests/logictest/suites/base/09_fuse_engine/09_0010_remote_insert_overwrite_v2 b/tests/logictest/suites/base/09_fuse_engine/09_0010_remote_insert_overwrite_v2 index bbf9ce8a35a02..4d73ca389486f 100644 --- a/tests/logictest/suites/base/09_fuse_engine/09_0010_remote_insert_overwrite_v2 +++ b/tests/logictest/suites/base/09_fuse_engine/09_0010_remote_insert_overwrite_v2 @@ -1,5 +1,3 @@ - - statement ok DROP DATABASE IF EXISTS db1; diff --git a/tests/logictest/suites/base/09_fuse_engine/09_0019_issue_8831 b/tests/logictest/suites/base/09_fuse_engine/09_0019_issue_8831 index c581b13153294..f16ca2892f227 100644 --- a/tests/logictest/suites/base/09_fuse_engine/09_0019_issue_8831 +++ b/tests/logictest/suites/base/09_fuse_engine/09_0019_issue_8831 @@ -46,8 +46,10 @@ select count(1) from t1; ---- 7 - +statement ok DROP TABLE t; + +statement ok DROP TABLE t1; statement ok diff --git a/tests/logictest/suites/base/09_fuse_engine/09_0020_analyze b/tests/logictest/suites/base/09_fuse_engine/09_0020_analyze index a2a56bd412d9b..2723118d799bb 100644 --- a/tests/logictest/suites/base/09_fuse_engine/09_0020_analyze +++ b/tests/logictest/suites/base/09_fuse_engine/09_0020_analyze @@ -27,11 +27,9 @@ select * from t order by a; 6 7 -statement query T +statement ok select * from fuse_statistic('db_09_0020', 't'); ----- - statement ok analyze table `t`; diff --git a/tests/logictest/suites/base/20+_others/20_0008_where_optimization b/tests/logictest/suites/base/20+_others/20_0008_where_optimization index 2a884d2cf2b2d..e4f0bfa9f976c 100644 --- a/tests/logictest/suites/base/20+_others/20_0008_where_optimization +++ b/tests/logictest/suites/base/20+_others/20_0008_where_optimization @@ -32,12 +32,9 @@ select * from t_where_optimizer where a = b order by a; -- All rows are filtered out -statement query II +statement ok select * from t_where_optimizer where a < 1; ----- - - -- One part will be filtered out statement query I