Changeset: c4c0d08b25e1 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/c4c0d08b25e1
Modified Files:
        MonetDB.spec
Branch: default
Log Message:

Merge with Dec2025 branch.


diffs (201 lines):

diff --git a/ChangeLog-Archive b/ChangeLog-Archive
--- a/ChangeLog-Archive
+++ b/ChangeLog-Archive
@@ -3,13 +3,11 @@
 
 * Tue Dec 16 2025 svetlin <[email protected]> - 
11.55.1-20251209
 - Extended MonetDB’s memory allocator framework from the SQL layer to all
-  layers of the database server. The new memory allocator replaces all
-  malloc() and free() function calls in the MonetDB (server) code base.
-  The main features of the allocator framework include i) efficient
-  processing of large numbers of memory allocation calls, and ii) efficient
-  management of memory to avoid fragmentation. This update also enables
-  fine-grained configuration and monitoring of memory usage per thread,
-  per query, per client, etc.
+  layers of the database server.  The main features of the allocator framework
+  include i) efficient processing of large numbers of memory allocation calls,
+  and ii) efficient management of memory to avoid fragmentation. This update
+  also enables fine-grained configuration and monitoring of memory usage per
+  thread, query, etc.
 
 * Tue Sep 16 2025 Sjoerd Mullender <[email protected]> - 11.55.1-20251209
 - This server is no longer compatible with the MonetDB Stethoscope.
diff --git a/MonetDB.spec b/MonetDB.spec
--- a/MonetDB.spec
+++ b/MonetDB.spec
@@ -1064,13 +1064,11 @@ rm "${RPM_BUILD_ROOT}"%{_unitdir}/monetd
 
 * Tue Dec 16 2025 svetlin <[email protected]> - 
11.55.1-20251209
 - Extended MonetDB’s memory allocator framework from the SQL layer to all
-  layers of the database server. The new memory allocator replaces all
-  malloc() and free() function calls in the MonetDB (server) code base.
-  The main features of the allocator framework include i) efficient
-  processing of large numbers of memory allocation calls, and ii) efficient
-  management of memory to avoid fragmentation. This update also enables
-  fine-grained configuration and monitoring of memory usage per thread,
-  per query, per client, etc.
+  layers of the database server.  The main features of the allocator framework
+  include i) efficient processing of large numbers of memory allocation calls,
+  and ii) efficient management of memory to avoid fragmentation. This update
+  also enables fine-grained configuration and monitoring of memory usage per
+  thread, query, etc.
 
 * Tue Dec 09 2025 Sjoerd Mullender <[email protected]> - 11.55.1-20251209
 - Rebuilt.
diff --git a/clients/mapiclient/dump.c b/clients/mapiclient/dump.c
--- a/clients/mapiclient/dump.c
+++ b/clients/mapiclient/dump.c
@@ -2807,8 +2807,8 @@ dump_database(Mapi mid, stream *sqlf, co
                           "t.name AS name, "
                           "t.type AS type "
                "FROM sys.schemas s, "
-                         "sys._tables t "
-               "WHERE t.type IN (0, 3, 4, 5, 6) "
+                       "sys._tables t "
+               "WHERE t.type IN (0, 3, 4, 5, 6, 7) "
                  "AND t.system = FALSE "
                  "AND s.id = t.schema_id "
                "ORDER BY id";
diff --git a/debian/changelog b/debian/changelog
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,13 +7,11 @@ monetdb (11.55.1) unstable; urgency=low
  -- Lucas Pereira <[email protected]>  Tue, 16 Dec 2025 
17:00:00 +0100
 
   * Extended MonetDB’s memory allocator framework from the SQL layer to all
-    layers of the database server. The new memory allocator replaces all
-    malloc() and free() function calls in the MonetDB (server) code base.
-    The main features of the allocator framework include i) efficient
-    processing of large numbers of memory allocation calls, and ii) efficient
-    management of memory to avoid fragmentation. This update also enables
-    fine-grained configuration and monitoring of memory usage per thread,
-    per query, per client, etc.
+    layers of the database server.  The main features of the allocator
+    framework include i) efficient processing of large numbers of memory
+    allocation calls, and ii) efficient management of memory to avoid
+    fragmentation. This update also enables fine-grained configuration and
+    monitoring of memory usage per thread, query, etc.
 
  -- svetlin <[email protected]>  Tue, 16 Dec 2025 17:00:00 
+0100
 
diff --git a/gdk/gdk_join.c b/gdk/gdk_join.c
--- a/gdk/gdk_join.c
+++ b/gdk/gdk_join.c
@@ -3171,8 +3171,6 @@ hashjoin(BAT **r1p, BAT **r2p, BAT **r3p
                                                        break;
                                                }
                                                HASHLOOPBODY();
-                                               if (semi)
-                                                       break;
                                        }
                                }
                        } else if (rci->tpe != cand_dense) {
diff --git a/monetdb5/optimizer/opt_commonTerms.c 
b/monetdb5/optimizer/opt_commonTerms.c
--- a/monetdb5/optimizer/opt_commonTerms.c
+++ b/monetdb5/optimizer/opt_commonTerms.c
@@ -27,13 +27,6 @@
 */
 
 __attribute__((__pure__))
-static inline bool
-isProjectConst(const InstrRecord *p)
-{
-       return (getModuleId(p) == algebraRef && getFunctionId(p) == projectRef);
-}
-
-__attribute__((__pure__))
 static int
 hashInstruction(const MalBlkRecord *mb, const InstrRecord *p)
 {
@@ -67,6 +60,11 @@ OPTcommonTermsImplementation(Client ctx,
        if (isSimpleSQL(mb) || MB_LARGE(mb)) {
                goto wrapup1;
        }
+       for (i = 0; i < mb->stop; i++) {
+               p = mb->stmt[i];
+               if (getFunctionId(p) == replaceRef)
+                       goto wrapup1;
+       }
 
        (void) stk;
        allocator_state ta_state = ma_open(ta);
@@ -193,8 +191,7 @@ OPTcommonTermsImplementation(Client ctx,
                                        && !hasCommonResults(p, q)
                                        && !isUnsafeFunction(q)
                                        && !isUpdateInstruction(q)
-                                       && !isProjectConst(q) &&        /* 
disable project(x,val), as its used for the result of case statements */
-                                       isLinearFlow(q)) {
+                                       && isLinearFlow(q)) {
                                        if (safetyBarrier(p, q)) {
                                                TRC_DEBUG(MAL_OPTIMIZER, 
"Safety barrier reached\n");
                                                break;
diff --git a/sql/backends/monet5/rel_bin.c b/sql/backends/monet5/rel_bin.c
--- a/sql/backends/monet5/rel_bin.c
+++ b/sql/backends/monet5/rel_bin.c
@@ -1996,7 +1996,7 @@ exp_bin(backend *be, sql_exp *e, stmt *l
                        return s;
                }
                if (e->flag == cmp_in || e->flag == cmp_notin)
-                       return handle_in_exps(be, e->l, e->r, left, right, grp, 
ext, cnt, sel, (e->flag == cmp_in), depth, reduce, push);
+                       return handle_in_exps(be, e->l, e->r, left, right, grp, 
ext, cnt, sel, (e->flag == cmp_in)^is_anti(e), depth, reduce, push);
                if (e->flag == cmp_con)
                        return exp_bin_conjunctive(be, e, left, right, grp, 
ext, cnt, sel, depth, reduce, push);
                if (e->flag == cmp_dis)
diff --git a/sql/test/BugTracker-2025/Tests/7726-commonterms.test 
b/sql/test/BugTracker-2025/Tests/7726-commonterms.test
new file mode 100644
--- /dev/null
+++ b/sql/test/BugTracker-2025/Tests/7726-commonterms.test
@@ -0,0 +1,3 @@
+
+statement error
+SELECT ( WITH x AS ( SELECT * FROM generate_series ( 32989 , 8100 ) EXCEPT 
SELECT * FROM generate_series ( 44 , 3 ) ) SELECT DISTINCT ( WITH x AS ( SELECT 
* FROM generate_series ( 32989 , 8100 ) EXCEPT SELECT * FROM generate_series ( 
44 , 3 ) ) SELECT CASE WHEN NULL IN ( 69 , MAX ( CASE WHEN 97 THEN 66 END ) 
OVER ( ) + ( SELECT COUNT ( * ) ) ) THEN 41 WHEN 1 THEN 1 END FROM x ) FROM x ) 
diff --git a/sql/test/BugTracker-2025/Tests/7768-not-in.test 
b/sql/test/BugTracker-2025/Tests/7768-not-in.test
new file mode 100644
--- /dev/null
+++ b/sql/test/BugTracker-2025/Tests/7768-not-in.test
@@ -0,0 +1,29 @@
+statement ok
+create table test (test_col varchar(1))
+
+statement ok rowcount 4
+insert into test values('a'),('b'),('c'),('d');
+
+query T
+select * from test where not (test_col in ('a','b'))
+----
+c
+d
+
+query T
+select * from test where (1 = 1) and not (test_col in ('a','b'))
+----
+c
+d
+
+query T
+select * from test where (1 <> 1) or not (test_col in ('a','b'))
+----
+c
+d
+
+query T
+select * from test where (1 <> 1) or (not (test_col in ('a','b')));
+----
+c
+d
diff --git a/sql/test/BugTracker-2025/Tests/All 
b/sql/test/BugTracker-2025/Tests/All
--- a/sql/test/BugTracker-2025/Tests/All
+++ b/sql/test/BugTracker-2025/Tests/All
@@ -67,6 +67,7 @@ 7719-crash-in-complex-query
 7720-coalesce
 7722-recusive-cte-with-error-crash
 7725-crash-find-rel-ref
+7726-commonterms
 7730-generate-series-month-int
 7732-table-exp-issue
 7734-epoch-missing-cast
@@ -84,3 +85,4 @@ 7756-anti-join-null
 7759-replace-wrong-error
 7763-exits-with-null
 7760-groupby_posarg_CP
+7768-not-in
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to