Changeset: bfd7df8db821 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=bfd7df8db821
Modified Files:
        sql/src/server/rel_optimizer.mx
        sql/src/test/BugTracker-2010/Tests/All
Branch: default
Log Message:

merged my compilation fix & Niels' bug fix from Jun2010


diffs (183 lines):

diff -r b9dfce47917f -r bfd7df8db821 pathfinder/compiler/mil/milgen.brg
--- a/pathfinder/compiler/mil/milgen.brg        Fri Jul 09 00:52:49 2010 +0200
+++ b/pathfinder/compiler/mil/milgen.brg        Fri Jul 09 10:39:19 2010 +0200
@@ -7487,9 +7487,9 @@
             /* only used in assertions */
             PFalg_simple_type_t ty  = type_of (L(p), p->sem.doc_access.col);
 #endif
-            mvar_t             *str,
-                               *qname_id,
-                               *qname_cont;
+            mvar_t             *str = NULL,
+                               *qname_id = NULL,
+                               *qname_cont = NULL;
 
             PFmil_t *frag = VAR (L(p)->env, col, aat_frag),
                     *pre  = VAR (L(p)->env, col, aat_pre),
diff -r b9dfce47917f -r bfd7df8db821 sql/src/server/rel_optimizer.mx
--- a/sql/src/server/rel_optimizer.mx   Fri Jul 09 00:52:49 2010 +0200
+++ b/sql/src/server/rel_optimizer.mx   Fri Jul 09 10:39:19 2010 +0200
@@ -3356,7 +3356,7 @@
                                p->value = i;
                        }
                        /* add the remaining exps to the new exp list */
-                       if (list_length(rel->exps) < list_length(exps)) {
+                       if (list_length(rel->exps) > list_length(exps)) {
                                for( n = rel->exps->h; n; n = n->next) {
                                        sql_exp *e = n->data;
                                        if (!list_find(exps, e, (fcmp)&exp_cmp))
diff -r b9dfce47917f -r bfd7df8db821 sql/src/test/BugTracker-2010/Tests/All
--- a/sql/src/test/BugTracker-2010/Tests/All    Fri Jul 09 00:52:49 2010 +0200
+++ b/sql/src/test/BugTracker-2010/Tests/All    Fri Jul 09 10:39:19 2010 +0200
@@ -23,3 +23,4 @@
 in_query_with_constants_fails.Bug-2582
 prepare_on_boolean_bug.Bug-2581
 prepare_statements_crash_server.Bug-2599
+and_not_broken.Bug-2602
diff -r b9dfce47917f -r bfd7df8db821 
sql/src/test/BugTracker-2010/Tests/and_not_broken.Bug-2602.sql
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sql/src/test/BugTracker-2010/Tests/and_not_broken.Bug-2602.sql    Fri Jul 
09 10:39:19 2010 +0200
@@ -0,0 +1,16 @@
+CREATE TABLE "tbl1" (
+         "id"          int           NOT NULL,
+         "id1"         int           NOT NULL,
+         "id2"         int           NOT NULL,
+         "name"        varchar(300)  NOT NULL,
+         CONSTRAINT "test_id_pkey" PRIMARY KEY ("id"),
+         CONSTRAINT "test_id1_name_unique" UNIQUE ("id1", "name")
+);
+
+
+INSERT INTO tbl1 VALUES (1, 1, 1, 'one');
+
+SELECT (1) as "a" FROM tbl1 WHERE id1 = 2;
+SELECT (1) as "a" FROM tbl1 WHERE ( id1 = 1 AND name = 'one' AND NOT id = 1);
+
+DROP TABLE "tbl1";
diff -r b9dfce47917f -r bfd7df8db821 
sql/src/test/BugTracker-2010/Tests/and_not_broken.Bug-2602.stable.err
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sql/src/test/BugTracker-2010/Tests/and_not_broken.Bug-2602.stable.err     
Fri Jul 09 10:39:19 2010 +0200
@@ -0,0 +1,78 @@
+stderr of test 'and_not_broken.Bug-2602` in directory 
'src/test/BugTracker-2010` itself:
+
+
+# 09:04:07 >  
+# 09:04:07 >   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=30284 --set 
xrpc_port=47382 --set monet_prompt= --set mal_listing=2 --trace  
"--dbname=mTests_src_test_BugTracker-2010" --set mal_listing=0 ; echo ; echo 
Over..
+# 09:04:07 >  
+
+# builtin opt  gdk_arch = 64bitx86_64-unknown-linux-gnu
+# builtin opt  gdk_version = 1.38.0
+# 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
+# config opt   replication_pipe = 
inline,remap,evaluate,costModel,coercions,emptySet,aliases,mergetable,deadcode,constants,commonTerms,joinPath,deadcode,reduce,dataflow,history,replication,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   datacell_pipe = 
inline,remap,evaluate,costModel,coercions,emptySet,aliases,deadcode,constants,commonTerms,joinPath,datacell,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   mapreduce_pipe = 
inline,remap,evaluate,costModel,coercions,emptySet,aliases,mapreduce,mergetable,deadcode,commonTerms,joinPath,reorder,deadcode,reduce,dataflow,history,multiplex,garbageCollector
+# config opt   datacyclotron_pipe = 
inline,remap,evaluate,costModel,coercions,emptySet,aliases,datacyclotron,mergetable,deadcode,constants,commonTerms,joinPath,reorder,deadcode,reduce,dataflow,history,replication,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 = /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 = 30284
+# cmdline opt  xrpc_port = 47382
+# 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)
+
+# 09:04:07 >  
+# 09:04:07 >  mclient -lsql -ftest -i -e --host=alf --port=30284 
+# 09:04:07 >  
+
+
+# 09:04:07 >  
+# 09:04:07 >  Done.
+# 09:04:07 >  
+
diff -r b9dfce47917f -r bfd7df8db821 
sql/src/test/BugTracker-2010/Tests/and_not_broken.Bug-2602.stable.out
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sql/src/test/BugTracker-2010/Tests/and_not_broken.Bug-2602.stable.out     
Fri Jul 09 10:39:19 2010 +0200
@@ -0,0 +1,41 @@
+stdout of test 'and_not_broken.Bug-2602` in directory 
'src/test/BugTracker-2010` itself:
+
+
+# 09:04:07 >  
+# 09:04:07 >   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=30284 --set 
xrpc_port=47382 --set monet_prompt= --set mal_listing=2 --trace  
"--dbname=mTests_src_test_BugTracker-2010" --set mal_listing=0 ; echo ; echo 
Over..
+# 09:04:07 >  
+
+# MonetDB server v5.20.0, based on kernel v1.38.0
+# 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:30284/
+# MonetDB/SQL module v2.38.2 loaded
+
+Ready.
+
+Over..
+
+# 09:04:07 >  
+# 09:04:07 >  mclient -lsql -ftest -i -e --host=alf --port=30284 
+# 09:04:07 >  
+
+[ 1    ]
+#SELECT (1) as "a" FROM tbl1 WHERE id1 = 2;
+% . # table_name
+% a # name
+% tinyint # type
+% 1 # length
+#SELECT (1) as "a" FROM tbl1 WHERE ( id1 = 1 AND name = 'one' AND NOT id = 1);
+% . # table_name
+% a # name
+% tinyint # type
+% 1 # length
+
+# 09:04:07 >  
+# 09:04:07 >  Done.
+# 09:04:07 >  
+
_______________________________________________
Checkin-list mailing list
Checkin-list@monetdb.org
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to