Changeset: 93ae5f95bc4f for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=93ae5f95bc4f
Modified Files:
        
sql/src/test/BugTracker-2010/Tests/multiple-common-table-expressions.Bug-2664.sql
        
sql/src/test/BugTracker-2010/Tests/multiple-common-table-expressions.Bug-2664.stable.out
Branch: Oct2010
Log Message:

Make test independent of what happens to be in a system table.


diffs (205 lines):

diff -r 082d38a64b82 -r 93ae5f95bc4f 
sql/src/test/BugTracker-2010/Tests/multiple-common-table-expressions.Bug-2664.sql
--- 
a/sql/src/test/BugTracker-2010/Tests/multiple-common-table-expressions.Bug-2664.sql
 Thu Sep 23 12:55:21 2010 +0200
+++ 
b/sql/src/test/BugTracker-2010/Tests/multiple-common-table-expressions.Bug-2664.sql
 Mon Sep 27 14:28:00 2010 +0200
@@ -1,8 +1,54 @@
-with t(id) as (select id from tables)
-select id from tables 
+CREATE TABLE "t2664" (
+       "id"            INTEGER,
+       "name"          VARCHAR(1024),
+       "schema_id"     INTEGER,
+       "query"         VARCHAR(2048),
+       "type"          SMALLINT,
+       "system"        BOOLEAN,
+       "commit_action" SMALLINT,
+       "readonly"      BOOLEAN
+);
+COPY 30 RECORDS INTO "t2664" FROM stdin USING DELIMITERS '\t','\n','"';
+2001   "schemas"       2000    NULL    0       true    0       false
+2006   "types" 2000    NULL    0       true    0       false
+2015   "functions"     2000    NULL    0       true    0       false
+2024   "args"  2000    NULL    0       true    0       false
+2032   "sequences"     2000    NULL    0       true    0       false
+2042   "dependencies"  2000    NULL    0       true    0       false
+2046   "connections"   2000    NULL    0       true    0       false
+2055   "_tables"       2000    NULL    0       true    0       false
+2064   "_columns"      2000    NULL    0       true    0       false
+2075   "keys"  2000    NULL    0       true    0       false
+2082   "idxs"  2000    NULL    0       true    0       false
+2087   "triggers"      2000    NULL    0       true    0       false
+2098   "keycolumns"    2000    NULL    0       true    0       false
+2104   "_tables"       2103    NULL    0       true    2       false
+2113   "_columns"      2103    NULL    0       true    2       false
+2124   "keys"  2103    NULL    0       true    2       false
+2131   "idxs"  2103    NULL    0       true    2       false
+2136   "triggers"      2103    NULL    0       true    2       false
+2147   "keycolumns"    2103    NULL    0       true    2       false
+5039   "tables"        2000    "SELECT * FROM (SELECT p.*, 0 AS \"temporary\" 
FROM \"sys\".\"_tables\" AS p UNION ALL SELECT t.*, 1 AS \"temporary\" FROM 
\"tmp\".\"_tables\" AS t) AS tables where tables.type < 2;"  1       true    0  
     false
+5049   "columns"       2000    "SELECT * FROM (SELECT p.* FROM 
\"sys\".\"_columns\" AS p UNION ALL SELECT t.* FROM \"tmp\".\"_columns\" AS t) 
AS columns;"     1       true    0       false
+5069   "db_user_info"  2000    NULL    0       true    0       false
+5077   "users" 2000    "SELECT u.\"name\" AS \"name\", ui.\"fullname\", 
ui.\"default_schema\" FROM db_users() AS u LEFT JOIN \"sys\".\"db_user_info\" 
AS ui ON u.\"name\" = ui.\"name\" ;"     1       true    0       false
+5081   "user_role"     2000    NULL    0       true    0       false
+5084   "auths" 2000    NULL    0       true    0       false
+5088   "privileges"    2000    NULL    0       true    0       false
+5201   "queryhistory"  2000    NULL    0       true    0       false
+5215   "callhistory"   2000    NULL    0       true    0       false
+5232   "querylog"      2000    "create view querylog as\nselect qd.*, 
ql.ctime, ql.arguments, ql.exec, ql.result, ql.foot, ql.memory, ql.tuples, 
ql.inblock, ql.oublock from queryhistory qd, callhistory ql\nwhere qd.id = 
ql.id;"    1       true    0       false
+5465   "systemfunctions"       2000    NULL    0       true    0       false
+
+with t(id) as (select id from "t2664")
+select id from "t2664" 
  where id in (select id from t) 
-   and id in (select id from t);
+   and id in (select id from t)
+ order by id;
 
-with t(id) as (select id from tables),
-     x(id) as (select id from tables where id in (select id from t))
-select * from t;
+with t(id) as (select id from "t2664"),
+     x(id) as (select id from "t2664" where id in (select id from t))
+select * from t
+order by id;
+
+drop table "t2664";
diff -r 082d38a64b82 -r 93ae5f95bc4f 
sql/src/test/BugTracker-2010/Tests/multiple-common-table-expressions.Bug-2664.stable.out
--- 
a/sql/src/test/BugTracker-2010/Tests/multiple-common-table-expressions.Bug-2664.stable.out
  Thu Sep 23 12:55:21 2010 +0200
+++ 
b/sql/src/test/BugTracker-2010/Tests/multiple-common-table-expressions.Bug-2664.stable.out
  Mon Sep 27 14:28:00 2010 +0200
@@ -21,15 +21,39 @@
 
 Over..
 
-# 23:46:21 >  
-# 23:46:21 >  mclient -lsql -ftest -i -e --host=alf --port=39748 
-# 23:46:21 >  
+# 14:25:13 >  
+# 14:25:13 >  mclient -lsql -ftest -i -e --host=ottar --port=34782 
+# 14:25:13 >  
 
-#with t(id) as (select id from tables)
-#select id from tables 
+#CREATE TABLE "t2664" (
+#      "id"            INTEGER,
+#      "name"          VARCHAR(1024),
+#      "schema_id"     INTEGER,
+#      "query"         VARCHAR(2048),
+#      "type"          SMALLINT,
+#      "system"        BOOLEAN,
+#      "commit_action" SMALLINT,
+#      "readonly"      BOOLEAN
+#);
+#COPY 30 RECORDS INTO "t2664" FROM stdin USING DELIMITERS '\t','\n','"';
+#2001  "schemas"       2000    NULL    0       true    0       false
+#2006  "types" 2000    NULL    0       true    0       false
+#2015  "functions"     2000    NULL    0       true    0       false
+#2024  "args"  2000    NULL    0       true    0       false
+#2032  "sequences"     2000    NULL    0       true    0       false
+#2042  "dependencies"  2000    NULL    0       true    0       false
+#2046  "connections"   2000    NULL    0       true    0       false
+#2055  "_tables"       2000    NULL    0       true    0       false
+#2064  "_columns"      2000    NULL    0       true    0       false
+#2075  "keys"  2000    NULL    0       true    0       false
+#2082  "idxs"  2000    NULL    0       true    0       fal
+[ 30   ]
+#with t(id) as (select id from "t2664")
+#select id from "t2664" 
 # where id in (select id from t) 
-#   and id in (select id from t);
-% .tables # table_name
+#   and id in (select id from t)
+# order by id;
+% sys.t2664 # table_name
 % id # name
 % int # type
 % 4 # length
@@ -52,30 +76,22 @@
 [ 2131 ]
 [ 2136 ]
 [ 2147 ]
-[ 5063 ]
-[ 5073 ]
-[ 5093 ]
-[ 5101 ]
-[ 5105 ]
-[ 5108 ]
-[ 5112 ]
-[ 5225 ]
-[ 5239 ]
-[ 5256 ]
-[ 5489 ]
-[ 5496 ]
-[ 5503 ]
-[ 5510 ]
-[ 5559 ]
-[ 5604 ]
-[ 5642 ]
-[ 5800 ]
-[ 5806 ]
-[ 5829 ]
-#with t(id) as (select id from tables),
-#     x(id) as (select id from tables where id in (select id from t))
-#select * from t;
-% .t # table_name
+[ 5039 ]
+[ 5049 ]
+[ 5069 ]
+[ 5077 ]
+[ 5081 ]
+[ 5084 ]
+[ 5088 ]
+[ 5201 ]
+[ 5215 ]
+[ 5232 ]
+[ 5465 ]
+#with t(id) as (select id from "t2664"),
+#     x(id) as (select id from "t2664" where id in (select id from t))
+#select * from t
+#order by id;
+% sys.t # table_name
 % id # name
 % int # type
 % 4 # length
@@ -98,28 +114,20 @@
 [ 2131 ]
 [ 2136 ]
 [ 2147 ]
-[ 5063 ]
-[ 5073 ]
-[ 5093 ]
-[ 5101 ]
-[ 5105 ]
-[ 5108 ]
-[ 5112 ]
-[ 5225 ]
-[ 5239 ]
-[ 5256 ]
-[ 5489 ]
-[ 5496 ]
-[ 5503 ]
-[ 5510 ]
-[ 5559 ]
-[ 5604 ]
-[ 5642 ]
-[ 5800 ]
-[ 5806 ]
-[ 5829 ]
+[ 5039 ]
+[ 5049 ]
+[ 5069 ]
+[ 5077 ]
+[ 5081 ]
+[ 5084 ]
+[ 5088 ]
+[ 5201 ]
+[ 5215 ]
+[ 5232 ]
+[ 5465 ]
+#drop table "t2664";
 
-# 23:46:21 >  
-# 23:46:21 >  Done.
-# 23:46:21 >  
+# 14:25:13 >  
+# 14:25:13 >  Done.
+# 14:25:13 >  
 
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to