Update of /cvsroot/monetdb/sql/src/server
In directory sc8-pr-cvs16:/tmp/cvs-serv24526/src/server
Modified Files:
sql_schema.mx sql_select.mx
Log Message:
handle order by in create table with data correctly
Index: sql_select.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/server/sql_select.mx,v
retrieving revision 1.186
retrieving revision 1.187
diff -u -d -r1.186 -r1.187
--- sql_select.mx 8 May 2007 12:22:21 -0000 1.186
+++ sql_select.mx 10 May 2007 08:22:29 -0000 1.187
@@ -308,9 +308,7 @@
exp_kind ek = {type_value, card_relation, TRUE};
stmt *s = sql_subquery(sql, scp, sq, ek);
-
scp = scope_close(scp);
-
if (s && s->type == st_ordered) {
list *l = create_stmt_list();
node *n;
Index: sql_schema.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/server/sql_schema.mx,v
retrieving revision 1.128
retrieving revision 1.129
diff -u -d -r1.128 -r1.129
--- sql_schema.mx 9 May 2007 22:18:40 -0000 1.128
+++ sql_schema.mx 10 May 2007 08:22:28 -0000 1.129
@@ -1612,7 +1612,6 @@
}
return list2stmt(new_columns);
} else { /* [col name list] as subquery with or without data */
- exp_kind ek = {type_value, card_relation, TRUE};
stmt *sq = NULL, *res = NULL;
dlist *as_sq = table_elements_or_subquery->data.lval;
dlist *column_spec = as_sq->h->data.lval;
@@ -1620,14 +1619,7 @@
int with_data = as_sq->h->next->next->data.ival;
sql_table *t = NULL;
- sq = scope_subtable(sql, NULL, subquery, ek);
- /* make sure we get a list of ordered columns */
- if (sq && sq->type == st_ordered) {
- stmt *order = stmt_dup(sq->op1.stval);
- stmt *s = stmt_dup(sq->op2.stval);
- stmt_destroy(sq);
- sq = sql_reorder(order, s);
- }
+ sq = flat_subquery(sql, subquery);
if (!sq)
return NULL;
@@ -1823,8 +1815,10 @@
stmt *ret = NULL;
/* TODO everything should be done via the backend language */
+/*
if (!QUERY_MODE(sql->mode))
return sql_error(sql, 05, "Schema statements are directly
executed and therefor cannot be debugged, explained, profiled, traced or used
in a prepare statement");
+*/
switch (s->token) {
case SQL_CREATE_SCHEMA:
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins