Changeset: 35f46bda076a for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/35f46bda076a
Added Files:
sql/test/BugTracker-2024/Tests/7539-is-distinct-from.test
Modified Files:
sql/server/rel_select.c
sql/test/BugTracker-2024/Tests/All
Branch: Aug2024
Log Message:
fixed issue #7539, ie properly test on results of left and right relations.
diffs (41 lines):
diff --git a/sql/server/rel_select.c b/sql/server/rel_select.c
--- a/sql/server/rel_select.c
+++ b/sql/server/rel_select.c
@@ -2863,6 +2863,8 @@ rel_logical_exp(sql_query *query, sql_re
if (ls_is_non_null_atom || rs_is_non_null_atom) {
sql_rel *r = rel_dup(rel);
sql_rel* l = rel_compare(query, rel, sc, lo,
ro, compare_op, f | sql_or, ek, quantifier, 0);
+ if (!l)
+ return NULL;
sql_subtype *t;
if (!(t =
exp_subtype(rs_is_non_null_atom?ls:rs)))
return sql_error(sql, 01,
SQLSTATE(42000) "Cannot have a parameter for IS NULL operator");
@@ -2871,7 +2873,8 @@ rel_logical_exp(sql_query *query, sql_re
set_semantics(e);
r = rel_select_push_compare_exp_down(sql, r, e,
e->l, e->r, NULL, f | sql_or);
-
+ if (!r)
+ return NULL;
return rel_or(sql, rel, l, r, NULL, NULL, NULL);
}
}
diff --git a/sql/test/BugTracker-2024/Tests/7539-is-distinct-from.test
b/sql/test/BugTracker-2024/Tests/7539-is-distinct-from.test
new file mode 100644
--- /dev/null
+++ b/sql/test/BugTracker-2024/Tests/7539-is-distinct-from.test
@@ -0,0 +1,6 @@
+
+statement ok
+CREATE TABLE t0 (c0 INT)
+
+statement error
+SELECT * FROM t0 WHERE (SIN(1) IS DISTINCT FROM NOT 1)
diff --git a/sql/test/BugTracker-2024/Tests/All
b/sql/test/BugTracker-2024/Tests/All
--- a/sql/test/BugTracker-2024/Tests/All
+++ b/sql/test/BugTracker-2024/Tests/All
@@ -65,3 +65,4 @@ 7534-is-distinct-from
7535-create-view-groupby-func
7536-mclient-forgets-to-flush
7538-reduce-cast
+7539-is-distinct-from
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]