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

Modified Files:
        rel_bin.mx 
Log Message:
propagated changes of Saturday Sep 19 2009 - Monday Sep 21 2009
from the Aug2009 branch to the development trunk

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2009/09/19 - nielsnes: src/server/rel_bin.mx,1.87.2.5
fixed bug with 2 coun'ts (or other aggregates) with a limit statement.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Index: rel_bin.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/server/rel_bin.mx,v
retrieving revision 1.92
retrieving revision 1.93
diff -u -d -r1.92 -r1.93
--- rel_bin.mx  14 Sep 2009 18:20:23 -0000      1.92
+++ rel_bin.mx  21 Sep 2009 14:13:35 -0000      1.93
@@ -1761,7 +1761,7 @@
 
        if (sub->type == st_ordered) {
                stmt *s = stmt_dup(sub->op2.stval);
-               order = stmt_dup(sub->op1.stval);
+               order = column(stmt_dup(sub->op1.stval));
                stmt_destroy(sub);
                sub = s;
        }
@@ -1780,7 +1780,7 @@
                if (order) {
                        limit = stmt_limit(stmt_dup(order), o, l, 0);
                } else {
-                       limit = stmt_limit(stmt_dup(n->data), o, l, 0);
+                       limit = stmt_limit(column(stmt_dup(n->data)), o, l, 0);
                        if (lmt >= 0) {
                                n = n->next;
                                list_append(newl, limit);
@@ -1796,7 +1796,7 @@
                        else
                                p = stmt_semijoin(stmt_dup(p), stmt_dup(limit));
                        for ( ; n; n = n->next) {
-                               stmt *s = stmt_dup(n->data);
+                               stmt *s = column(stmt_dup(n->data));
                                stmt *prj = find_projection_join(s);
                
                                /* for all but the order column we can reduce */
@@ -1810,9 +1810,9 @@
                                stmt *s;
                
                                if (lmt < 0)
-                                       s = stmt_diff(stmt_dup(n->data), 
stmt_dup(limit));
+                                       s = 
stmt_diff(column(stmt_dup(n->data)), stmt_dup(limit));
                                else
-                                       s = stmt_semijoin(stmt_dup(n->data), 
stmt_dup(limit));
+                                       s = 
stmt_semijoin(column(stmt_dup(n->data)), stmt_dup(limit));
                                list_append(newl, s);
                        }
                }


------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins

Reply via email to