Changeset: 248294d05358 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=248294d05358
Modified Files:
sql/test/BugTracker-2011/Tests/All
sql/test/BugTracker-2011/Tests/multiple-joins.Bug-2879.sql
sql/test/BugTracker-2011/Tests/multiple-joins.Bug-2879.stable.err
sql/test/BugTracker-2011/Tests/multiple-joins.Bug-2879.stable.out
Branch: Aug2011
Log Message:
Added test for bug 2879.
diffs (211 lines):
diff --git a/sql/test/BugTracker-2011/Tests/All
b/sql/test/BugTracker-2011/Tests/All
--- a/sql/test/BugTracker-2011/Tests/All
+++ b/sql/test/BugTracker-2011/Tests/All
@@ -35,4 +35,5 @@ multicolumn_constraints.Bug-2849
CASE_nested_functions.Bug-2852
FK_self_reference.Bug-2862
time_precision.Bug-2873
+multiple-joins.Bug-2879
delete-large-table.Bug-2882
diff --git a/sql/test/BugTracker-2011/Tests/multiple-joins.Bug-2879.sql
b/sql/test/BugTracker-2011/Tests/multiple-joins.Bug-2879.sql
new file mode 100644
--- /dev/null
+++ b/sql/test/BugTracker-2011/Tests/multiple-joins.Bug-2879.sql
@@ -0,0 +1,52 @@
+START TRANSACTION;
+
+CREATE TABLE triples (
+ s varchar(255),
+ p varchar(255),
+ o varchar(255),
+ PRIMARY KEY (s, p, o)
+);
+
+INSERT INTO triples (s, p, o) VALUES
+('<http://example/a>', '<http://example/q1>', '<http://example/z11>'),
+('<http://example/a>', '<http://example/q1>', '<http://example/z12>'),
+('<http://example/a>', '<http://example/q2>', '<http://example/z21>'),
+('<http://example/a>', '<http://example/q2>', '<http://example/z22>'),
+('<http://example/b>', '<http://example/q2>', '<http://example/y21>'),
+('<http://example/b>', '<http://example/q2>', '<http://example/y22>'),
+('<http://example/c>', '<http://example/r>', '<http://example/rr>'),
+('<http://example/x>', '<http://example/p>', '<http://example/a>'),
+('<http://example/x>', '<http://example/p>', '<http://example/b>'),
+('<http://example/x>', '<http://example/p>', '<http://example/c>');
+
+SELECT M_1.VC_4 AS V_1, M_1.VC_3 AS V_2, M_1.VC_1 AS V_3, M_1.VC_2 AS V_4
+FROM
+ ( SELECT COALESCE(T_2.o, T_4.o) AS VC_1, COALESCE(T_3.o, T_5.o) AS VC_2,
+T_1.o AS VC_3, T_1.s AS VC_4
+ FROM
+ ( SELECT *
+ FROM Triples AS T_1
+ WHERE ( T_1.p = '<http://example/p>' )
+ ) AS T_1
+ LEFT OUTER JOIN
+ Triples AS T_2
+ INNER JOIN
+ Triples AS T_3
+ ON ( T_2.p = '<http://example/q1>'
+ AND T_3.p = '<http://example/q2>'
+ AND T_2.s = T_3.s )
+ ON ( T_1.o = T_2.s )
+ LEFT OUTER JOIN
+ Triples AS T_4
+ INNER JOIN
+ Triples AS T_5
+ ON ( T_4.p = '<http://example/q2>'
+ AND T_5.p = '<http://example/q2>'
+ AND T_4.s = T_5.s )
+ ON ( T_1.o = T_4.s
+ AND ( ( T_2.o IS NULL ) OR ( T_2.o = T_4.o ) )
+ AND ( ( T_3.o IS NULL ) OR ( T_3.o = T_5.o ) ) )
+ ) AS M_1
+ORDER BY V_1, V_2, V_3, V_4;
+
+ROLLBACK;
diff --git a/sql/test/BugTracker-2011/Tests/multiple-joins.Bug-2879.stable.err
b/sql/test/BugTracker-2011/Tests/multiple-joins.Bug-2879.stable.err
new file mode 100644
--- /dev/null
+++ b/sql/test/BugTracker-2011/Tests/multiple-joins.Bug-2879.stable.err
@@ -0,0 +1,37 @@
+stderr of test 'multiple-joins.Bug-2879` in directory 'test/BugTracker-2011`
itself:
+
+
+# 15:53:53 >
+# 15:53:53 > mserver5 --debug=10 --set gdk_nr_threads=0 --set
"gdk_dbfarm=/ufs/sjoerd/Monet-candidate/var/MonetDB" --set mapi_open=true --set
mapi_port=30655 --set monet_prompt= --trace --forcemito --set mal_listing=2
"--dbname=mTests_test_BugTracker-2011" --set mal_listing=0 ; echo ; echo Over..
+# 15:53:53 >
+
+# builtin opt gdk_dbname = demo
+# builtin opt gdk_dbfarm = /ufs/sjoerd/Monet-candidate/var/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 = /ufs/sjoerd/Monet-candidate/var/MonetDB
+# cmdline opt mapi_open = true
+# cmdline opt mapi_port = 30655
+# cmdline opt monet_prompt =
+# cmdline opt mal_listing = 2
+# cmdline opt gdk_dbname = mTests_test_BugTracker-2011
+# cmdline opt mal_listing = 0
+
+# 15:53:53 >
+# 15:53:53 > mclient -lsql -ftest -i -e --host=ottar --port=30655
+# 15:53:53 >
+
+
+# 15:53:53 >
+# 15:53:53 > Done.
+# 15:53:53 >
+
diff --git a/sql/test/BugTracker-2011/Tests/multiple-joins.Bug-2879.stable.out
b/sql/test/BugTracker-2011/Tests/multiple-joins.Bug-2879.stable.out
new file mode 100644
--- /dev/null
+++ b/sql/test/BugTracker-2011/Tests/multiple-joins.Bug-2879.stable.out
@@ -0,0 +1,98 @@
+stdout of test 'multiple-joins.Bug-2879` in directory 'test/BugTracker-2011`
itself:
+
+
+# 15:53:53 >
+# 15:53:53 > mserver5 --debug=10 --set gdk_nr_threads=0 --set
"gdk_dbfarm=/ufs/sjoerd/Monet-candidate/var/MonetDB" --set mapi_open=true --set
mapi_port=30655 --set monet_prompt= --trace --forcemito --set mal_listing=2
"--dbname=mTests_test_BugTracker-2011" --set mal_listing=0 ; echo ; echo Over..
+# 15:53:53 >
+
+# MonetDB 5 server v11.5.2
+# This is an unreleased version
+# Serving database 'mTests_test_BugTracker-2011', using 4 threads
+# Compiled for x86_64-unknown-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-2011 MonetDB B.V., all rights reserved
+# Visit http://www.monetdb.org/ for further information
+# Listening for connection requests on mapi:monetdb://ottar.ins.cwi.nl:30655/
+# MonetDB/GIS module loaded
+# MonetDB/SQL module loaded
+
+Ready.
+# SQL catalog created, loading sql scripts once
+# SQL loading sql scripts
/net/ottar/export/scratch0/sjoerd/bin/candidate/.stowdir/MonetDB/lib64/monetdb5/createdb/10_math.sql
+# SQL loading sql scripts
/net/ottar/export/scratch0/sjoerd/bin/candidate/.stowdir/MonetDB/lib64/monetdb5/createdb/11_times.sql
+# SQL loading sql scripts
/net/ottar/export/scratch0/sjoerd/bin/candidate/.stowdir/MonetDB/lib64/monetdb5/createdb/12_url.sql
+# SQL loading sql scripts
/net/ottar/export/scratch0/sjoerd/bin/candidate/.stowdir/MonetDB/lib64/monetdb5/createdb/13_date.sql
+# SQL loading sql scripts
/net/ottar/export/scratch0/sjoerd/bin/candidate/.stowdir/MonetDB/lib64/monetdb5/createdb/14_inet.sql
+# SQL loading sql scripts
/net/ottar/export/scratch0/sjoerd/bin/candidate/.stowdir/MonetDB/lib64/monetdb5/createdb/15_history.sql
+# SQL loading sql scripts
/net/ottar/export/scratch0/sjoerd/bin/candidate/.stowdir/MonetDB/lib64/monetdb5/createdb/16_tracelog.sql
+# SQL loading sql scripts
/net/ottar/export/scratch0/sjoerd/bin/candidate/.stowdir/MonetDB/lib64/monetdb5/createdb/17_compress.sql
+# SQL loading sql scripts
/net/ottar/export/scratch0/sjoerd/bin/candidate/.stowdir/MonetDB/lib64/monetdb5/createdb/18_dictionary.sql
+# SQL loading sql scripts
/net/ottar/export/scratch0/sjoerd/bin/candidate/.stowdir/MonetDB/lib64/monetdb5/createdb/19_cluster.sql
+# SQL loading sql scripts
/net/ottar/export/scratch0/sjoerd/bin/candidate/.stowdir/MonetDB/lib64/monetdb5/createdb/20_vacuum.sql
+# SQL loading sql scripts
/net/ottar/export/scratch0/sjoerd/bin/candidate/.stowdir/MonetDB/lib64/monetdb5/createdb/21_dependency_functions.sql
+# SQL loading sql scripts
/net/ottar/export/scratch0/sjoerd/bin/candidate/.stowdir/MonetDB/lib64/monetdb5/createdb/22_clients.sql
+# SQL loading sql scripts
/net/ottar/export/scratch0/sjoerd/bin/candidate/.stowdir/MonetDB/lib64/monetdb5/createdb/23_skyserver.sql
+# SQL loading sql scripts
/net/ottar/export/scratch0/sjoerd/bin/candidate/.stowdir/MonetDB/lib64/monetdb5/createdb/24_zorder.sql
+# SQL loading sql scripts
/net/ottar/export/scratch0/sjoerd/bin/candidate/.stowdir/MonetDB/lib64/monetdb5/createdb/25_debug.sql
+# SQL loading sql scripts
/net/ottar/export/scratch0/sjoerd/bin/candidate/.stowdir/MonetDB/lib64/monetdb5/createdb/40_geom.sql
+# SQL loading sql scripts
/net/ottar/export/scratch0/sjoerd/bin/candidate/.stowdir/MonetDB/lib64/monetdb5/createdb/80_udf.sql
+# SQL loading sql scripts
/net/ottar/export/scratch0/sjoerd/bin/candidate/.stowdir/MonetDB/lib64/monetdb5/createdb/99_system.sql
+
+Over..
+
+# 15:53:53 >
+# 15:53:53 > mclient -lsql -ftest -i -e --host=ottar --port=30655
+# 15:53:53 >
+
+#START TRANSACTION;
+#CREATE TABLE triples (
+# s varchar(255),
+# p varchar(255),
+# o varchar(255),
+# PRIMARY KEY (s, p, o)
+#);
+#INSERT INTO triples (s, p, o) VALUES
+#('<http://example/a>', '<http://example/q1>', '<http://example/z11>'),
+#('<http://example/a>', '<http://example/q1>', '<http://example/z12>'),
+#('<http://example/a>', '<http://example/q2>', '<http://example/z21>'),
+#('<http://example/a>', '<http://example/q2>', '<http://example/z22>'),
+#('<http://example/b>', '<http://example/q2>', '<http://example/y21>'),
+#('<http://example/b>', '<http://example/q2>', '<http://example/y22>'),
+#('<http://example/c>', '<http://example/r>', '<ht
+[ 10 ]
+#SELECT M_1.VC_4 AS V_1, M_1.VC_3 AS V_2, M_1.VC_1 AS V_3, M_1.VC_2 AS V_4
+#FROM
+# ( SELECT COALESCE(T_2.o, T_4.o) AS VC_1, COALESCE(T_3.o, T_5.o) AS VC_2,
+#T_1.o AS VC_3, T_1.s AS VC_4
+# FROM
+# ( SELECT *
+# FROM Triples AS T_1
+# WHERE ( T_1.p = '<http://example/p>' )
+# ) AS T_1
+# LEFT OUTER JOIN
+# Triples AS T_2
+# INNER JOIN
+# Triples AS T_3
+# ON ( T_2.p = '<http://example/q1>'
+# AND T_3.p = '<http://example/q2>'
+# AND T_2.s = T_3.s
+% .m_1, .m_1, .m_1, .m_1 # table_name
+% v_1, v_2, v_3, v_4 # name
+% varchar, varchar, varchar, varchar # type
+% 18, 18, 20, 20 # length
+[ "<http://example/x>", "<http://example/a>", "<http://example/z11>",
"<http://example/z21>" ]
+[ "<http://example/x>", "<http://example/a>", "<http://example/z11>",
"<http://example/z22>" ]
+[ "<http://example/x>", "<http://example/a>", "<http://example/z12>",
"<http://example/z21>" ]
+[ "<http://example/x>", "<http://example/a>", "<http://example/z12>",
"<http://example/z22>" ]
+[ "<http://example/x>", "<http://example/b>", "<http://example/y21>",
"<http://example/y21>" ]
+[ "<http://example/x>", "<http://example/b>", "<http://example/y21>",
"<http://example/y22>" ]
+[ "<http://example/x>", "<http://example/b>", "<http://example/y22>",
"<http://example/y21>" ]
+[ "<http://example/x>", "<http://example/b>", "<http://example/y22>",
"<http://example/y22>" ]
+[ "<http://example/x>", "<http://example/c>", NULL, NULL ]
+#ROLLBACK;
+
+# 15:53:53 >
+# 15:53:53 > Done.
+# 15:53:53 >
+
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list