Update of /cvsroot/monetdb/sql/src/server
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv8260

Modified Files:
        sql_select.mx 
Log Message:
Check if the check types worked fine (be defensive).
This was the problem for bug [ monetdb-Bugs-1959410 ] between with column

When we combine order by with limit within return statement, the ordered 
statement is
inside the limit statement.
This was the reason for bug [ monetdb-Bugs-1959410 ] between with column


U sql_select.mx
Index: sql_select.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/server/sql_select.mx,v
retrieving revision 1.229
retrieving revision 1.230
diff -u -d -r1.229 -r1.230
--- sql_select.mx       1 Apr 2008 17:05:00 -0000       1.229
+++ sql_select.mx       9 May 2008 09:28:48 -0000       1.230
@@ -3207,6 +3207,8 @@
                ct = tail_type(ls);
                rs1 = check_types(sql, ct, rs1, type_equal);
                rs2 = check_types(sql, ct, rs2, type_equal);
+               if (!rs1 || !rs2)
+                       return NULL;
                if (symmetric) {
                        stmt *tmp = NULL;
                        sql_subfunc *min = sql_bind_func(sql->session->schema, 
"min", tail_type(rs1), tail_type(rs2));
@@ -3649,7 +3651,11 @@
 static stmt *
 find_order(stmt *s)
 {
-       assert(s->type == st_order || s->type == st_reorder);
+       if (s->type == st_limit) 
+               assert(s->op1.stval->type == st_order || s->op1.stval->type == 
st_reorder);
+       else
+               assert(s->type == st_order || s->type == st_reorder);
+               
        while(s->type == st_reorder)
                s = s->op1.stval;
        return s;


-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins

Reply via email to