Changeset: 06b217de92a5 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=06b217de92a5
Modified Files:
sql/src/server/rel_select.mx
sql/src/test/BugDay_2005-12-19_2.9.3/Tests/select_from_env.SF-1240701.1242164.stable.err
sql/src/test/BugDay_2005-12-19_2.9.3/Tests/select_from_env.SF-1240701.1242164.stable.out
sql/src/test/BugTracker/Tests/cardinality_violation.SF-1240701.stable.err
Branch: default
Log Message:
merge from Jun2010
diffs (173 lines):
diff -r 45d9390822b2 -r 06b217de92a5 sql/src/server/rel_select.mx
--- a/sql/src/server/rel_select.mx Wed Aug 11 22:56:02 2010 +0200
+++ b/sql/src/server/rel_select.mx Thu Aug 12 08:23:34 2010 +0200
@@ -3192,6 +3192,36 @@
r = or;
ol = exp_dup(l);
or = exp_dup(r);
+ t1 = exp_subtype(l);
+ t2 = exp_subtype(r);
+
+ if ((f = sql_bind_member(s, fname, t1, 2)) != NULL &&
+ (table_func || !f->res.comp_type)) {
+ /* try finding function based on first argument */
+ node *m = f->func->ops->h;
+ sql_arg *a = m->data;
+
+ l = rel_check_type(sql, &a->type, l, type_equal);
+ a = m->next->data;
+ r = rel_check_type(sql, &a->type, r, type_equal);
+ if (l && r) {
+ exp_destroy(ol);
+ exp_destroy(or);
+ return exp_binop(l, r, f);
+ }
+ }
+ /* reset error */
+ sql->session->status = 0;
+ sql->errstr[0] = '\0';
+
+ if (l)
+ exp_destroy(l);
+ if (r)
+ exp_destroy(r);
+ l = ol;
+ r = or;
+ ol = exp_dup(l);
+ or = exp_dup(r);
/* everything failed, fall back to bind on function name only */
if ((f = sql_find_func(s, fname, 2)) != NULL &&
diff -r 45d9390822b2 -r 06b217de92a5
sql/src/test/BugTracker-2010/Tests/shift_with_cast.Bug-2638.sql
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sql/src/test/BugTracker-2010/Tests/shift_with_cast.Bug-2638.sql Thu Aug
12 08:23:34 2010 +0200
@@ -0,0 +1,3 @@
+select cast(1 as bigint) << 8;
+select cast(98 as bigint) << 32;
+
diff -r 45d9390822b2 -r 06b217de92a5
sql/src/test/BugTracker-2010/Tests/shift_with_cast.Bug-2638.stable.err
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sql/src/test/BugTracker-2010/Tests/shift_with_cast.Bug-2638.stable.err
Thu Aug 12 08:23:34 2010 +0200
@@ -0,0 +1,74 @@
+stderr of test 'shift_with_cast.Bug-2638` in directory
'src/test/BugTracker-2010` itself:
+
+
+# 23:40:19 >
+# 23:40:19 > mserver5
"--config=/export/scratch0/zhang/monet-install/candidate/debug/etc/monetdb5.conf"
--debug=10 --set gdk_nr_threads=0 --set
"monet_mod_path=/export/scratch0/zhang/monet-install/candidate/debug/lib/MonetDB5:/export/scratch0/zhang/monet-install/candidate/debug/lib/MonetDB5/lib:/export/scratch0/zhang/monet-install/candidate/debug/lib/MonetDB5/bin"
--set
"gdk_dbfarm=/export/scratch0/zhang/monet-install/candidate/debug/var/MonetDB5/dbfarm"
--set mapi_open=true --set xrpc_open=true --set mapi_port=39470 --set
xrpc_port=40525 --set monet_prompt= --set mal_listing=2 --trace
"--dbname=mTests_src_test_BugTracker-2010" --set mal_listing=0 ; echo ; echo
Over..
+# 23:40:19 >
+
+# builtin opt gdk_arch = 64bitx86_64-unknown-linux-gnu
+# builtin opt gdk_version = 1.38.4
+# builtin opt prefix = /export/scratch0/zhang/monet-install/candidate/debug
+# 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 = /export/scratch0/zhang/monet-install/candidate/debug
+# config opt config = ${prefix}/etc/monetdb5.conf
+# config opt prefix = /export/scratch0/zhang/monet-install/candidate/debug
+# 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
+# config opt accumulator_pipe =
inline,remap,evaluate,costModel,coercions,emptySet,aliases,mergetable,deadcode,constants,commonTerms,joinPath,deadcode,reduce,accumulators,dataflow,history,multiplex,garbageCollector
+# config opt recycler_pipe =
inline,remap,evaluate,costModel,coercions,emptySet,aliases,deadcode,constants,commonTerms,joinPath,deadcode,recycle,reduce,dataflow,history,multiplex,garbageCollector
+# config opt cracker_pipe =
inline,remap,evaluate,costModel,coercions,emptySet,aliases,selcrack,deadcode,constants,commonTerms,joinPath,deadcode,reduce,dataflow,history,multiplex,garbageCollector
+# config opt sidcrack_pipe =
inline,remap,evaluate,costModel,coercions,emptySet,aliases,sidcrack,deadcode,constants,commonTerms,joinPath,deadcode,reduce,dataflow,history,multiplex,garbageCollector
+# config opt octopus_pipe =
inline,remap,evaluate,costModel,coercions,emptySet,aliases,mitosis,mergetable,deadcode,constants,commonTerms,joinPath,octopus,deadcode,reduce,dataflow,history,multiplex,garbageCollector
+# config opt derive_pipe =
inline,remap,evaluate,costModel,coercions,emptySet,aliases,mergetable,deadcode,constants,commonTerms,derivePath,joinPath,deadcode,reduce,dataflow,history,multiplex,garbageCollector
+# config opt dictionary_pipe =
inline,remap,dictionary,evaluate,costModel,coercions,emptySet,aliases,mergetable,deadcode,constants,commonTerms,joinPath,deadcode,reduce,dataflow,history,multiplex,garbageCollector
+# config opt compression_pipe =
inline,remap,evaluate,costModel,coercions,emptySet,aliases,mergetable,deadcode,constants,commonTerms,joinPath,deadcode,reduce,dataflow,compression,dataflow,history,multiplex,garbageCollector
+# cmdline opt config =
/export/scratch0/zhang/monet-install/candidate/debug/etc/monetdb5.conf
+# cmdline opt gdk_nr_threads = 0
+# cmdline opt monet_mod_path =
/export/scratch0/zhang/monet-install/candidate/debug/lib/MonetDB5:/export/scratch0/zhang/monet-install/candidate/debug/lib/MonetDB5/lib:/export/scratch0/zhang/monet-install/candidate/debug/lib/MonetDB5/bin
+# cmdline opt gdk_dbfarm =
/export/scratch0/zhang/monet-install/candidate/debug/var/MonetDB5/dbfarm
+# cmdline opt mapi_open = true
+# cmdline opt xrpc_open = true
+# cmdline opt mapi_port = 39470
+# cmdline opt xrpc_port = 40525
+# 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 /export/scratch0/zhang/monet-install/candidate/debug/etc/monetdb5.conf)
+
+# 23:40:19 >
+# 23:40:19 > mclient -lsql -ftest -i -e --host=jarl --port=39470
+# 23:40:19 >
+
+
+# 23:40:19 >
+# 23:40:19 > Done.
+# 23:40:19 >
+
diff -r 45d9390822b2 -r 06b217de92a5
sql/src/test/BugTracker-2010/Tests/shift_with_cast.Bug-2638.stable.out
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sql/src/test/BugTracker-2010/Tests/shift_with_cast.Bug-2638.stable.out
Thu Aug 12 08:23:34 2010 +0200
@@ -0,0 +1,44 @@
+stdout of test 'shift_with_cast.Bug-2638` in directory
'src/test/BugTracker-2010` itself:
+
+
+# 23:40:19 >
+# 23:40:19 > mserver5
"--config=/export/scratch0/zhang/monet-install/candidate/debug/etc/monetdb5.conf"
--debug=10 --set gdk_nr_threads=0 --set
"monet_mod_path=/export/scratch0/zhang/monet-install/candidate/debug/lib/MonetDB5:/export/scratch0/zhang/monet-install/candidate/debug/lib/MonetDB5/lib:/export/scratch0/zhang/monet-install/candidate/debug/lib/MonetDB5/bin"
--set
"gdk_dbfarm=/export/scratch0/zhang/monet-install/candidate/debug/var/MonetDB5/dbfarm"
--set mapi_open=true --set xrpc_open=true --set mapi_port=39470 --set
xrpc_port=40525 --set monet_prompt= --set mal_listing=2 --trace
"--dbname=mTests_src_test_BugTracker-2010" --set mal_listing=0 ; echo ; echo
Over..
+# 23:40:19 >
+
+# 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.751 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://jarl.ins.cwi.nl:39470/
+# MonetDB/SQL module v2.38.4 loaded
+# MonetDB/GIS module v0.18.4 loaded
+
+Ready.
+
+Over..
+
+# 23:40:19 >
+# 23:40:19 > mclient -lsql -ftest -i -e --host=jarl --port=39470
+# 23:40:19 >
+
+#select cast(1 as bigint) << 8;
+% . # table_name
+% left_shift_single_value # name
+% bigint # type
+% 3 # length
+[ 256 ]
+#select cast(98 as bigint) << 32;
+% . # table_name
+% left_shift_single_value # name
+% bigint # type
+% 12 # length
+[ 420906795008 ]
+
+# 23:40:19 >
+# 23:40:19 > Done.
+# 23:40:19 >
+
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list