Update of /cvsroot/monetdb/sql/src/server
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv20529/src/server

Modified Files:
        rel_bin.mx sql_statement.mx 
Log Message:
fix SQL IN (semijoin) / with union, ie add proper project(x) [x,any] -> [x,void]


U rel_bin.mx
Index: rel_bin.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/server/rel_bin.mx,v
retrieving revision 1.86
retrieving revision 1.87
diff -u -d -r1.86 -r1.87
--- rel_bin.mx  1 Aug 2009 14:47:38 -0000       1.86
+++ rel_bin.mx  2 Aug 2009 19:56:40 -0000       1.87
@@ -233,6 +233,7 @@
        /*s = stmt_mark_tail(stmt_reverse(stmt_semijoin(stmt_reverse(c), 
stmt_reverse(s))), 0);*/
        /* not really a projection join, therefore make sure left values are 
unique !! */
        s = stmt_project(c, stmt_reverse(stmt_unique(s, NULL)));
+       s = stmt_const(s, NULL);
 
        list_destroy(nl);
        return s;

U sql_statement.mx
Index: sql_statement.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/server/sql_statement.mx,v
retrieving revision 1.188
retrieving revision 1.189
diff -u -d -r1.188 -r1.189
--- sql_statement.mx    2 Aug 2009 11:56:10 -0000       1.188
+++ sql_statement.mx    2 Aug 2009 19:56:40 -0000       1.189
@@ -471,7 +471,7 @@
 }
 
 static stmt *
-stmt_atom_oid(int i)
+stmt_atom_oid(oid i)
 {
        sql_subtype t;
 
@@ -1324,7 +1324,7 @@
 stmt *
 stmt_const(stmt *rows, stmt *val) 
 {
-       if (has_side_effect(val)) {
+       if (val && has_side_effect(val)) {
                stmt *x = push_project(rows, val);
                stmt_destroy(rows);
                return x;


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins

Reply via email to