Changeset: 0f7a38ad3168 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/0f7a38ad3168
Modified Files:
        testing/Mtest.py.in
Branch: samloader
Log Message:

Merge with default branch.


diffs (truncated from 22165 to 300 lines):

diff --git a/.editorconfig b/.editorconfig
--- a/.editorconfig
+++ b/.editorconfig
@@ -7,11 +7,11 @@ insert_final_newline = true
 
 [*.{c,h,y}{,.in}]
 indent_style = tab
-tab_width = 4
+tab_width = 8
 indent_size = tab
 trim_trailing_whitespace = true
 charset = utf-8
-max_line_length = 120
+max_line_length = 72
 
 [*.py{,.in}]
 indent_style = space
@@ -24,9 +24,9 @@ indent_style = space
 indent_size = 2
 trim_trailing_whitespace = true
 
-[{clients/{mapi{lib,client},odbc},common/{options,utils},gdk}/**.{c,h}{,.in}]
-tab_width = 8
-max_line_length = 72
+[{monetdb5,sql}/**.{c,h,y}{,.in}]
+tab_width = 4
+max_line_length = 120
 
 [*.yml]
 indent_style = space
diff --git a/MonetDB.spec b/MonetDB.spec
--- a/MonetDB.spec
+++ b/MonetDB.spec
@@ -356,8 +356,10 @@ This package contains the files needed t
 Summary: MonetDB ODBC driver
 Group: Applications/Databases
 Requires: %{name}-client-lib%{?_isa} = %{version}-%{release}
+%if (0%{?fedora} < 45)
 Requires(post): %{_bindir}/odbcinst
 Requires(postun): %{_bindir}/odbcinst
+%endif
 
 %description client-odbc
 MonetDB is a database management system that is developed from a
@@ -367,6 +369,7 @@ accelerators.  It also has an SQL front 
 
 This package contains the MonetDB ODBC driver.
 
+%if (0%{?fedora} < 45)
 %post client-odbc
 # install driver if first install of package or if driver not installed yet
 if [ "$1" -eq 1 ] || ! odbcinst -d -q -n MonetDB >& /dev/null; then
@@ -384,13 +387,22 @@ fi
 if [ "$1" -eq 0 ]; then
     odbcinst -u -d -n MonetDB
 fi
+%endif
 
 %files client-odbc
 %license LICENSE
 %defattr(-,root,root)
+%if (0%{?fedora} >= 45)
+%dir %{_prefix}/lib/odbc
+%dir %{_prefix}/lib/odbc/odbcinst.d
+%{_prefix}/lib/odbc/odbcinst.d/30-monetdb.ini
+%{_libdir}/odbc/libMonetODBC.so
+%{_libdir}/odbc/libMonetODBCs.so
+%else
 %{_libdir}/libMonetODBC.so
 %{_libdir}/libMonetODBCs.so
 %endif
+%endif
 
 %if %{without compat}
 %package client-tests
@@ -1020,6 +1032,18 @@ rm "${RPM_BUILD_ROOT}"%{_sysconfdir}/log
 rm "${RPM_BUILD_ROOT}"%{_sysusersdir}/monetdb.conf
 rm "${RPM_BUILD_ROOT}"%{_tmpfilesdir}/monetdbd.conf
 rm "${RPM_BUILD_ROOT}"%{_unitdir}/monetdbd.service
+%else
+%if (0%{?fedora} >= 45)
+mkdir -p "${RPM_BUILD_ROOT}"%{_prefix}/lib/odbc/odbcinst.d
+mkdir -p "${RPM_BUILD_ROOT}"%{_libdir}/odbc
+cat > "${RPM_BUILD_ROOT}"%{_prefix}/lib/odbc/odbcinst.d/30-monetdb.ini <<\EOF
+[MonetDB]
+Description = ODBC for MonetDB
+Driver = libMonetODBC.so
+Setup = libMonetODBCs.so
+EOF
+mv "${RPM_BUILD_ROOT}"%{_libdir}/libMonetODBC*.so 
"${RPM_BUILD_ROOT}"%{_libdir}/odbc
+%endif
 %endif
 
 %changelog
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
@@ -127,7 +127,7 @@ restrict_t BATgetaccess(BAT *b);
 ValPtr BATgetprop(BAT *b, enum prop_t idx);
 ValPtr BATgetprop_nolock(BAT *b, enum prop_t idx);
 gdk_return BATgroup(BAT **groups, BAT **extents, BAT **histo, BAT *b, BAT *s, 
BAT *g, BAT *e, BAT *h);
-const char *BATgroupaggrinit(BAT *b, BAT *g, BAT *e, BAT *s, oid *minp, oid 
*maxp, BUN *ngrpp, struct canditer *ci);
+const char *BATgroupaggrinit(BAT *b, BAT *g, BAT *e, BAT *s, oid *minp, oid 
*maxp, BUN *ngrpp, struct canditer *ci, BATiter *bi);
 gdk_return BATgroupavg(BAT **bnp, BAT **cntsp, BAT *b, BAT *g, BAT *e, BAT *s, 
int tp, bool skip_nils, int scale);
 gdk_return BATgroupavg2(BAT **bnp, BAT **cntsp, BAT *b, BAT *g, BAT *e, BAT 
*s, int tp, BUN ngrp, bool skip_nils, int scale);
 gdk_return BATgroupavg3(BAT **avgp, BAT **remp, BAT **cntp, BAT *b, BAT *g, 
BAT *e, BAT *s, bool skip_nils, bool inout);
@@ -314,6 +314,7 @@ gdk_return GDKmergeidx(BAT *b, BAT **a, 
 void *GDKmmap(const char *path, int mode, size_t len);
 int GDKms(void);
 gdk_return GDKmunmap(void *addr, size_t len);
+int GDKnr_pipeline_threads;
 int GDKnr_threads;
 void GDKprepareExit(void);
 void GDKprintinfo(void);
@@ -472,6 +473,7 @@ ssize_t bteToStr(allocator *ma, char **d
 const bte bte_nil;
 oid canditer_idx(const struct canditer *ci, BUN p);
 void canditer_init(struct canditer *ci, BAT *b, BAT *s);
+void canditer_init_bi(struct canditer *ci, BATiter *bi, BAT *s);
 oid canditer_last(const struct canditer *ci);
 oid canditer_mask_next(const struct canditer *ci, oid o, bool next);
 oid canditer_peek(const struct canditer *ci);
diff --git a/clients/examples/C/backrefencode.c 
b/clients/examples/C/backrefencode.c
--- a/clients/examples/C/backrefencode.c
+++ b/clients/examples/C/backrefencode.c
@@ -21,8 +21,8 @@
 // #include <string.h>
 
 #ifdef _WIN32
-  #include <io.h>
-  #include <fcntl.h>
+#include <io.h>
+#include <fcntl.h>
 #endif
 
 // There we go again
@@ -241,24 +241,24 @@ main(int argc, char **argv)
        bool do_encode;
 
        switch (argc) {
-               case 1:
-                       do_encode = true;
+       case 1:
+               do_encode = true;
+               break;
+       case 2:
+               if (strcmp(argv[1], "-d") == 0) {
+                       do_encode = false;
                        break;
-               case 2:
-                       if (strcmp(argv[1], "-d") == 0) {
-                               do_encode = false;
-                               break;
-                       }
-                       /* fallthrough */
-               default:
-                       fprintf(stderr, "Usage: %s [-d] <input >output\n", 
argv[0]);
-                       return 1;
+               }
+               /* fallthrough */
+       default:
+               fprintf(stderr, "Usage: %s [-d] <input >output\n", argv[0]);
+               return 1;
        }
 
-       #ifdef _WIN32
+#ifdef _WIN32
        _setmode(_fileno(stdout),O_BINARY);
        _setmode(_fileno(stdin),O_BINARY);
-       #endif
+#endif
 
        if (setvbuf(stdout, NULL, _IOFBF, 128 * 1024) < 0) {
                fprintf(stderr, "setvbuf stdout: %s\n", strerror(errno));
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
@@ -349,11 +349,11 @@ gen_inet6(FILE *f, bool byteswap, long n
 #include "bincopydecimal_impl.h"
 
 #ifdef HAVE_HGE
-       #define FUNCNAME gen_decimal_hugeints
-       #define STYP int128_t
-       #define UTYP uint128_t
-       #define CONVERT copy_binary_convert128
-       #include "bincopydecimal_impl.h"
+#define FUNCNAME gen_decimal_hugeints
+#define STYP int128_t
+#define UTYP uint128_t
+#define CONVERT copy_binary_convert128
+#include "bincopydecimal_impl.h"
 #endif
 
 typedef void (*generator_t)(FILE *f, bool byteswap, long nrecs, char 
*argument);
@@ -485,7 +485,7 @@ main(int argc, char *argv[])
 #else
                true
 #endif
-       ;
+               ;
        bool i_am_big_endian = !i_am_little_endian;
 
        char **args = &argv[1];
diff --git a/clients/examples/C/bincopytemporaldata.c 
b/clients/examples/C/bincopytemporaldata.c
--- a/clients/examples/C/bincopytemporaldata.c
+++ b/clients/examples/C/bincopytemporaldata.c
@@ -61,7 +61,7 @@ random_timestamp(struct rng *rng)
                days == 28 &&
                year > 0 && year % 4 == 0 &&
                (year % 100 != 0 || year % 400 == 0)
-       );
+               );
        if (leap_year)
                days = 29;
        ts.date.day = 1 + rng_next(rng) % days;
@@ -84,22 +84,22 @@ gen_timestamps(FILE *f, bool byteswap, l
        }
 }
 
-#define GEN_TIMESTAMP_FIELD(name, typ, fld, nilvalue) \
-       void name \
-               (FILE *f, bool byteswap, long nrecs, char *arg) \
-       { \
-               (void)arg; \
-               struct rng rng = my_favorite_rng(); \
-       \
-               for (long i = 0; i < nrecs; i++) { \
+#define GEN_TIMESTAMP_FIELD(name, typ, fld, nilvalue)                  \
+       void name                                                       \
+       (FILE *f, bool byteswap, long nrecs, char *arg)                 \
+       {                                                               \
+               (void)arg;                                              \
+               struct rng rng = my_favorite_rng();                     \
+                                                                       \
+               for (long i = 0; i < nrecs; i++) {                      \
                        copy_binary_timestamp ts = random_timestamp(&rng); \
-                       typ *p = &ts.fld; \
-                       typ tmp = ts.date.day == 255 ? nilvalue : *p; \
-                       if (byteswap) { \
-                               copy_binary_convert_timestamp(&ts); \
-                       } \
-                       fwrite(&tmp, sizeof(tmp), 1, f); \
-               } \
+                       typ *p = &ts.fld;                               \
+                       typ tmp = ts.date.day == 255 ? nilvalue : *p;   \
+                       if (byteswap) {                                 \
+                               copy_binary_convert_timestamp(&ts);     \
+                       }                                               \
+                       fwrite(&tmp, sizeof(tmp), 1, f);                \
+               }                                                       \
        }
 
 GEN_TIMESTAMP_FIELD(gen_timestamp_times, copy_binary_time, time, 
binary_nil_timestamp.time)
diff --git a/clients/examples/C/bincopyuuid.c b/clients/examples/C/bincopyuuid.c
--- a/clients/examples/C/bincopyuuid.c
+++ b/clients/examples/C/bincopyuuid.c
@@ -27,7 +27,7 @@ random_uuid(struct rng *rng, my_uuid *u)
        //
        // _0_1_2_3 _4_5 _6_7 _8_9
        // 123e4567-e89b-12d3-a456-426614174000
-    // xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx
+       // xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx
        //
        // M: uuid version, located in byte 6
        // N: uuid variant, located in byte 8
@@ -80,4 +80,3 @@ gen_text_uuids(FILE *f, bool byteswap, l
        }
        (void)byteswap;
 }
-
diff --git a/clients/examples/C/sample0.c b/clients/examples/C/sample0.c
--- a/clients/examples/C/sample0.c
+++ b/clients/examples/C/sample0.c
@@ -13,15 +13,16 @@
 #include <string.h>
 #include <mapi.h>
 
-#define die(dbh,hdl)   do {                                            \
-                               if (hdl)                                \
-                                       mapi_explain_result(hdl,stderr); \
-                               else if (dbh)                           \
-                                       mapi_explain(dbh,stderr);       \
-                               else                                    \
-                                       fprintf(stderr,"command failed\n"); \
-                               exit(-1);                               \
-                       } while (0)
+#define die(dbh,hdl)                                           \
+       do {                                                    \
+               if (hdl)                                        \
+                       mapi_explain_result(hdl,stderr);        \
+               else if (dbh)                                   \
+                       mapi_explain(dbh,stderr);               \
+               else                                            \
+                       fprintf(stderr,"command failed\n");     \
+               exit(-1);                                       \
+       } while (0)
 
 int
 main(int argc, char **argv)
diff --git a/clients/examples/C/sample1.c b/clients/examples/C/sample1.c
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to