Changeset: 1fd669908c6f for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/1fd669908c6f
Modified Files:
        sql/server/rel_select.c
Branch: Dec2023
Log Message:

don't add the current expression to the inner query, for unbound variables.


diffs (19 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
@@ -4816,11 +4816,13 @@ rel_order_by(sql_query *query, sql_rel *
                                        if (!found) {
                                                if (needs_distinct)
                                                        return sql_error(sql, 
02, SQLSTATE(42000) "SELECT: with DISTINCT ORDER BY expressions must appear in 
select list");
-                                               append(rel->exps, e);
+                                               if (!is_freevar(e))
+                                                       append(rel->exps, e);
                                        } else {
                                                e = found;
                                        }
-                                       e = exp_ref(sql, e);
+                                       if (!is_freevar(e))
+                                               e = exp_ref(sql, e);
                                }
                        }
 
_______________________________________________
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org

Reply via email to