Changeset: 45c1f030e31d for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=45c1f030e31d Modified Files: sql/ChangeLog.Jun2010 sql/src/common/sql_types.mx sql/src/server/rel_exp.mx sql/src/test/BugTracker-2010/Tests/All Branch: default Log Message:
Merge with Jun2010 branch. diffs (truncated from 583 to 300 lines): diff -r 65a029afacb5 -r 45c1f030e31d MonetDB5/ChangeLog.Jun2010 --- a/MonetDB5/ChangeLog.Jun2010 Thu Aug 12 12:44:23 2010 +0200 +++ b/MonetDB5/ChangeLog.Jun2010 Thu Aug 12 22:43:43 2010 +0200 @@ -3,7 +3,7 @@ * Fri Jul 30 2010 Niels Nes <ni...@cwi.nl> - Fixed bug 2557. There was a bug in the mergetable optimizer which was - triggered by multi column (atleast 32 columns). + triggered by multi column (at least 32 columns). * Wed Jul 28 2010 Martin Kersten <m...@cwi.nl> - Added missing multiplex version of MAL str.stringlength(). diff -r 65a029afacb5 -r 45c1f030e31d sql/ChangeLog.Jun2010 --- a/sql/ChangeLog.Jun2010 Thu Aug 12 12:44:23 2010 +0200 +++ b/sql/ChangeLog.Jun2010 Thu Aug 12 22:43:43 2010 +0200 @@ -1,6 +1,11 @@ # ChangeLog file for sql # This file is updated with Maddlog +* Thu Aug 12 2010 Niels Nes <ni...@cwi.nl> +- Fixed bug 2353. The relational optimizer didn't handle range join + expressions properly. +- fixed bug 2354. Improved function resolution. + * Mon Aug 9 2010 Jennie Zhang <y.zh...@cwi.nl> - Fixed bug 2645: mat.pack+algebra.slice should be replaced by mat.slice for 'limit 1' (when the default_pipe is used) diff -r 65a029afacb5 -r 45c1f030e31d sql/src/common/sql_types.mx --- a/sql/src/common/sql_types.mx Thu Aug 12 12:44:23 2010 +0200 +++ b/sql/src/common/sql_types.mx Thu Aug 12 22:43:43 2010 +0200 @@ -768,12 +768,7 @@ if (list_length(f->ops) == nrargs && is_subtype(tp, &((sql_arg *) f->ops->h->data)->type)) { unsigned int scale = 0; - sql_subfunc *fres; - - /* member functions should not match binary operators */ - if (nrargs == 2 && subtype_cmp( &((sql_arg *) f->ops->h->data)->type, &((sql_arg *) f->ops->h->next->data)->type) == 0) - continue; - fres = ZNEW(sql_subfunc); + sql_subfunc *fres = ZNEW(sql_subfunc); sql_ref_init(&(fres->ref)); fres->func = f; diff -r 65a029afacb5 -r 45c1f030e31d sql/src/server/rel_exp.mx --- a/sql/src/server/rel_exp.mx Thu Aug 12 12:44:23 2010 +0200 +++ b/sql/src/server/rel_exp.mx Thu Aug 12 22:43:43 2010 +0200 @@ -697,7 +697,10 @@ int exp_is_join(sql_exp *e) { - if (e->type == e_cmp && e->flag != cmp_or && e->l && e->r && e->card >= CARD_AGGR) + /* only simple compare expressions, ie not or lists + or range expressions (e->f) + */ + if (e->type == e_cmp && e->flag != cmp_or && e->l && e->r && !e->f && e->card >= CARD_AGGR) return 0; return -1; } diff -r 65a029afacb5 -r 45c1f030e31d sql/src/test/BugTracker-2010/Tests/All --- a/sql/src/test/BugTracker-2010/Tests/All Thu Aug 12 12:44:23 2010 +0200 +++ b/sql/src/test/BugTracker-2010/Tests/All Thu Aug 12 22:43:43 2010 +0200 @@ -42,3 +42,8 @@ unicode-bom.Bug-2641 mat.slice_limit1.Bug-2645 shift_with_cast.Bug-2638 +concat_type_check_problem.Bug-2354 +crash_on_where_in.Bug-2333 +assert_on_type_mismatch.Bug-2319 +crash_on_in_1.Bug-2352 +crash_on_complex_join_exp.Bug-2353 diff -r 65a029afacb5 -r 45c1f030e31d sql/src/test/BugTracker-2010/Tests/assert_on_type_mismatch.Bug-2319.sql --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sql/src/test/BugTracker-2010/Tests/assert_on_type_mismatch.Bug-2319.sql Thu Aug 12 22:43:43 2010 +0200 @@ -0,0 +1,5 @@ +create table x (id1 varchar(1000), id2 int); +create table dict (id int, x varchar(100)); +UPDATE dict SET id = (SELECT id2 FROM "x" WHERE id1=dict.id); +drop table dict; +drop table x; diff -r 65a029afacb5 -r 45c1f030e31d sql/src/test/BugTracker-2010/Tests/assert_on_type_mismatch.Bug-2319.stable.err --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sql/src/test/BugTracker-2010/Tests/assert_on_type_mismatch.Bug-2319.stable.err Thu Aug 12 22:43:43 2010 +0200 @@ -0,0 +1,66 @@ +stderr of test 'assert_on_type_mismatch.Bug-2319` in directory 'src/test/BugTracker-2010` itself: + + +# 19:52:59 > +# 19:52:59 > mserver5 "--config=/ufs/niels/scratch/rc/Linux-x86_64/etc/monetdb5.conf" --debug=10 --set gdk_nr_threads=0 --set "monet_mod_path=/ufs/niels/scratch/rc/Linux-x86_64/lib/MonetDB5:/ufs/niels/scratch/rc/Linux-x86_64/lib/MonetDB5/lib:/ufs/niels/scratch/rc/Linux-x86_64/lib/MonetDB5/bin" --set "gdk_dbfarm=/ufs/niels/scratch/rc/Linux-x86_64/var/MonetDB5/dbfarm" --set mapi_open=true --set xrpc_open=true --set mapi_port=32818 --set xrpc_port=46410 --set monet_prompt= --set mal_listing=2 --trace "--dbname=mTests_src_test_BugTracker-2010" --set mal_listing=0 ; echo ; echo Over.. +# 19:52:59 > + +# builtin opt gdk_arch = 64bitx86_64-unknown-linux-gnu +# builtin opt gdk_version = 1.38.4 +# builtin opt prefix = /ufs/niels/scratch/rc/Linux-x86_64 +# builtin opt exec_prefix = ${prefix} +# builtin opt gdk_dbname = demo +# builtin opt gdk_dbfarm = ${prefix}/var/MonetDB/dbfarm +# builtin opt gdk_debug = 0 +# builtin opt gdk_alloc_map = no +# builtin opt gdk_vmtrim = yes +# builtin opt monet_admin = adm +# builtin opt monet_prompt = > +# builtin opt monet_welcome = yes +# builtin opt monet_mod_path = ${exec_prefix}/lib/MonetDB +# builtin opt monet_daemon = no +# builtin opt host = localhost +# builtin opt mapi_port = 50000 +# builtin opt mapi_clients = 2 +# builtin opt mapi_open = false +# builtin opt mapi_autosense = false +# builtin opt sql_debug = 0 +# builtin opt standoff_ns = +# builtin opt standoff_start = start +# builtin opt standoff_end = end +# config opt prefix = /ufs/niels/scratch/rc/Linux-x86_64 +# config opt config = ${prefix}/etc/monetdb5.conf +# config opt prefix = /ufs/niels/scratch/rc/Linux-x86_64 +# config opt exec_prefix = ${prefix} +# config opt gdk_dbfarm = ${prefix}/var/MonetDB5/dbfarm +# config opt monet_mod_path = ${exec_prefix}/lib/MonetDB5:${exec_prefix}/lib/MonetDB5/lib:${exec_prefix}/lib/MonetDB5/bin +# config opt mero_pidfile = ${prefix}/var/run/MonetDB/merovingian.pid +# config opt mero_controlport = 50001 +# config opt sql_optimizer = default_pipe +# config opt minimal_pipe = inline,remap,deadcode,multiplex,garbageCollector +# config opt default_pipe = inline,remap,evaluate,costModel,coercions,emptySet,aliases,mitosis,mergetable,deadcode,commonTerms,joinPath,reorder,deadcode,reduce,dataflow,history,multiplex,garbageCollector +# config opt nov2009_pipe = inline,remap,evaluate,costModel,coercions,emptySet,aliases,mergetable,deadcode,constants,commonTerms,joinPath,deadcode,reduce,dataflow,history,multiplex,garbageCollector +# cmdline opt config = /ufs/niels/scratch/rc/Linux-x86_64/etc/monetdb5.conf +# cmdline opt gdk_nr_threads = 0 +# cmdline opt monet_mod_path = /ufs/niels/scratch/rc/Linux-x86_64/lib/MonetDB5:/ufs/niels/scratch/rc/Linux-x86_64/lib/MonetDB5/lib:/ufs/niels/scratch/rc/Linux-x86_64/lib/MonetDB5/bin +# cmdline opt gdk_dbfarm = /ufs/niels/scratch/rc/Linux-x86_64/var/MonetDB5/dbfarm +# cmdline opt mapi_open = true +# cmdline opt xrpc_open = true +# cmdline opt mapi_port = 32818 +# cmdline opt xrpc_port = 46410 +# cmdline opt monet_prompt = +# cmdline opt mal_listing = 2 +# cmdline opt gdk_dbname = mTests_src_test_BugTracker-2010 +# cmdline opt mal_listing = 0 +#warning: please don't forget to set your vault key! +#(see /ufs/niels/scratch/rc/Linux-x86_64/etc/monetdb5.conf) + +# 19:52:59 > +# 19:52:59 > mclient -lsql -ftest -i -e --host=alf --port=32818 +# 19:52:59 > + + +# 19:52:59 > +# 19:52:59 > Done. +# 19:52:59 > + diff -r 65a029afacb5 -r 45c1f030e31d sql/src/test/BugTracker-2010/Tests/assert_on_type_mismatch.Bug-2319.stable.out --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sql/src/test/BugTracker-2010/Tests/assert_on_type_mismatch.Bug-2319.stable.out Thu Aug 12 22:43:43 2010 +0200 @@ -0,0 +1,37 @@ +stdout of test 'assert_on_type_mismatch.Bug-2319` in directory 'src/test/BugTracker-2010` itself: + + +# 19:52:59 > +# 19:52:59 > mserver5 "--config=/ufs/niels/scratch/rc/Linux-x86_64/etc/monetdb5.conf" --debug=10 --set gdk_nr_threads=0 --set "monet_mod_path=/ufs/niels/scratch/rc/Linux-x86_64/lib/MonetDB5:/ufs/niels/scratch/rc/Linux-x86_64/lib/MonetDB5/lib:/ufs/niels/scratch/rc/Linux-x86_64/lib/MonetDB5/bin" --set "gdk_dbfarm=/ufs/niels/scratch/rc/Linux-x86_64/var/MonetDB5/dbfarm" --set mapi_open=true --set xrpc_open=true --set mapi_port=32818 --set xrpc_port=46410 --set monet_prompt= --set mal_listing=2 --trace "--dbname=mTests_src_test_BugTracker-2010" --set mal_listing=0 ; echo ; echo Over.. +# 19:52:59 > + +# MonetDB server v5.20.4, based on kernel v1.38.4 +# Not released +# Serving database 'mTests_src_test_BugTracker-2010', using 4 threads +# Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs dynamically linked +# Found 7.754 GiB available main-memory. +# Copyright (c) 1993-July 2008 CWI. +# Copyright (c) August 2008-2010 MonetDB B.V., all rights reserved +# Visit http://monetdb.cwi.nl/ for further information +# Listening for connection requests on mapi:monetdb://alf.ins.cwi.nl:32818/ +# MonetDB/SQL module v2.38.4 loaded + +Ready. + +Over.. + +# 19:52:59 > +# 19:52:59 > mclient -lsql -ftest -i -e --host=alf --port=32818 +# 19:52:59 > + +#create table x (id1 varchar(1000), id2 int); +#create table dict (id int, x varchar(100)); +#UPDATE dict SET id = (SELECT id2 FROM "x" WHERE id1=dict.id); +[ 0 ] +#drop table dict; +#drop table x; + +# 19:52:59 > +# 19:52:59 > Done. +# 19:52:59 > + diff -r 65a029afacb5 -r 45c1f030e31d sql/src/test/BugTracker-2010/Tests/concat_type_check_problem.Bug-2354.sql --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sql/src/test/BugTracker-2010/Tests/concat_type_check_problem.Bug-2354.sql Thu Aug 12 22:43:43 2010 +0200 @@ -0,0 +1,10 @@ +create table test2(a varchar(256), b int, c varchar(16)); +insert into test2 values ('testaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 1, 'test'); +select a||' '||b||' '||c from test2; +select cast(a||' '||b as varchar(256))||' '||c from test2; +drop table test2; + +create table testmore2(test1 varchar(1), test2 int, test3 varchar(3)); +insert into testmore2 values ('1', 23, '456'); +select length(test1||' '||test2||' '||test3) from testmore2 ; +drop table testmore2; diff -r 65a029afacb5 -r 45c1f030e31d sql/src/test/BugTracker-2010/Tests/concat_type_check_problem.Bug-2354.stable.err --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sql/src/test/BugTracker-2010/Tests/concat_type_check_problem.Bug-2354.stable.err Thu Aug 12 22:43:43 2010 +0200 @@ -0,0 +1,66 @@ +stderr of test 'concat_type_check_problem.Bug-2354` in directory 'src/test/BugTracker-2010` itself: + + +# 19:31:52 > +# 19:31:52 > mserver5 "--config=/ufs/niels/scratch/rc/Linux-x86_64/etc/monetdb5.conf" --debug=10 --set gdk_nr_threads=0 --set "monet_mod_path=/ufs/niels/scratch/rc/Linux-x86_64/lib/MonetDB5:/ufs/niels/scratch/rc/Linux-x86_64/lib/MonetDB5/lib:/ufs/niels/scratch/rc/Linux-x86_64/lib/MonetDB5/bin" --set "gdk_dbfarm=/ufs/niels/scratch/rc/Linux-x86_64/var/MonetDB5/dbfarm" --set mapi_open=true --set xrpc_open=true --set mapi_port=37015 --set xrpc_port=47340 --set monet_prompt= --set mal_listing=2 --trace "--dbname=mTests_src_test_BugTracker-2010" --set mal_listing=0 ; echo ; echo Over.. +# 19:31:52 > + +# builtin opt gdk_arch = 64bitx86_64-unknown-linux-gnu +# builtin opt gdk_version = 1.38.4 +# builtin opt prefix = /ufs/niels/scratch/rc/Linux-x86_64 +# builtin opt exec_prefix = ${prefix} +# builtin opt gdk_dbname = demo +# builtin opt gdk_dbfarm = ${prefix}/var/MonetDB/dbfarm +# builtin opt gdk_debug = 0 +# builtin opt gdk_alloc_map = no +# builtin opt gdk_vmtrim = yes +# builtin opt monet_admin = adm +# builtin opt monet_prompt = > +# builtin opt monet_welcome = yes +# builtin opt monet_mod_path = ${exec_prefix}/lib/MonetDB +# builtin opt monet_daemon = no +# builtin opt host = localhost +# builtin opt mapi_port = 50000 +# builtin opt mapi_clients = 2 +# builtin opt mapi_open = false +# builtin opt mapi_autosense = false +# builtin opt sql_debug = 0 +# builtin opt standoff_ns = +# builtin opt standoff_start = start +# builtin opt standoff_end = end +# config opt prefix = /ufs/niels/scratch/rc/Linux-x86_64 +# config opt config = ${prefix}/etc/monetdb5.conf +# config opt prefix = /ufs/niels/scratch/rc/Linux-x86_64 +# config opt exec_prefix = ${prefix} +# config opt gdk_dbfarm = ${prefix}/var/MonetDB5/dbfarm +# config opt monet_mod_path = ${exec_prefix}/lib/MonetDB5:${exec_prefix}/lib/MonetDB5/lib:${exec_prefix}/lib/MonetDB5/bin +# config opt mero_pidfile = ${prefix}/var/run/MonetDB/merovingian.pid +# config opt mero_controlport = 50001 +# config opt sql_optimizer = default_pipe +# config opt minimal_pipe = inline,remap,deadcode,multiplex,garbageCollector +# config opt default_pipe = inline,remap,evaluate,costModel,coercions,emptySet,aliases,mitosis,mergetable,deadcode,commonTerms,joinPath,reorder,deadcode,reduce,dataflow,history,multiplex,garbageCollector +# config opt nov2009_pipe = inline,remap,evaluate,costModel,coercions,emptySet,aliases,mergetable,deadcode,constants,commonTerms,joinPath,deadcode,reduce,dataflow,history,multiplex,garbageCollector +# cmdline opt config = /ufs/niels/scratch/rc/Linux-x86_64/etc/monetdb5.conf +# cmdline opt gdk_nr_threads = 0 +# cmdline opt monet_mod_path = /ufs/niels/scratch/rc/Linux-x86_64/lib/MonetDB5:/ufs/niels/scratch/rc/Linux-x86_64/lib/MonetDB5/lib:/ufs/niels/scratch/rc/Linux-x86_64/lib/MonetDB5/bin +# cmdline opt gdk_dbfarm = /ufs/niels/scratch/rc/Linux-x86_64/var/MonetDB5/dbfarm +# cmdline opt mapi_open = true +# cmdline opt xrpc_open = true +# cmdline opt mapi_port = 37015 +# cmdline opt xrpc_port = 47340 +# cmdline opt monet_prompt = +# cmdline opt mal_listing = 2 +# cmdline opt gdk_dbname = mTests_src_test_BugTracker-2010 +# cmdline opt mal_listing = 0 +#warning: please don't forget to set your vault key! +#(see /ufs/niels/scratch/rc/Linux-x86_64/etc/monetdb5.conf) + +# 19:31:52 > +# 19:31:52 > mclient -lsql -ftest -i -e --host=alf --port=37015 +# 19:31:52 > + + +# 19:31:52 > +# 19:31:52 > Done. +# 19:31:52 > + diff -r 65a029afacb5 -r 45c1f030e31d sql/src/test/BugTracker-2010/Tests/concat_type_check_problem.Bug-2354.stable.out --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sql/src/test/BugTracker-2010/Tests/concat_type_check_problem.Bug-2354.stable.out Thu Aug 12 22:43:43 2010 +0200 @@ -0,0 +1,57 @@ +stdout of test 'concat_type_check_problem.Bug-2354` in directory 'src/test/BugTracker-2010` itself: + + +# 19:31:52 > +# 19:31:52 > mserver5 "--config=/ufs/niels/scratch/rc/Linux-x86_64/etc/monetdb5.conf" --debug=10 --set gdk_nr_threads=0 --set "monet_mod_path=/ufs/niels/scratch/rc/Linux-x86_64/lib/MonetDB5:/ufs/niels/scratch/rc/Linux-x86_64/lib/MonetDB5/lib:/ufs/niels/scratch/rc/Linux-x86_64/lib/MonetDB5/bin" --set "gdk_dbfarm=/ufs/niels/scratch/rc/Linux-x86_64/var/MonetDB5/dbfarm" --set mapi_open=true --set xrpc_open=true --set mapi_port=37015 --set xrpc_port=47340 --set monet_prompt= --set mal_listing=2 --trace "--dbname=mTests_src_test_BugTracker-2010" --set mal_listing=0 ; echo ; echo Over.. +# 19:31:52 > + +# MonetDB server v5.20.4, based on kernel v1.38.4 +# Not released +# Serving database 'mTests_src_test_BugTracker-2010', using 4 threads +# Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs dynamically linked +# Found 7.754 GiB available main-memory. +# Copyright (c) 1993-July 2008 CWI. +# Copyright (c) August 2008-2010 MonetDB B.V., all rights reserved +# Visit http://monetdb.cwi.nl/ for further information +# Listening for connection requests on mapi:monetdb://alf.ins.cwi.nl:37015/ +# MonetDB/SQL module v2.38.4 loaded + +Ready. + +Over.. _______________________________________________ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list