Changeset: 2de3291f106b for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/2de3291f106b
Modified Files:
sql/server/rel_dump.c
Branch: Jul2021
Log Message:
Defensive line. After reading an identifier. Don't attempt to bind columns if
the next token is a list of parameters for a function call
diffs (34 lines):
diff --git a/sql/server/rel_dump.c b/sql/server/rel_dump.c
--- a/sql/server/rel_dump.c
+++ b/sql/server/rel_dump.c
@@ -966,17 +966,19 @@ exp_read(mvc *sql, sql_rel *lrel, sql_re
cname = sa_strdup(sql->sa, cname);
*e = old;
skipWS(r, pos);
- if (top_exps) {
- exp = exps_bind_column2(top_exps, tname, cname, NULL);
- if (exp)
- exp = exp_alias_or_copy(sql, tname, cname,
lrel, exp);
- }
- if (!exp && lrel) {
- exp = rel_bind_column2(sql, lrel, tname, cname, 0);
- if (!exp && rrel)
- exp = rel_bind_column2(sql, rrel, tname, cname,
0);
- } else if (!exp) {
- exp = exp_column(sql->sa, tname, cname, NULL,
CARD_ATOM, 1, cname[0] == '%');
+ if (r[*pos] != '(') { /* if there's a function/aggregate call
next don't attempt to bind columns */
+ if (top_exps) {
+ exp = exps_bind_column2(top_exps, tname, cname,
NULL);
+ if (exp)
+ exp = exp_alias_or_copy(sql, tname,
cname, lrel, exp);
+ }
+ if (!exp && lrel) {
+ exp = rel_bind_column2(sql, lrel, tname, cname,
0);
+ if (!exp && rrel)
+ exp = rel_bind_column2(sql, rrel,
tname, cname, 0);
+ } else if (!exp) {
+ exp = exp_column(sql->sa, tname, cname, NULL,
CARD_ATOM, 1, cname[0] == '%');
+ }
}
break;
/* atom */
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list