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

Modified Files:
        rel_bin.mx 
Log Message:
propagated changes of Sunday Aug 16 2009 - Monday Aug 17 2009
from the Aug2009 branch to the development trunk

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2009/08/16 - nielsnes: src/server/rel_bin.mx,1.87.2.2
approved output

disallow explain with alter

made sure we allways group by on bats
(fixes bug 2837561)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Index: rel_bin.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/server/rel_bin.mx,v
retrieving revision 1.88
retrieving revision 1.89
diff -u -d -r1.88 -r1.89
--- rel_bin.mx  4 Aug 2009 07:24:21 -0000       1.88
+++ rel_bin.mx  17 Aug 2009 10:54:06 -0000      1.89
@@ -1638,6 +1638,22 @@
                }
        }
 
+       if (sub && sub->type == st_list && sub->op1.lval->h && 
!((stmt*)sub->op1.lval->h->data)->nrcols) {
+               list *newl = create_stmt_list();
+               node *n;
+
+               for(n=sub->op1.lval->h; n; n = n->next) {
+                       char *cname = column_name(n->data);
+                       char *tname = table_name(n->data);
+                       stmt *s = column(stmt_dup(n->data));
+
+                       s = stmt_alias(s, tname, cname );
+                       append(newl, s);
+               }
+               stmt_destroy(sub);
+               sub = stmt_list(newl);
+       }
+
        /* groupby columns */
        if (rel->r) {
                list *exps = rel->r; 


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