Changeset: cee328ab7864 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/cee328ab7864
Branch: newjson
Log Message:

merge default


diffs (truncated from 306 to 300 lines):

diff --git a/clients/mapilib/Tests/tlssecurity.py 
b/clients/mapilib/Tests/tlssecurity.py
--- a/clients/mapilib/Tests/tlssecurity.py
+++ b/clients/mapilib/Tests/tlssecurity.py
@@ -166,10 +166,7 @@ attempt('connect_server_name', 'sni', No
 # indicates that the implementation successfully negotiated ALPN protocol
 # "mapi/9".
 
-####### Temporarily disable the ALPN header.
-####### TODO re-enable it when test systemcertificates.py no longer relies
-####### on connecting to an HTTPS server. (Which is an ugly hack in the first 
place!)
-# attempt('connect_alpn_mapi9', 'alpn_mapi9', None, cert=certpath('ca1.crt'))
+attempt('connect_alpn_mapi9', 'alpn_mapi9', None, cert=certpath('ca1.crt'))
 
 # connect_right_hash
 #
diff --git a/clients/mapilib/connect_openssl.c 
b/clients/mapilib/connect_openssl.c
--- a/clients/mapilib/connect_openssl.c
+++ b/clients/mapilib/connect_openssl.c
@@ -269,17 +269,12 @@ wrap_tls(Mapi mid, SOCKET sock)
                return croak_openssl(mid, __func__, 
"X509_VERIFY_PARAM_set1_host");
        }
 
-       // Temporarily disable the ALPN header.
-       // TODO re-enable it when test systemcertificates.py no longer relies
-       // on connecting to an HTTPS server. (Which is an ugly hack in the 
first place!)
-#if 0
        unsigned char alpn_vector[] = { 6, 'm', 'a', 'p', 'i', '/', '9' };
        // NOTE: these functions return 0 on success, not 1!
        if (0 != SSL_set_alpn_protos(ssl, alpn_vector, sizeof(alpn_vector))) {
                BIO_free_all(bio);
                return croak_openssl(mid, __func__, "SSL_set_alpn_protos");
        }
-#endif
 
        assert(clientkey);
        assert(clientcert);
diff --git a/gdk/gdk.h b/gdk/gdk.h
--- a/gdk/gdk.h
+++ b/gdk/gdk.h
@@ -310,14 +310,9 @@
 #define _GDK_H_
 
 /* standard includes upon which all configure tests depend */
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
 #ifdef HAVE_SYS_STAT_H
 # include <sys/stat.h>
 #endif
-#include <stddef.h>
-#include <string.h>
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
 #endif
@@ -711,38 +706,6 @@ gdk_export bool VALisnil(const ValRecord
 
 typedef struct PROPrec PROPrec;
 
-/* see also comment near BATassertProps() for more information about
- * the properties */
-typedef struct {
-       uint16_t width;         /* byte-width of the atom array */
-       int8_t type;            /* type id. */
-       uint8_t shift;          /* log2 of bun width */
-       bool key:1,             /* no duplicate values present */
-               nonil:1,        /* there are no nils in the column */
-               nil:1,          /* there is a nil in the column */
-               sorted:1,       /* column is sorted in ascending order */
-               revsorted:1,    /* column is sorted in descending order */
-               ascii:1;        /* string column is fully ASCII (7 bit) */
-       BUN nokey[2];           /* positions that prove key==FALSE */
-       BUN nosorted;           /* position that proves sorted==FALSE */
-       BUN norevsorted;        /* position that proves revsorted==FALSE */
-       BUN minpos, maxpos;     /* location of min/max value */
-       double unique_est;      /* estimated number of unique values */
-       oid seq;                /* start of dense sequence */
-
-       Heap *heap;             /* space for the column. */
-       BUN baseoff;            /* offset in heap->base (in whole items) */
-       Heap *vheap;            /* space for the varsized data. */
-       Hash *hash;             /* hash table */
-#ifdef HAVE_RTREE
-       RTree *rtree;           /* rtree geometric index */
-#endif
-       Heap *orderidx;         /* order oid index */
-       Strimps *strimps;       /* string imprint index  */
-
-       PROPrec *props;         /* list of dynamic properties stored in the bat 
descriptor */
-} COLrec;
-
 #define ORDERIDXOFF            3
 
 /* assert that atom width is power of 2, i.e., width == 1<<shift */
@@ -788,9 +751,8 @@ typedef struct BAT {
 
        /* dynamic bat properties */
        restrict_t batRestricted:2; /* access privileges */
-       bool
-        batTransient:1,        /* should the BAT persist on disk? */
-        batCopiedtodisk:1;     /* once written */
+       bool batTransient:1;    /* should the BAT persist on disk? */
+       bool batCopiedtodisk:1; /* once written */
        uint16_t selcnt;        /* how often used in equi select without hash */
        uint16_t unused;        /* value=0 for now (sneakily used by mat.c) */
 
@@ -800,41 +762,41 @@ typedef struct BAT {
        BUN batCapacity;        /* tuple capacity */
 
        /* dynamic column properties */
-       COLrec T;               /* column info */
+       uint16_t twidth;        /* byte-width of the atom array */
+       int8_t ttype;           /* type id. */
+       uint8_t tshift;         /* log2 of bun width */
+       /* see also comment near BATassertProps() for more information
+        * about the properties */
+       bool tkey:1;            /* no duplicate values present */
+       bool tnonil:1;          /* there are no nils in the column */
+       bool tnil:1;            /* there is a nil in the column */
+       bool tsorted:1;         /* column is sorted in ascending order */
+       bool trevsorted:1;      /* column is sorted in descending order */
+       bool tascii:1;          /* string column is fully ASCII (7 bit) */
+       BUN tnokey[2];          /* positions that prove key==FALSE */
+       BUN tnosorted;          /* position that proves sorted==FALSE */
+       BUN tnorevsorted;       /* position that proves revsorted==FALSE */
+       BUN tminpos, tmaxpos;   /* location of min/max value */
+       double tunique_est;     /* estimated number of unique values */
+       oid tseqbase;           /* start of dense sequence */
+
+       Heap *theap;            /* space for the column. */
+       BUN tbaseoff;           /* offset in heap->base (in whole items) */
+       Heap *tvheap;           /* space for the varsized data. */
+       Hash *thash;            /* hash table */
+#ifdef HAVE_RTREE
+       RTree *trtree;          /* rtree geometric index */
+#endif
+       Heap *torderidx;        /* order oid index */
+       Strimps *tstrimps;      /* string imprint index  */
+       PROPrec *tprops;        /* list of dynamic properties stored in the bat 
descriptor */
+
        MT_Lock theaplock;      /* lock protecting heap reference changes */
        MT_RWLock thashlock;    /* lock specifically for hash management */
        MT_Lock batIdxLock;     /* lock to manipulate other indexes/properties 
*/
        Heap *oldtail;          /* old tail heap, to be destroyed after commit 
*/
 } BAT;
 
-/* macros to hide complexity of the BAT structure */
-#define ttype          T.type
-#define tkey           T.key
-#define tseqbase       T.seq
-#define tsorted                T.sorted
-#define trevsorted     T.revsorted
-#define tascii         T.ascii
-#define torderidx      T.orderidx
-#define twidth         T.width
-#define tshift         T.shift
-#define tnonil         T.nonil
-#define tnil           T.nil
-#define tnokey         T.nokey
-#define tnosorted      T.nosorted
-#define tnorevsorted   T.norevsorted
-#define tminpos                T.minpos
-#define tmaxpos                T.maxpos
-#define tunique_est    T.unique_est
-#define theap          T.heap
-#define tbaseoff       T.baseoff
-#define tvheap         T.vheap
-#define thash          T.hash
-#define tprops         T.props
-#define tstrimps       T.strimps
-#ifdef HAVE_RTREE
-#define trtree         T.rtree
-#endif
-
 /* some access functions for the bitmask type */
 static inline void
 mskSet(BAT *b, BUN p)
@@ -2533,16 +2495,6 @@ TIMEOUT_TEST(QryCtx *qc)
                        CALLBACK;                                       \
        } while (0)
 
-typedef struct gdk_callback {
-       const char *name;
-       int argc;
-       int interval;  // units sec
-       lng last_called; // timestamp GDKusec
-       gdk_return (*func)(int argc, void *argv[]);
-       struct gdk_callback *next;
-       void *argv[];
-} gdk_callback;
-
 typedef gdk_return gdk_callback_func(int argc, void *argv[]);
 
 gdk_export gdk_return gdk_add_callback(const char *name, gdk_callback_func *f,
diff --git a/gdk/gdk_align.c b/gdk/gdk_align.c
--- a/gdk/gdk_align.c
+++ b/gdk/gdk_align.c
@@ -168,7 +168,7 @@ VIEWcreate(oid seq, BAT *b, BUN l, BUN h
        bn->batCapacity = b->batCapacity;
        bn->batRestricted = BAT_READ;
 
-       /* the T column descriptor is fully copied except for the
+       /* the column descriptor is fully copied except for the
         * accelerator data. We need copies because in case of a mark,
         * we are going to override a column with a void. */
        bn->tkey = bi.key;
diff --git a/gdk/gdk_bbp.c b/gdk/gdk_bbp.c
--- a/gdk/gdk_bbp.c
+++ b/gdk/gdk_bbp.c
@@ -4444,6 +4444,16 @@ gdk_bbp_reset(void)
 
 static MT_Lock GDKCallbackListLock = MT_LOCK_INITIALIZER(GDKCallbackListLock);
 
+typedef struct gdk_callback {
+       const char *name;
+       int argc;
+       int interval;  // units sec
+       lng last_called; // timestamp GDKusec
+       gdk_return (*func)(int argc, void *argv[]);
+       struct gdk_callback *next;
+       void *argv[];
+} gdk_callback;
+
 static struct {
        int cnt;
        gdk_callback *head;
diff --git a/gdk/gdk_subquery.c b/gdk/gdk_subquery.c
--- a/gdk/gdk_subquery.c
+++ b/gdk/gdk_subquery.c
@@ -493,8 +493,7 @@ BATallnotequal_grp(BAT *l, BAT *r, BAT *
        }
 
        if (BATcount(l) == 0 || ngrp == 0) {
-               bit T = TRUE;
-               if ((res = BATconstant(ngrp == 0 ? 0 : min, TYPE_bit, &T, ngrp, 
TRANSIENT)) == NULL)
+               if ((res = BATconstant(ngrp == 0 ? 0 : min, TYPE_bit, 
&(bit){TRUE}, ngrp, TRANSIENT)) == NULL)
                        goto alloc_fail;
        } else {
                bit *restrict ret;
@@ -759,8 +758,7 @@ BATallnotequal_grp2(BAT *l, BAT *r, BAT 
        }
 
        if (BATcount(l) == 0 || ngrp == 0) {
-               bit T = TRUE;
-               if ((res = BATconstant(ngrp == 0 ? 0 : min, TYPE_bit, &T, ngrp, 
TRANSIENT)) == NULL)
+               if ((res = BATconstant(ngrp == 0 ? 0 : min, TYPE_bit, 
&(bit){TRUE}, ngrp, TRANSIENT)) == NULL)
                        goto alloc_fail;
        } else {
                bit *restrict ret;
@@ -955,8 +953,7 @@ BATsubnot_exist(BAT *b, BAT *g, BAT *e, 
        }
 
        if (BATcount(b) == 0 || ngrp == 0) {
-               bit T = TRUE;
-               if ((res = BATconstant(ngrp == 0 ? 0 : min, TYPE_bit, &T, ngrp, 
TRANSIENT)) == NULL)
+               if ((res = BATconstant(ngrp == 0 ? 0 : min, TYPE_bit, 
&(bit){TRUE}, ngrp, TRANSIENT)) == NULL)
                        goto alloc_fail;
        } else {
                bit *restrict exists;
diff --git a/gdk/gdk_system.h b/gdk/gdk_system.h
--- a/gdk/gdk_system.h
+++ b/gdk/gdk_system.h
@@ -235,7 +235,6 @@ gdk_export char *GDKgetbuf(void);
 /*
  * @- MT Lock API
  */
-#include "matomic.h"
 
 /* define this to keep lock statistics (can be expensive) */
 /* #define LOCK_STATS 1 */
diff --git a/sql/backends/monet5/UDF/capi/capi.c 
b/sql/backends/monet5/UDF/capi/capi.c
--- a/sql/backends/monet5/UDF/capi/capi.c
+++ b/sql/backends/monet5/UDF/capi/capi.c
@@ -671,12 +671,12 @@ static str CUDFeval(Client cntxt, MalBlk
                // we have to compile it
 
                // first generate the names     of the files
-               // we place the temporary files in the DELDIR directory
+               // we place the temporary files in the TEMPDIR directory
                // because this will be removed again upon server startup
                const int RANDOM_NAME_SIZE = 32;
                const char prefix[] = TEMPDIR_NAME DIR_SEP_STR;
                size_t prefix_size = strlen(prefix);
-               char deldirpath[MAXPATH];
+               char tempdirpath[MAXPATH];
 
                memcpy(buf, prefix, sizeof(char) * strlen(prefix));
                // generate a random 32-character name for the temporary files
@@ -705,14 +705,14 @@ static str CUDFeval(Client cntxt, MalBlk
                        goto wrapup;
                }
 
-               // if DELDIR directory does not exist, create it
-               if (GDKfilepath(deldirpath, sizeof(deldirpath), 0, NULL, 
TEMPDIR, NULL) != GDK_SUCCEED) {
+               // if TEMPDIR directory does not exist, create it
+               if (GDKfilepath(tempdirpath, sizeof(tempdirpath), 0, NULL, 
TEMPDIR, NULL) != GDK_SUCCEED) {
                        msg = createException(MAL, "cudf.eval", 
MAL_MALLOC_FAIL);
                        goto wrapup;
                }
-               if (MT_mkdir(deldirpath) < 0 && errno != EEXIST) {
+               if (MT_mkdir(tempdirpath) < 0 && errno != EEXIST) {
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to