Changeset: 7f4807f12d12 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7f4807f12d12
Modified Files:
sql/server/sql_semantic.c
Branch: default
Log Message:
A two level SQL_COLUMN reference requires handling as well in expressions.
diffs (29 lines):
diff --git a/sql/server/sql_semantic.c b/sql/server/sql_semantic.c
--- a/sql/server/sql_semantic.c
+++ b/sql/server/sql_semantic.c
@@ -391,6 +391,25 @@ char *symbol2string(mvc *sql, symbol *se
} else if (expression && dlist_length(l) == 1 && l->h->type ==
type_string) {
/* when compiling an expression, a column of a table
might be present in the symbol, so we need this case */
return _STRDUP(l->h->data.sval);
+ } else if (expression && dlist_length(l) == 2 && l->h->type ==
type_string && l->h->next->type == type_string) {
+ char *first = _STRDUP(l->h->data.sval);
+ char *second = _STRDUP(l->h->next->data.sval);
+ char *res;
+
+ if(!first || !second) {
+ _DELETE(first);
+ _DELETE(second);
+ return NULL;
+ }
+ res = strconcat(first,".");
+ _DELETE(first);
+ if(!res) {
+ _DELETE(second);
+ return NULL;
+ }
+ res = strconcat(res,second);
+ _DELETE(second);
+ return res;
} else {
char *e = dlist2string(sql, l, expression, err);
if (e)
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list