Changeset: 1e0da235507d for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1e0da235507d Added Files: sql/test/BugTracker-2011/Tests/mclient-lsql-d.Bug-2861.sql sql/test/BugTracker-2011/Tests/mclient-lsql-d.Bug-2861.test Removed Files: sql/test/BugTracker-2011/Tests/mclient-lsql-d.Bug-2861.SQL.bat sql/test/BugTracker-2011/Tests/mclient-lsql-d.Bug-2861.SQL.sh sql/test/BugTracker-2011/mclient-lsql-d.Bug-2861.sql Modified Files: sql/test/BugTracker-2011/Tests/mclient-lsql-d.Bug-2861.stable.err sql/test/BugTracker-2011/Tests/mclient-lsql-d.Bug-2861.stable.out Branch: mtest Log Message:
Converted mclient-lsql-d.Bug-2861 test diffs (293 lines): diff --git a/sql/test/BugTracker-2011/Tests/mclient-lsql-d.Bug-2861.SQL.bat b/sql/test/BugTracker-2011/Tests/mclient-lsql-d.Bug-2861.SQL.bat deleted file mode 100755 --- a/sql/test/BugTracker-2011/Tests/mclient-lsql-d.Bug-2861.SQL.bat +++ /dev/null @@ -1,4 +0,0 @@ -@echo on -@prompt # $t $g - - %SQL_CLIENT% -e -i < %TSTSRCDIR%\..\mclient-lsql-d.Bug-2861.sql diff --git a/sql/test/BugTracker-2011/Tests/mclient-lsql-d.Bug-2861.SQL.sh b/sql/test/BugTracker-2011/Tests/mclient-lsql-d.Bug-2861.SQL.sh deleted file mode 100755 --- a/sql/test/BugTracker-2011/Tests/mclient-lsql-d.Bug-2861.SQL.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -Mlog -x "$SQL_CLIENT -e -i < "$TSTSRCDIR"/../mclient-lsql-d.Bug-2861.sql" diff --git a/sql/test/BugTracker-2011/mclient-lsql-d.Bug-2861.sql b/sql/test/BugTracker-2011/Tests/mclient-lsql-d.Bug-2861.sql rename from sql/test/BugTracker-2011/mclient-lsql-d.Bug-2861.sql rename to sql/test/BugTracker-2011/Tests/mclient-lsql-d.Bug-2861.sql --- a/sql/test/BugTracker-2011/mclient-lsql-d.Bug-2861.sql +++ b/sql/test/BugTracker-2011/Tests/mclient-lsql-d.Bug-2861.sql @@ -1,9 +1,48 @@ -- this should yield in nothing (empty database) -\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; -- create a table create table bug2861 (id int); -- we should see it -\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; drop table bug2861; -- and it should be gone again -\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; diff --git a/sql/test/BugTracker-2011/Tests/mclient-lsql-d.Bug-2861.stable.err b/sql/test/BugTracker-2011/Tests/mclient-lsql-d.Bug-2861.stable.err --- a/sql/test/BugTracker-2011/Tests/mclient-lsql-d.Bug-2861.stable.err +++ b/sql/test/BugTracker-2011/Tests/mclient-lsql-d.Bug-2861.stable.err @@ -1,42 +1,12 @@ stderr of test 'mclient-lsql-d.Bug-2861` in directory 'sql/test/BugTracker-2011` itself: -# 10:06:13 > -# 10:06:13 > mserver5 --debug=10 --set gdk_nr_threads=0 --set "gdk_dbfarm=/net/volund.ins.cwi.nl/export/scratch0/fabian/vtmp/mtest-Aug2011-volund.ins.cwi.nl/sql/dbfarm" --set mapi_open=true --set mapi_port=31159 --set monet_prompt= --trace --forcemito --set mal_listing=2 "--dbname=mTests_test_BugTracker-2011" --set mal_listing=0 ; echo ; echo Over.. -# 10:06:13 > - -# builtin opt gdk_dbname = demo -# builtin opt gdk_dbfarm = /ufs/fabian/scratch/monetdb/Aug2011/program-x86_64/var/lib/monetdb5/dbfarm -# builtin opt gdk_debug = 0 -# builtin opt gdk_alloc_map = no -# builtin opt gdk_vmtrim = yes -# builtin opt monet_prompt = > -# builtin opt monet_daemon = no -# builtin opt mapi_port = 50000 -# builtin opt mapi_open = false -# builtin opt mapi_autosense = false -# builtin opt sql_optimizer = default_pipe -# builtin opt sql_debug = 0 -# cmdline opt gdk_nr_threads = 0 -# cmdline opt gdk_dbfarm = /net/volund.ins.cwi.nl/export/scratch0/fabian/vtmp/mtest-Aug2011-volund.ins.cwi.nl/sql/dbfarm -# cmdline opt mapi_open = true -# cmdline opt mapi_port = 31159 -# cmdline opt monet_prompt = -# cmdline opt mal_listing = 2 -# cmdline opt gdk_dbname = mTests_test_BugTracker-2011 -# cmdline opt mal_listing = 0 - -# 10:06:13 > -# 10:06:13 > ./mclient-lsql-d.Bug-2861.SQL.sh mclient-lsql-d.Bug-2861 -# 10:06:13 > +# 14:58:40 > +# 14:58:40 > "mclient" "-lsql" "-ftest" "-tnone" "-Eutf-8" "-i" "-e" "--host=/var/tmp/mtest-93905" "--port=35588" +# 14:58:40 > -# 10:06:13 > -# 10:06:13 > Mtimeout -timeout 60 mclient -lsql -ftest -i -e --host=volund --port=31159 -e -i < /net/volund.ins.cwi.nl/export/scratch1/fabian/monetdb/Aug2011/hgrepo/sql/test/BugTracker-2011/Tests/../mclient-lsql-d.Bug-2861.sql -# 10:06:13 > - +# 14:58:40 > +# 14:58:40 > "Done." +# 14:58:40 > -# 10:06:13 > -# 10:06:13 > Done. -# 10:06:13 > - diff --git a/sql/test/BugTracker-2011/Tests/mclient-lsql-d.Bug-2861.stable.out b/sql/test/BugTracker-2011/Tests/mclient-lsql-d.Bug-2861.stable.out --- a/sql/test/BugTracker-2011/Tests/mclient-lsql-d.Bug-2861.stable.out +++ b/sql/test/BugTracker-2011/Tests/mclient-lsql-d.Bug-2861.stable.out @@ -1,35 +1,69 @@ stdout of test 'mclient-lsql-d.Bug-2861` in directory 'sql/test/BugTracker-2011` itself: -# 10:06:13 > -# 10:06:13 > mserver5 --debug=10 --set gdk_nr_threads=0 --set "gdk_dbfarm=/net/volund.ins.cwi.nl/export/scratch0/fabian/vtmp/mtest-Aug2011-volund.ins.cwi.nl/sql/dbfarm" --set mapi_open=true --set mapi_port=31159 --set monet_prompt= --trace --forcemito --set mal_listing=2 "--dbname=mTests_test_BugTracker-2011" --set mal_listing=0 ; echo ; echo Over.. -# 10:06:13 > - -# MonetDB 5 server v11.5.0 "Aug2011-7c7245f9cb28" -# Serving database 'mTests_test_BugTracker-2011', using 4 threads -# Compiled for x86_64-pc-linux-gnu/64bit with 64bit OIDs dynamically linked -# Found 7.749 GiB available main-memory. -# Copyright (c) 1993-July 2008 CWI. -# Copyright (c) August 2008-2015 MonetDB B.V., all rights reserved -# Visit http://www.monetdb.org/ for further information -# Listening for connection requests on mapi:monetdb://volund.ins.cwi.nl:31159/ -# MonetDB/GIS module loaded -# MonetDB/SQL module loaded -# SQLException:mvc:SQL module not initialized +# 14:58:40 > +# 14:58:40 > "mclient" "-lsql" "-ftest" "-tnone" "-Eutf-8" "-i" "-e" "--host=/var/tmp/mtest-93905" "--port=35588" +# 14:58:40 > -# SQL catalog created, loading sql scripts once - - -# 10:06:13 > -# 10:06:13 > ./mclient-lsql-d.Bug-2861.SQL.sh mclient-lsql-d.Bug-2861 -# 10:06:13 > - +#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; +% .describe_all_objects, .describe_all_objects # table_name +% type, fullname # name +% varchar, varchar # type +% 0, 0 # length +#create table bug2861 (id int); +#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; +% .describe_all_objects, .describe_all_objects # table_name +% type, fullname # name +% varchar, varchar # type +% 5, 11 # length +[ "TABLE", "sys.bug2861" ] +#drop table bug2861; +#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; +% .describe_all_objects, .describe_all_objects # table_name +% type, fullname # name +% varchar, varchar # type +% 0, 0 # length -#create table bug2861 (id int); -TABLE sys.bug2861 -#drop table bug2861; +# 14:58:40 > +# 14:58:40 > "Done." +# 14:58:40 > -# 10:06:13 > -# 10:06:13 > Done. -# 10:06:13 > - diff --git a/sql/test/BugTracker-2011/Tests/mclient-lsql-d.Bug-2861.test b/sql/test/BugTracker-2011/Tests/mclient-lsql-d.Bug-2861.test new file mode 100644 --- /dev/null +++ b/sql/test/BugTracker-2011/Tests/mclient-lsql-d.Bug-2861.test @@ -0,0 +1,60 @@ +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 +---- + +statement ok +create table bug2861 (id int) + +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 +---- +TABLE +sys.bug2861 + +statement ok +drop table bug2861 + +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 +---- + + _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list