Update of /cvsroot/monetdb/sql/src/server
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv29876/src/server
Modified Files:
Tag: SQL_2-22
rel_bin.mx sql_select.mx
Log Message:
fixed bug (handle atom in aggr expression())
1918780 Monet Server down with malformed sql statement
Index: rel_bin.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/server/rel_bin.mx,v
retrieving revision 1.33
retrieving revision 1.33.2.1
diff -u -d -r1.33 -r1.33.2.1
--- rel_bin.mx 29 Jan 2008 15:02:21 -0000 1.33
+++ rel_bin.mx 21 Mar 2008 08:04:23 -0000 1.33.2.1
@@ -177,6 +177,9 @@
}
if (!as)
return NULL;
+
+ if (as->nrcols <= 0 && left)
+ as = stmt_const(bin_first_column(left), as);
/* inconsistent sql requires NULL != NULL and NULL <> NULL, ie
unknown
* but also NULL means no values, which means 'ignore'
*
Index: sql_select.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/server/sql_select.mx,v
retrieving revision 1.219.2.8
retrieving revision 1.219.2.9
diff -u -d -r1.219.2.8 -r1.219.2.9
--- sql_select.mx 14 Mar 2008 17:08:18 -0000 1.219.2.8
+++ sql_select.mx 21 Mar 2008 08:04:23 -0000 1.219.2.9
@@ -1223,6 +1223,8 @@
/* the values which are aggregated together, no grp should
* be given there to optain the values */
s = sql_value_exp(sql, scp, l->h->next->next->data.sym, /*grp
*/ NULL, subset, f, ek);
+ if (s->nrcols <= 0 && subset) /* single value */
+ s = stmt_const(first_subset(subset), s);
}
if (s && distinct) {
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins