Changeset: 1d56796941a0 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/1d56796941a0
Modified Files:
sql/server/rel_exp.c
Branch: Jan2022
Log Message:
Keep error if that's the case and throw it if parameter is not found on the
other side of join
diffs (26 lines):
diff --git a/sql/server/rel_exp.c b/sql/server/rel_exp.c
--- a/sql/server/rel_exp.c
+++ b/sql/server/rel_exp.c
@@ -3286,11 +3286,18 @@ rel_find_parameter(mvc *sql, sql_subtype
if (rel->l)
res = rel_find_parameter(sql, type, rel->l,
nrname, nename);
if (rel->r && res <= 0) { /* try other relation if not
found */
- if (res < 0) { /* reset error */
- sql->session->status = 0;
- sql->errstr[0] = '\0';
+ int err = sql->session->status, lres = res;
+ char buf[ERRSIZE];
+
+ strcpy(buf, sql->errstr); /* keep error found
and try other join relation */
+ sql->session->status = 0;
+ sql->errstr[0] = '\0';
+ res = rel_find_parameter(sql, type, rel->r,
nrname, nename);
+ if (res == 0) { /* parameter wasn't found, set
error */
+ res = lres;
+ sql->session->status = err;
+ strcpy(sql->errstr, buf);
}
- res = rel_find_parameter(sql, type, rel->r,
nrname, nename);
}
break;
case op_semi:
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]