Changeset: 9711b482487e for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9711b482487e Modified Files: sql/test/BugTracker-2015/Tests/msqldump-merge-and-remote-tables.Bug-3774.sql sql/test/BugTracker-2015/Tests/msqldump-merge-and-remote-tables.Bug-3774.test Branch: mtest Log Message:
Converted msqldump-merge-and-remote-tables.Bug-3774 test diffs (85 lines): diff --git a/sql/test/BugTracker-2015/Tests/msqldump-merge-and-remote-tables.Bug-3774.sql b/sql/test/BugTracker-2015/Tests/msqldump-merge-and-remote-tables.Bug-3774.sql --- a/sql/test/BugTracker-2015/Tests/msqldump-merge-and-remote-tables.Bug-3774.sql +++ b/sql/test/BugTracker-2015/Tests/msqldump-merge-and-remote-tables.Bug-3774.sql @@ -2,10 +2,22 @@ CREATE TABLE t1 (i int); CREATE MERGE TABLE mt1 (t int); ALTER TABLE mt1 ADD TABLE t1; CREATE REMOTE TABLE rt1 (t int) on 'mapi:monetdb://localhost:50000/test'; -\d -\d mt1 -\d rt1 -\D +with describe_all_objects as ( + select s.name as sname, + t.name, + s.name || '.' || t.name as fullname, + cast(case t.type + when 1 then 2 + else 1 + end as smallint) as ntype, + (case when t.system then 'SYSTEM ' else '' end) || tt.table_type_name as type, + t.system + from sys._tables t + left outer join sys.schemas s on t.schema_id = s.id + left outer join sys.table_types tt on t.type = tt.table_type_id ) +select type, fullname from describe_all_objects where (ntype & 3) > 0 and not system and (sname is null or sname = current_schema) order by fullname, type; +select "name", "query", "type", "remark" from describe_table('sys', 'mt1'); +select "name", "query", "type", "remark" from describe_table('sys', 'rt1'); DROP TABLE rt1; DROP TABLE mt1; diff --git a/sql/test/BugTracker-2015/Tests/msqldump-merge-and-remote-tables.Bug-3774.test b/sql/test/BugTracker-2015/Tests/msqldump-merge-and-remote-tables.Bug-3774.test --- a/sql/test/BugTracker-2015/Tests/msqldump-merge-and-remote-tables.Bug-3774.test +++ b/sql/test/BugTracker-2015/Tests/msqldump-merge-and-remote-tables.Bug-3774.test @@ -10,11 +10,46 @@ ALTER TABLE mt1 ADD TABLE t1 statement ok CREATE REMOTE TABLE rt1 (t int) on 'mapi:monetdb://localhost:50000/test' -statement error -\d -\d mt1 -\d rt1 -\D +query TT rowsort +with describe_all_objects as ( + select s.name as sname, + t.name, + s.name || '.' || t.name as fullname, + cast(case t.type + when 1 then 2 + else 1 + end as smallint) as ntype, + (case when t.system then 'SYSTEM ' else '' end) || tt.table_type_name as type, + t.system + from sys._tables t + left outer join sys.schemas s on t.schema_id = s.id + left outer join sys.table_types tt on t.type = tt.table_type_id ) +select type, fullname from describe_all_objects where (ntype & 3) > 0 and not system and (sname is null or sname = current_schema) order by fullname, type +---- +MERGE TABLE +sys.mt1 +REMOTE TABLE +sys.rt1 +TABLE +sys.t1 + +query TTTT rowsort +select "name", "query", "type", "remark" from describe_table('sys', 'mt1') +---- +mt1 +NULL +MERGE TABLE +NULL + +query TTTT rowsort +select "name", "query", "type", "remark" from describe_table('sys', 'rt1') +---- +rt1 +mapi:monetdb://localhost:50000/test +REMOTE TABLE +NULL + +statement ok DROP TABLE rt1 statement ok _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list