Changeset: ba0b3fc59e98 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/ba0b3fc59e98
Modified Files:
        MonetDB.spec
        sql/backends/monet5/sql_statement.c
        sql/backends/monet5/sql_upgrades.c
        sql/server/rel_dump.c
        sql/server/rel_exp.c
        sql/server/rel_unnest.c
Branch: default
Log Message:

Merge with Dec2025 branch.


diffs (truncated from 3698 to 300 lines):

diff --git a/MonetDB.spec b/MonetDB.spec
--- a/MonetDB.spec
+++ b/MonetDB.spec
@@ -1017,7 +1017,6 @@ install -d -m 0775 "${RPM_BUILD_ROOT}"%{
 install -d -m 0775 "${RPM_BUILD_ROOT}"%{_rundir}/monetdb
 
 # remove unwanted stuff
-rm -f "${RPM_BUILD_ROOT}"%{_libdir}/monetdb5*/lib_opt_sql_append.so
 rm -f "${RPM_BUILD_ROOT}"%{_libdir}/monetdb5*/lib_microbenchmark*.so
 rm -f "${RPM_BUILD_ROOT}"%{_libdir}/monetdb5*/lib_udf*.so
 rm -f "${RPM_BUILD_ROOT}"%{_bindir}/monetdb_mtest.sh
diff --git a/NT/mksqlwxs.py b/NT/mksqlwxs.py
--- a/NT/mksqlwxs.py
+++ b/NT/mksqlwxs.py
@@ -207,9 +207,9 @@ def main():
     print(r'            <Directory Id="lib" Name="lib">')
     print(r'              <Directory Id="monetdb5" Name="monetdb5">')
     id = comp(features, id, 16,
-              [rf'lib\monetdb5-{version}\{x}' for x in sorted(filter(lambda x: 
x.startswith('_') and x.endswith('.dll') and ('geom' not in x) and ('pyapi' not 
in x) and ('opt_sql_append' not in x) and ('microbenchmark' not in x) and 
('udf' not in x), os.listdir(os.path.join(sys.argv[3], 'lib', 
f'monetdb5-{version}'))))])
+              [rf'lib\monetdb5-{version}\{x}' for x in sorted(filter(lambda x: 
x.startswith('_') and x.endswith('.dll') and ('geom' not in x) and ('pyapi' not 
in x) and ('microbenchmark' not in x) and ('udf' not in x), 
os.listdir(os.path.join(sys.argv[3], 'lib', f'monetdb5-{version}'))))])
     id = comp(debug, id, 16,
-              [rf'lib\monetdb5-{version}\{x}' for x in sorted(filter(lambda x: 
x.startswith('_') and x.endswith('.pdb') and ('geom' not in x) and 
('opt_sql_append' not in x) and ('microbenchmark' not in x) and ('udf' not in 
x), os.listdir(os.path.join(sys.argv[3], 'lib', f'monetdb5-{version}'))))])
+              [rf'lib\monetdb5-{version}\{x}' for x in sorted(filter(lambda x: 
x.startswith('_') and x.endswith('.pdb') and ('geom' not in x) and 
('microbenchmark' not in x) and ('udf' not in x), 
os.listdir(os.path.join(sys.argv[3], 'lib', f'monetdb5-{version}'))))])
     id = comp(geom, id, 16,
               [rf'lib\monetdb5-{version}\{x}' for x in sorted(filter(lambda x: 
x.startswith('_') and (x.endswith('.dll') or x.endswith('.pdb')) and ('geom' in 
x), os.listdir(os.path.join(sys.argv[3], 'lib', f'monetdb5-{version}'))))])
     id = comp(pyapi3, id, 16,
diff --git a/buildtools/coverity_model.c b/buildtools/coverity_model.c
--- a/buildtools/coverity_model.c
+++ b/buildtools/coverity_model.c
@@ -17,9 +17,7 @@
  * during any analysis they do on our code.
  *
  * We model our use of the various allocation functions.
- * Things we want to do is model that GDKmalloc and friends are paired
- * with GDKfree, and that exceptions created by createException and
- * createMalException should be freed with freeException.
+ * For now, we model that GDKmalloc and friends are paired with GDKfree.
  *
  * author: Sjoerd Mullender
  */
@@ -145,69 +143,3 @@ GDKmremap(const char *path, int mode, vo
        }
        return p;
 }
-
-typedef struct {} *MalBlkPtr;
-enum malexception {
-       MAL,
-       ILLARG /*,
-       OUTOFBNDS,
-       IO,
-       INVCRED,
-       OPTIMIZER,
-       STKOF,
-       SYNTAX,
-       TYPE,
-       LOADER,
-       PARSE,
-       ARITH,
-       PERMD,
-       SQL */
-};
-
-char *
-createException(enum malexception type, const char *fcn, const char *format, 
...)
-{
-       char *p;
-       __coverity_format_string_sink__(format);
-       p = __coverity_alloc_nosize__();
-       __coverity_mark_as_afm_allocated__(p, "freeException");
-       return p;
-}
-
-char *
-createMalException(MalBlkPtr mb, int pc, enum malexception type, const char 
*format, ...)
-{
-       char *p;
-       __coverity_format_string_sink__(format);
-       p = __coverity_alloc_nosize__();
-       __coverity_mark_as_afm_allocated__(p, "freeException");
-       return p;
-}
-
-char *
-dupError(const char *err)
-{
-       char *p;
-       p = __coverity_alloc_nosize__();
-       __coverity_mark_as_afm_allocated__(p, "freeException");
-       return p;
-}
-
-void
-freeException(char *p)
-{
-       if (p) {
-               __coverity_free__(p);
-               __coverity_mark_as_afm_freed__(p, "freeException");
-       }
-}
-
-char *
-concatErrors(char *err1, const char *err2)
-{
-       char *p;
-       freeException(err1);
-       p = __coverity_alloc_nosize__();
-       __coverity_mark_as_afm_allocated__(p, "freeException");
-       return p;
-}
diff --git a/clients/Tests/MAL-signatures-hge.test 
b/clients/Tests/MAL-signatures-hge.test
--- a/clients/Tests/MAL-signatures-hge.test
+++ b/clients/Tests/MAL-signatures-hge.test
@@ -30924,6 +30924,16 @@ command batcalc.timestamptz(X_0:bat[:str
 batstr_2time_timestamptz
 cast to timestamp and check for overflow
 batcalc
+to_hex
+command batcalc.to_hex(X_0:bat[:int]):bat[:str]
+CALCbat_to_hex_int
+convert to unsigned hexadecimal number representation
+batcalc
+to_hex
+command batcalc.to_hex(X_0:bat[:lng]):bat[:str]
+CALCbat_to_hex_lng
+convert to unsigned hexadecimal number representation
+batcalc
 uuid
 command batcalc.uuid(X_0:bat[:str], X_1:bat[:oid]):bat[:uuid]
 UUIDstr2uuid_bulk
diff --git a/clients/Tests/MAL-signatures.test 
b/clients/Tests/MAL-signatures.test
--- a/clients/Tests/MAL-signatures.test
+++ b/clients/Tests/MAL-signatures.test
@@ -22159,6 +22159,16 @@ command batcalc.timestamptz(X_0:bat[:str
 batstr_2time_timestamptz
 cast to timestamp and check for overflow
 batcalc
+to_hex
+command batcalc.to_hex(X_0:bat[:int]):bat[:str]
+CALCbat_to_hex_int
+convert to unsigned hexadecimal number representation
+batcalc
+to_hex
+command batcalc.to_hex(X_0:bat[:lng]):bat[:str]
+CALCbat_to_hex_lng
+convert to unsigned hexadecimal number representation
+batcalc
 uuid
 command batcalc.uuid(X_0:bat[:str], X_1:bat[:oid]):bat[:uuid]
 UUIDstr2uuid_bulk
diff --git a/clients/Tests/exports.stable.out b/clients/Tests/exports.stable.out
--- a/clients/Tests/exports.stable.out
+++ b/clients/Tests/exports.stable.out
@@ -379,7 +379,6 @@ int MT_join_thread(MT_Id t);
 bool MT_path_absolute(const char *path);
 void MT_sleep_ms(unsigned int ms);
 void MT_thread_deregister(void);
-char *MT_thread_get_exceptbuf(void);
 QryCtx *MT_thread_get_qry_ctx(void);
 const char *MT_thread_getalgorithm(void);
 allocator *MT_thread_getallocator(void);
@@ -838,7 +837,6 @@ const char alter_set_tableRef[];
 const char alter_tableRef[];
 const char alter_userRef[];
 const char appendBulkRef[];
-str appendException(enum malexception, const char *, _In_z_ 
_Printf_format_string_ const char *, ...) __attribute__((__malloc__)) 
__attribute__((__format__(__printf__, 3, 4))) 
__attribute__((__returns_nonnull__));
 const char appendRef[];
 const char assertRef[];
 const char avgRef[];
@@ -885,7 +883,7 @@ void clrInstruction(InstrPtr p);
 const char columnBindRef[];
 const char comment_onRef[];
 const char compressRef[];
-char *concatErrors(const char *err1, const char *err2) 
__attribute__((__nonnull__(1, 2))) __attribute__((__returns_nonnull__));
+char *concatErrors(char *err1, const char *err2) __attribute__((__nonnull__(1, 
2))) __attribute__((__returns_nonnull__));
 const char connectRef[];
 const char containsRef[];
 str convertConstant(allocator *ma, malType type, ValPtr vr);
@@ -897,8 +895,8 @@ const char corrRef[];
 const char countRef[];
 const char count_no_nilRef[];
 int cpyConstant(MalBlkPtr mb, VarPtr vr);
-str createException(enum malexception, const char *, _In_z_ 
_Printf_format_string_ const char *, ...) __attribute__((__malloc__)) 
__attribute__((__malloc__(freeException, 1))) 
__attribute__((__format__(__printf__, 3, 4))) 
__attribute__((__returns_nonnull__));
-str createMalException(MalBlkPtr, int, enum malexception, _In_z_ 
_Printf_format_string_ const char *, ...) __attribute__((__malloc__)) 
__attribute__((__malloc__(freeException, 1))) 
__attribute__((__format__(__printf__, 4, 5))) 
__attribute__((__returns_nonnull__));
+str createException(enum malexception, const char *, _In_z_ 
_Printf_format_string_ const char *, ...) __attribute__((__malloc__)) 
__attribute__((__format__(__printf__, 3, 4))) 
__attribute__((__returns_nonnull__));
+str createMalException(MalBlkPtr, int, enum malexception, _In_z_ 
_Printf_format_string_ const char *, ...) __attribute__((__malloc__)) 
__attribute__((__format__(__printf__, 4, 5))) 
__attribute__((__returns_nonnull__));
 const char create_functionRef[];
 const char create_roleRef[];
 const char create_schemaRef[];
@@ -967,7 +965,6 @@ const char firstnRef[];
 Module fixModule(const char *nme);
 int fndConstant(MalBlkPtr mb, const ValRecord *cst, int depth);
 const char forRef[];
-void freeException(str);
 void freeInstruction(MalBlkPtr mb, InstrPtr p);
 void freeMalBlk(MalBlkPtr mb);
 void freeModule(Module cur);
diff --git a/clients/examples/C/bincopydata.c b/clients/examples/C/bincopydata.c
--- a/clients/examples/C/bincopydata.c
+++ b/clients/examples/C/bincopydata.c
@@ -276,6 +276,55 @@ gen_json(FILE *f, bool byteswap, long nr
        }
 }
 
+static void
+gen_inet4(FILE *f, bool byteswap, long nrecs, char *arg)
+{
+       (void)arg;
+       (void)byteswap;
+       for (uint64_t v = 0; v < (uint64_t) nrecs; v++) {
+               uint64_t i = (v == 3) ? 0x00000000 : (v + 1) * 1001001001;
+               // always big endian
+               fputc((i >> 24) % 256, f);
+               fputc((i >> 16) % 256, f);
+               fputc((i >>  8) % 256, f);
+               fputc(i         % 256, f);
+       }
+}
+
+static void
+gen_inet6(FILE *f, bool byteswap, long nrecs, char *arg)
+{
+       (void)arg;
+       (void)byteswap;
+       for (uint64_t v = 0; v < (uint64_t) nrecs; v++) {
+               uint64_t i0 = (v + 1) * 2142970729L;
+               uint64_t i1 = (v + 1) * 2011938419L;
+               uint64_t i2 = (v + 1) * 1616437157L;
+               uint64_t i3 = (v + 1) * 1271098355L;
+               uint8_t rec[16] = {
+                       (uint8_t)(i0 >> 24),
+                       (uint8_t)(i0 >> 16),
+                       (uint8_t)(i0 >> 8),
+                       (uint8_t)(i0),
+                       (uint8_t)(i1 >> 24),
+                       (uint8_t)(i1 >> 16),
+                       (uint8_t)(i1 >> 8),
+                       (uint8_t)(i1),
+                       (uint8_t)(i2 >> 24),
+                       (uint8_t)(i2 >> 16),
+                       (uint8_t)(i2 >> 8),
+                       (uint8_t)(i2),
+                       (uint8_t)(i3 >> 24),
+                       (uint8_t)(i3 >> 16),
+                       (uint8_t)(i3 >> 8),
+                       (uint8_t)(i3),
+               };
+               if (v == 3)
+                       memset(rec, 0, sizeof(rec));
+               fwrite(rec, 16, 1, f);
+       }
+}
+
 #define FUNCNAME gen_decimal_tinyints
 #define STYP int8_t
 #define UTYP uint8_t
@@ -355,6 +404,9 @@ static struct gen {
        { "timestamp_months", gen_timestamp_months },
        { "timestamp_years", gen_timestamp_years },
 
+       { "inet4", gen_inet4 },
+       { "inet6", gen_inet6 },
+
        { "json_objects", gen_json },
 
        { "binary_uuids", gen_bin_uuids },
diff --git a/ctest/monetdb5/mal/test_malEmbeddedBoot.c 
b/ctest/monetdb5/mal/test_malEmbeddedBoot.c
--- a/ctest/monetdb5/mal/test_malEmbeddedBoot.c
+++ b/ctest/monetdb5/mal/test_malEmbeddedBoot.c
@@ -22,16 +22,18 @@ main(void)
 
        if (BBPaddfarm(NULL, (1U << PERSISTENT) | (1U << TRANSIENT), false) != 
GDK_SUCCEED) {
                /* set in memory dbfarm */
-               createException(MAL, "embedded.monetdb_startup", "BBPaddfarm() 
failed");
+               fprintf(stderr, "BBPaddfarm() failed\n");
                return 1;
        }
 
     gdk_res = GDKinit(NULL, 0, true, NULL);
     if (gdk_res != GDK_SUCCEED) {
-               msg = createException(MAL, "embedded.monetdb_startup", 
"GDKinit() failed");
+               fprintf(stderr, "GDKinit() failed\n");
                return 1;
     }
-    if ((msg = malEmbeddedBoot(0, 0, 0, 0, false)) != MAL_SUCCEED)
+    if ((msg = malEmbeddedBoot(0, 0, 0, 0, false)) != MAL_SUCCEED) {
+               fprintf(stderr, "%s\n", msg);
                return 1;
+       }
     return 0;
 }
diff --git a/ctest/monetdb5/mal/test_malInclude.c 
b/ctest/monetdb5/mal/test_malInclude.c
--- a/ctest/monetdb5/mal/test_malInclude.c
+++ b/ctest/monetdb5/mal/test_malInclude.c
@@ -22,13 +22,13 @@ main(void)
 
        if (BBPaddfarm(NULL, (1U << PERSISTENT) | (1U << TRANSIENT), false) != 
GDK_SUCCEED) {
                /* set in memory dbfarm */
-               createException(MAL, "embedded.monetdb_startup", "BBPaddfarm() 
failed");
+               fprintf(stderr, "BBPaddfarm() failed\n");
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to