Update of /cvsroot/monetdb/sql/src/server
In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv21478/src/server
Modified Files:
rel_schema.mx
Log Message:
propagated changes of Friday Feb 05 2010 - Sunday Feb 07 2010
from the Feb2010 branch to the development trunk
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2010/02/05 - nielsnes: src/server/rel_schema.mx,1.2.2.1
fixed bug in handeling topn in create table as select with data.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Index: rel_schema.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/server/rel_schema.mx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- rel_schema.mx 11 Jan 2010 10:29:17 -0000 1.2
+++ rel_schema.mx 7 Feb 2010 17:22:09 -0000 1.3
@@ -127,9 +127,14 @@
static char *
as_subquery( mvc *sql, sql_table *t, sql_rel *sq, dlist *column_spec )
{
+ sql_rel *r = sq;
+
+ if (is_topn(r->op))
+ r = sq->l;
+
if (column_spec) {
dnode *n = column_spec->h;
- node *m = sq->exps->h;
+ node *m = r->exps->h;
for (; n; n = n->next, m = m->next) {
char *cname = n->data.sval;
@@ -143,7 +148,7 @@
} else {
node *m;
- for (m = sq->exps->h; m; m = m->next) {
+ for (m = r->exps->h; m; m = m->next) {
sql_exp *e = m->data;
char *cname = exp_name(e);
sql_subtype *tp = exp_subtype(e);
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins