Update of /cvsroot/monetdb/sql/src/server
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv20364/src/server
Modified Files:
Tag: Aug2009
rel_bin.mx sql_schema.mx
Log Message:
approved output
disallow explain with alter
made sure we allways group by on bats
(fixes bug 2837561)
U rel_bin.mx
Index: rel_bin.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/server/rel_bin.mx,v
retrieving revision 1.87.2.1
retrieving revision 1.87.2.2
diff -u -d -r1.87.2.1 -r1.87.2.2
--- rel_bin.mx 3 Aug 2009 18:25:23 -0000 1.87.2.1
+++ rel_bin.mx 16 Aug 2009 14:22:25 -0000 1.87.2.2
@@ -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;
U sql_schema.mx
Index: sql_schema.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/server/sql_schema.mx,v
retrieving revision 1.177.2.1
retrieving revision 1.177.2.2
diff -u -d -r1.177.2.1 -r1.177.2.2
--- sql_schema.mx 12 Aug 2009 11:25:35 -0000 1.177.2.1
+++ sql_schema.mx 16 Aug 2009 14:22:25 -0000 1.177.2.2
@@ -2008,7 +2008,7 @@
stmt *ret = NULL;
/* TODO everything should be done via the backend language */
- if (!QUERY_MODE(sql->emode) && s->token != SQL_ALTER_TABLE)
+ if (!QUERY_MODE(sql->emode))
return sql_error(sql, 05, "schema statements are directly
executed "
"and therefore cannot be debugged, explained,
profiled, "
"traced or used in a prepared statement");
------------------------------------------------------------------------------
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