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

Modified Files:
      Tag: May2009
        rel_select.mx 
Log Message:

"selection" might be NULL in this case;
hence, we postpone dereferencing it
until we are sure it is not NULL.

NOTE:
this and Niels' previous checkin might (will)
conflict with
"
2009/07/25 - nielsnes: sql/src/server/rel_select.mx,1.148
added support for 'create cluster name on tname ( column list )'
which caused lots of changes all over the place.

also fixed (moved code out of sql -> mkey)
moved finally copy into over to a function and into relational alg.
"
during propagation;

in fact, the above mentioned checkin on the development trunk
might (does?) subsume these two checkin on the May2009 branch
(needs to be verified!)


Index: rel_select.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/server/rel_select.mx,v
retrieving revision 1.143.2.5
retrieving revision 1.143.2.6
diff -u -d -r1.143.2.5 -r1.143.2.6
--- rel_select.mx       31 Jul 2009 06:21:10 -0000      1.143.2.5
+++ rel_select.mx       31 Jul 2009 06:58:13 -0000      1.143.2.6
@@ -4046,9 +4046,9 @@
 static sql_rel *
 rel_simple_select(mvc *sql, sql_rel *rel, symbol *where, dlist *selection, int 
distinct)
 {
-       dnode *n = selection->h;
+       dnode *n = 0;
 
-       if (!selection)
+       if (!selection || !selection->h)
                return sql_error(sql, 02, "SELECT: the selection or from part 
is missing");
        if (where) {
                sql_rel *r = rel_logical_exp(sql, rel, where, sql_where);
@@ -4058,7 +4058,7 @@
        }
        if (!rel || rel->op != op_project)
                rel = rel_project(rel, new_exp_list());
-       for (; n; n = n->next ) {
+       for (n = selection->h; n; n = n->next ) {
                /* Here we could get real column expressions (including single
                 * atoms) but also table results. Therefor we try both
                 * rel_column_exp and rel_table_exp.


------------------------------------------------------------------------------
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