Changeset: f740287a7755 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f740287a7755
Added Files:
        sql/test/BugTracker-2016/Tests/column_not_found.Bug-4064.sql
        sql/test/BugTracker-2016/Tests/column_not_found.Bug-4064.stable.err
        sql/test/BugTracker-2016/Tests/column_not_found.Bug-4064.stable.out
Modified Files:
        sql/test/BugTracker-2016/Tests/All
Branch: Jun2016
Log Message:

Add test for Bug 4064.


diffs (273 lines):

diff --git a/sql/test/BugTracker-2016/Tests/All 
b/sql/test/BugTracker-2016/Tests/All
--- a/sql/test/BugTracker-2016/Tests/All
+++ b/sql/test/BugTracker-2016/Tests/All
@@ -43,3 +43,4 @@ create_merge_table_withdata.Bug-4041
 timestamp_with_tz_fromstr.Bug-4019
 CREATE_INDEX_breaks_table_queries.Bug-4053
 concat_2_integers.Bug-4058
+column_not_found.Bug-4064
diff --git a/sql/test/BugTracker-2016/Tests/column_not_found.Bug-4064.sql 
b/sql/test/BugTracker-2016/Tests/column_not_found.Bug-4064.sql
new file mode 100644
--- /dev/null
+++ b/sql/test/BugTracker-2016/Tests/column_not_found.Bug-4064.sql
@@ -0,0 +1,69 @@
+START TRANSACTION;
+
+create table x (a1 int, prob double);
+create table y (a1 int, prob double);
+create table z (a1 int, prob double);
+
+with xy as (
+SELECT x.a1 as a1, x.prob + y.prob as prob FROM x, y WHERE x.a1=y.a1
+UNION ALL
+SELECT x.a1 as a1, x.prob as prob FROM x WHERE x.a1 NOT IN (select a1 from y)
+UNION ALL
+SELECT y.a1 as a1, y.prob as prob FROM y WHERE y.a1 NOT IN (select a1 from x)
+)
+SELECT xy.a1 as a1, xy.prob + z.prob as prob FROM xy, z WHERE xy.a1=z.a1
+UNION ALL
+SELECT xy.a1 as a1, xy.prob as prob FROM xy WHERE xy.a1 NOT IN (select a1 from 
z)
+UNION ALL
+SELECT z.a1 as a1, z.prob as prob FROM z WHERE z.a1 NOT IN (select a1 from xy);
+
+with xy as (
+SELECT x.a1 as a1, x.prob + y.prob as prob FROM x, y WHERE x.a1=y.a1
+UNION ALL
+SELECT x.a1 as a1, x.prob as prob FROM x WHERE x.a1 NOT IN (SELECT x.a1 FROM 
x, y WHERE x.a1=y.a1)
+UNION ALL
+SELECT y.a1 as a1, y.prob as prob FROM y WHERE y.a1 NOT IN (SELECT x.a1 FROM 
x, y WHERE x.a1=y.a1)
+)
+SELECT xy.a1 as a1, xy.prob + z.prob as prob FROM xy, z WHERE xy.a1=z.a1
+UNION ALL
+SELECT xy.a1 as a1, xy.prob as prob FROM xy WHERE xy.a1 NOT IN (SELECT xy.a1 
FROM xy, z WHERE xy.a1=z.a1)
+UNION ALL
+SELECT z.a1 as a1, z.prob as prob FROM z WHERE z.a1 NOT IN (SELECT xy.a1 FROM 
xy, z WHERE xy.a1=z.a1);
+
+-- same queries but now with LIMIT 5;
+with xy as (
+SELECT x.a1 as a1, x.prob + y.prob as prob FROM x, y WHERE x.a1=y.a1
+UNION ALL
+SELECT x.a1 as a1, x.prob as prob FROM x WHERE x.a1 NOT IN (select a1 from y)
+UNION ALL
+SELECT y.a1 as a1, y.prob as prob FROM y WHERE y.a1 NOT IN (select a1 from x)
+)
+SELECT xy.a1 as a1, xy.prob + z.prob as prob FROM xy, z WHERE xy.a1=z.a1
+UNION ALL
+SELECT xy.a1 as a1, xy.prob as prob FROM xy WHERE xy.a1 NOT IN (select a1 from 
z)
+UNION ALL
+SELECT z.a1 as a1, z.prob as prob FROM z WHERE z.a1 NOT IN (select a1 from xy)
+LIMIT 5;
+-- causes error: could not find xy.a1. dev/sql/backends/monet5/rel_bin.c:2387: 
rel2bin_project: Assertion `0' failed.
+
+with xy as (
+SELECT x.a1 as a1, x.prob + y.prob as prob FROM x, y WHERE x.a1=y.a1
+UNION ALL
+SELECT x.a1 as a1, x.prob as prob FROM x WHERE x.a1 NOT IN (SELECT x.a1 FROM 
x, y WHERE x.a1=y.a1)
+UNION ALL
+SELECT y.a1 as a1, y.prob as prob FROM y WHERE y.a1 NOT IN (SELECT x.a1 FROM 
x, y WHERE x.a1=y.a1)
+)
+SELECT xy.a1 as a1, xy.prob + z.prob as prob FROM xy, z WHERE xy.a1=z.a1
+UNION ALL
+SELECT xy.a1 as a1, xy.prob as prob FROM xy WHERE xy.a1 NOT IN (SELECT xy.a1 
FROM xy, z WHERE xy.a1=z.a1)
+UNION ALL
+SELECT z.a1 as a1, z.prob as prob FROM z WHERE z.a1 NOT IN (SELECT xy.a1 FROM 
xy, z WHERE xy.a1=z.a1)
+LIMIT 5;
+-- causes error: could not find xy.a1. dev/sql/backends/monet5/rel_bin.c:2387: 
rel2bin_project: Assertion `0' failed.
+
+drop table x;
+drop table y;
+drop table z;
+
+ROLLBACK;
+
diff --git 
a/sql/test/BugTracker-2016/Tests/column_not_found.Bug-4064.stable.err 
b/sql/test/BugTracker-2016/Tests/column_not_found.Bug-4064.stable.err
new file mode 100644
--- /dev/null
+++ b/sql/test/BugTracker-2016/Tests/column_not_found.Bug-4064.stable.err
@@ -0,0 +1,35 @@
+stderr of test 'column_not_found.Bug-4064` in directory 
'sql/test/BugTracker-2016` itself:
+
+
+# 13:20:46 >  
+# 13:20:46 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_open=true" "--set" "mapi_port=31553" "--set" 
"mapi_usock=/var/tmp/mtest-19960/.s.monetdb.31553" "--set" "monet_prompt=" 
"--forcemito" 
"--dbpath=/export/scratch2/dinther/INSTALL/var/MonetDB/mTests_sql_test_BugTracker-2016"
 "--set" "embedded_r=yes"
+# 13:20:46 >  
+
+# builtin opt  gdk_dbpath = 
/export/scratch2/dinther/INSTALL/var/monetdb5/dbfarm/demo
+# builtin opt  gdk_debug = 0
+# builtin opt  gdk_vmtrim = no
+# 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  mapi_open = true
+# cmdline opt  mapi_port = 31553
+# cmdline opt  mapi_usock = /var/tmp/mtest-19960/.s.monetdb.31553
+# cmdline opt  monet_prompt = 
+# cmdline opt  gdk_dbpath = 
/export/scratch2/dinther/INSTALL/var/MonetDB/mTests_sql_test_BugTracker-2016
+# cmdline opt  embedded_r = yes
+# cmdline opt  gdk_debug = 536870922
+
+# 13:20:46 >  
+# 13:20:46 >  "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" 
"--host=/var/tmp/mtest-19960" "--port=31553"
+# 13:20:46 >  
+
+
+# 13:20:47 >  
+# 13:20:47 >  "Done."
+# 13:20:47 >  
+
diff --git 
a/sql/test/BugTracker-2016/Tests/column_not_found.Bug-4064.stable.out 
b/sql/test/BugTracker-2016/Tests/column_not_found.Bug-4064.stable.out
new file mode 100644
--- /dev/null
+++ b/sql/test/BugTracker-2016/Tests/column_not_found.Bug-4064.stable.out
@@ -0,0 +1,146 @@
+stdout of test 'column_not_found.Bug-4064` in directory 
'sql/test/BugTracker-2016` itself:
+
+
+# 13:20:46 >  
+# 13:20:46 >  "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" 
"mapi_open=true" "--set" "mapi_port=31553" "--set" 
"mapi_usock=/var/tmp/mtest-19960/.s.monetdb.31553" "--set" "monet_prompt=" 
"--forcemito" 
"--dbpath=/export/scratch2/dinther/INSTALL/var/MonetDB/mTests_sql_test_BugTracker-2016"
 "--set" "embedded_r=yes"
+# 13:20:46 >  
+
+# MonetDB 5 server v11.23.8
+# This is an unreleased version
+# Serving database 'mTests_sql_test_BugTracker-2016', using 8 threads
+# Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs and 128bit 
integers dynamically linked
+# Found 15.589 GiB available main-memory.
+# Copyright (c) 1993-July 2008 CWI.
+# Copyright (c) August 2008-2016 MonetDB B.V., all rights reserved
+# Visit http://www.monetdb.org/ for further information
+# Listening for connection requests on mapi:monetdb://toulouse.da.cwi.nl:31553/
+# Listening for UNIX domain connection requests on 
mapi:monetdb:///var/tmp/mtest-19960/.s.monetdb.31553
+# MonetDB/GIS module loaded
+# MonetDB/SQL module loaded
+# MonetDB/R   module loaded
+
+Ready.
+# SQL catalog created, loading sql scripts once
+# loading sql script: 09_like.sql
+# loading sql script: 10_math.sql
+# loading sql script: 11_times.sql
+# loading sql script: 12_url.sql
+# loading sql script: 13_date.sql
+# loading sql script: 14_inet.sql
+# loading sql script: 15_querylog.sql
+# loading sql script: 16_tracelog.sql
+# loading sql script: 17_temporal.sql
+# loading sql script: 20_vacuum.sql
+# loading sql script: 21_dependency_functions.sql
+# loading sql script: 22_clients.sql
+# loading sql script: 23_skyserver.sql
+# loading sql script: 24_zorder.sql
+# loading sql script: 25_debug.sql
+# loading sql script: 26_sysmon.sql
+# loading sql script: 27_rejects.sql
+# loading sql script: 39_analytics.sql
+# loading sql script: 39_analytics_hge.sql
+# loading sql script: 40_geom.sql
+# loading sql script: 40_json.sql
+# loading sql script: 40_json_hge.sql
+# loading sql script: 41_md5sum.sql
+# loading sql script: 45_uuid.sql
+# loading sql script: 46_gsl.sql
+# loading sql script: 46_profiler.sql
+# loading sql script: 51_sys_schema_extension.sql
+# loading sql script: 72_fits.sql
+# loading sql script: 74_netcdf.sql
+# loading sql script: 75_lidar.sql
+# loading sql script: 75_shp.sql
+# loading sql script: 75_storagemodel.sql
+# loading sql script: 80_statistics.sql
+# loading sql script: 80_udf.sql
+# loading sql script: 80_udf_hge.sql
+# loading sql script: 85_bam.sql
+# loading sql script: 90_generator.sql
+# loading sql script: 90_generator_hge.sql
+# loading sql script: 99_system.sql
+
+# 13:20:46 >  
+# 13:20:46 >  "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" 
"--host=/var/tmp/mtest-19960" "--port=31553"
+# 13:20:46 >  
+
+#START TRANSACTION;
+#create table x (a1 int, prob double);
+#create table y (a1 int, prob double);
+#create table z (a1 int, prob double);
+#with xy as (
+#SELECT x.a1 as a1, x.prob + y.prob as prob FROM x, y WHERE x.a1=y.a1
+#UNION ALL
+#SELECT x.a1 as a1, x.prob as prob FROM x WHERE x.a1 NOT IN (select a1 from y)
+#UNION ALL
+#SELECT y.a1 as a1, y.prob as prob FROM y WHERE y.a1 NOT IN (select a1 from x)
+#)
+#SELECT xy.a1 as a1, xy.prob + z.prob as prob FROM xy, z WHERE xy.a1=z.a1
+#UNION ALL
+#SELECT xy.a1 as a1, xy.prob as prob FROM xy WHERE xy.a1 NOT IN (select a1 
from z)
+#UNION ALL
+#SELECT z.a1 as a1, z.prob as prob FROM z WHERE z.a1 NOT IN (select a1 from 
xy);
+% .L14,        .L14 # table_name
+% a1,  prob # name
+% int, double # type
+% 1,   24 # length
+#with xy as (
+#SELECT x.a1 as a1, x.prob + y.prob as prob FROM x, y WHERE x.a1=y.a1
+#UNION ALL
+#SELECT x.a1 as a1, x.prob as prob FROM x WHERE x.a1 NOT IN (SELECT x.a1 FROM 
x, y WHERE x.a1=y.a1)
+#UNION ALL
+#SELECT y.a1 as a1, y.prob as prob FROM y WHERE y.a1 NOT IN (SELECT x.a1 FROM 
x, y WHERE x.a1=y.a1)
+#)
+#SELECT xy.a1 as a1, xy.prob + z.prob as prob FROM xy, z WHERE xy.a1=z.a1
+#UNION ALL
+#SELECT xy.a1 as a1, xy.prob as prob FROM xy WHERE xy.a1 NOT IN (SELECT xy.a1 
FROM xy, z WHERE xy.a1=z.a1)
+#UNION ALL
+#SELECT z.a1 as a1, z.prob as prob FROM z WHERE z.a1 NOT IN (SELECT xy.a1 FROM 
xy, z WHERE xy.a1=z.a1);
+% .L14,        .L14 # table_name
+% a1,  prob # name
+% int, double # type
+% 1,   24 # length
+#with xy as (
+#SELECT x.a1 as a1, x.prob + y.prob as prob FROM x, y WHERE x.a1=y.a1
+#UNION ALL
+#SELECT x.a1 as a1, x.prob as prob FROM x WHERE x.a1 NOT IN (select a1 from y)
+#UNION ALL
+#SELECT y.a1 as a1, y.prob as prob FROM y WHERE y.a1 NOT IN (select a1 from x)
+#)
+#SELECT xy.a1 as a1, xy.prob + z.prob as prob FROM xy, z WHERE xy.a1=z.a1
+#UNION ALL
+#SELECT xy.a1 as a1, xy.prob as prob FROM xy WHERE xy.a1 NOT IN (select a1 
from z)
+#UNION ALL
+#SELECT z.a1 as a1, z.prob as prob FROM z WHERE z.a1 NOT IN (select a1 from xy)
+#LIMIT 5;
+% .L14,        .L14 # table_name
+% a1,  prob # name
+% int, double # type
+% 1,   24 # length
+#with xy as (
+#SELECT x.a1 as a1, x.prob + y.prob as prob FROM x, y WHERE x.a1=y.a1
+#UNION ALL
+#SELECT x.a1 as a1, x.prob as prob FROM x WHERE x.a1 NOT IN (SELECT x.a1 FROM 
x, y WHERE x.a1=y.a1)
+#UNION ALL
+#SELECT y.a1 as a1, y.prob as prob FROM y WHERE y.a1 NOT IN (SELECT x.a1 FROM 
x, y WHERE x.a1=y.a1)
+#)
+#SELECT xy.a1 as a1, xy.prob + z.prob as prob FROM xy, z WHERE xy.a1=z.a1
+#UNION ALL
+#SELECT xy.a1 as a1, xy.prob as prob FROM xy WHERE xy.a1 NOT IN (SELECT xy.a1 
FROM xy, z WHERE xy.a1=z.a1)
+#UNION ALL
+#SELECT z.a1 as a1, z.prob as prob FROM z WHERE z.a1 NOT IN (SELECT xy.a1 FROM 
xy, z WHERE xy.a1=z.a1)
+#LIMIT 5;
+% .L14,        .L14 # table_name
+% a1,  prob # name
+% int, double # type
+% 1,   24 # length
+#drop table x;
+#drop table y;
+#drop table z;
+#ROLLBACK;
+
+# 13:20:47 >  
+# 13:20:47 >  "Done."
+# 13:20:47 >  
+
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to