Changeset: 12aee66fa1dc for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/12aee66fa1dc
Branch: client_interrupts
Log Message:

Merge with default branch


diffs (truncated from 41987 to 300 lines):

diff --git a/.hgtags b/.hgtags
--- a/.hgtags
+++ b/.hgtags
@@ -757,3 +757,5 @@ 00463fdd0d51d7ce058549a82bc74efaea6035a2
 00463fdd0d51d7ce058549a82bc74efaea6035a2 Jul2021_SP3_release
 db3cec8ea853884e857fcfb413428116cb95e786 Jul2021_17
 8c015afafb5903ea59b0e2cffac1138a0d82e007 Jul2021_19
+8c015afafb5903ea59b0e2cffac1138a0d82e007 Jul2021_SP4_release
+cab90a348501b045e19cee5cebcc44f3800bd0a8 Jul2021_21
diff --git a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -97,7 +97,7 @@ if(NOT ${CMAKE_INSTALL_PREFIX} STREQUAL 
 #  SET(CMAKE_SKIP_RPATH TRUE)
 endif()
 
-# required for some instalation files
+# required for some installation files
 set(PROGRAM_PERMISSIONS_DEFAULT
   OWNER_WRITE
   OWNER_READ
diff --git a/NT/mkodbcwxs.py b/NT/mkodbcwxs.py
--- a/NT/mkodbcwxs.py
+++ b/NT/mkodbcwxs.py
@@ -90,7 +90,7 @@ def main():
                vcpkg.format(r'bin\bz2.dll'),
                vcpkg.format(r'bin\charset-1.dll'), # for iconv-2.dll
                vcpkg.format(r'bin\lz4.dll'),
-               vcpkg.format(r'bin\lzma.dll'),
+               vcpkg.format(r'bin\liblzma.dll'),
                vcpkg.format(r'bin\zlib1.dll')])
     print(r'            </Directory>')
     id = comp(features, id, 12,
diff --git a/NT/mksqlwxs.py b/NT/mksqlwxs.py
--- a/NT/mksqlwxs.py
+++ b/NT/mksqlwxs.py
@@ -158,7 +158,7 @@ def main():
                vcpkg.format(r'bin\getopt.dll'),
                vcpkg.format(r'bin\libxml2.dll'),
                vcpkg.format(r'bin\lz4.dll'),
-               vcpkg.format(r'bin\lzma.dll'),
+               vcpkg.format(r'bin\liblzma.dll'),
                vcpkg.format(r'bin\pcre.dll'),
                vcpkg.format(r'bin\zlib1.dll')])
     id = comp(debug, id, 14,
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
@@ -45798,6 +45798,11 @@ similarity
 command battxtsim.similarity(X_0:bat[:str], X_1:bat[:str]):bat[:dbl] 
 fstrcmp0_impl_bulk;
 Normalized edit distance between two strings
+baturl
+extractURLHost
+command baturl.extractURLHost(X_0:bat[:str], X_1:bit):bat[:str] 
+BATextractURLHost;
+Extract host from BAT of URLs
 batuuid
 isaUUID
 command batuuid.isaUUID(X_0:bat[:str]):bat[:bit] 
@@ -64589,6 +64594,11 @@ command txtsim.stringdiff(X_0:str, X_1:s
 stringdiff_impl;
 calculate the soundexed editdistance
 url
+extractURLHost
+command url.extractURLHost(X_0:str, X_1:bit):str 
+extractURLHost;
+Extract host from a URL relaxed version
+url
 getAnchor
 command url.getAnchor(X_0:url):str 
 URLgetAnchor;
@@ -64622,7 +64632,7 @@ url
 getHost
 command url.getHost(X_0:url):str 
 URLgetHost;
-Extract the server name from the URL
+Extract the server name from the URL strict version
 url
 getPort
 command url.getPort(X_0:url):str 
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
@@ -33008,6 +33008,11 @@ similarity
 command battxtsim.similarity(X_0:bat[:str], X_1:bat[:str]):bat[:dbl] 
 fstrcmp0_impl_bulk;
 Normalized edit distance between two strings
+baturl
+extractURLHost
+command baturl.extractURLHost(X_0:bat[:str], X_1:bit):bat[:str] 
+BATextractURLHost;
+Extract host from BAT of URLs
 batuuid
 isaUUID
 command batuuid.isaUUID(X_0:bat[:str]):bat[:bit] 
@@ -47999,6 +48004,11 @@ command txtsim.stringdiff(X_0:str, X_1:s
 stringdiff_impl;
 calculate the soundexed editdistance
 url
+extractURLHost
+command url.extractURLHost(X_0:str, X_1:bit):str 
+extractURLHost;
+Extract host from a URL relaxed version
+url
 getAnchor
 command url.getAnchor(X_0:url):str 
 URLgetAnchor;
@@ -48032,7 +48042,7 @@ url
 getHost
 command url.getHost(X_0:url):str 
 URLgetHost;
-Extract the server name from the URL
+Extract the server name from the URL strict version
 url
 getPort
 command url.getPort(X_0:url):str 
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
@@ -124,7 +124,7 @@ gdk_return BATfirstn(BAT **topn, BAT **g
 restrict_t BATgetaccess(BAT *b);
 ValPtr BATgetprop(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) __attribute__((__warn_unused_result__));
-const char *BATgroupaggrinit(BAT *b, BAT *g, BAT *e, BAT *s, oid *minp, oid 
*maxp, BUN *ngrpp, struct canditer *ci, BUN *ncand);
+const char *BATgroupaggrinit(BAT *b, BAT *g, BAT *e, BAT *s, oid *minp, oid 
*maxp, BUN *ngrpp, struct canditer *ci);
 gdk_return BATgroupavg(BAT **bnp, BAT **cntsp, BAT *b, BAT *g, BAT *e, BAT *s, 
int tp, bool skip_nils, bool abort_on_error, int scale);
 gdk_return BATgroupavg3(BAT **avgp, BAT **remp, BAT **cntp, BAT *b, BAT *g, 
BAT *e, BAT *s, bool skip_nils);
 BAT *BATgroupavg3combine(BAT *avg, BAT *rem, BAT *cnt, BAT *g, BAT *e, bool 
skip_nils);
@@ -166,7 +166,6 @@ BAT *BATmergecand(BAT *a, BAT *b);
 void *BATmin(BAT *b, void *aggr);
 void *BATmin_skipnil(BAT *b, void *aggr, bit skipnil);
 gdk_return BATmode(BAT *b, bool transient);
-void BATmsync(BAT *b);
 BAT *BATnegcands(BUN nr, BAT *odels);
 BAT *BATnil_grp(BAT *l, BAT *g, BAT *e, BAT *s);
 bool BATordered(BAT *b);
@@ -212,7 +211,7 @@ void BBPcold(bat i);
 BAT *BBPdescriptor(bat b);
 int BBPfix(bat b);
 bat BBPindex(const char *nme);
-void BBPkeepref(bat i);
+void BBPkeepref(BAT *b) __attribute__((__nonnull__(1)));
 bat BBPlimit;
 void BBPlock(void);
 BAT *BBPquickdesc(bat b);
@@ -463,7 +462,7 @@ ssize_t bteFromStr(const char *src, size
 ssize_t bteToStr(str *dst, size_t *len, const bte *src, bool external);
 const bte bte_nil;
 oid canditer_idx(const struct canditer *ci, BUN p);
-BUN canditer_init(struct canditer *ci, BAT *b, BAT *s);
+void canditer_init(struct canditer *ci, BAT *b, BAT *s);
 oid canditer_last(const struct canditer *ci);
 oid canditer_mask_next(const struct canditer *ci, oid o, bool next);
 oid canditer_peek(struct canditer *ci);
diff --git a/cmake/monetdb-defines.cmake b/cmake/monetdb-defines.cmake
--- a/cmake/monetdb-defines.cmake
+++ b/cmake/monetdb-defines.cmake
@@ -300,16 +300,18 @@ macro(monetdb_configure_misc)
       "PASSWORD_BACKEND invalid, choose one of MD5, SHA1, RIPEMD160, SHA224, 
SHA256, SHA384, SHA512")
   endif()
 
-  # Used for installing testing python module (don't pass a location, else we 
need to strip this again)
-  execute_process(COMMAND "${Python3_EXECUTABLE}" "-c" "import sysconfig; 
print(sysconfig.get_path('purelib', vars={'base': ''})[1:])"
-    RESULT_VARIABLE PY3_LIBDIR_CODE
-    OUTPUT_VARIABLE PYTHON3_SITEDIR
-    OUTPUT_STRIP_TRAILING_WHITESPACE)
-  if (PY3_LIBDIR_CODE)
-    message(WARNING
-      "Could not determine MonetDB Python3 site-packages instalation 
directory")
+  if(NOT DEFINED PYTHON3_LIBDIR)
+    # Used for installing testing python module (don't pass a location, else 
we need to strip this again)
+    execute_process(COMMAND "${Python3_EXECUTABLE}" "-c" "import sysconfig; 
print(sysconfig.get_path('purelib', vars={'base': ''})[1:])"
+      RESULT_VARIABLE PY3_LIBDIR_CODE
+      OUTPUT_VARIABLE PYTHON3_SITEDIR
+      OUTPUT_STRIP_TRAILING_WHITESPACE)
+    if (PY3_LIBDIR_CODE)
+      message(WARNING
+        "Could not determine MonetDB Python3 site-packages installation 
directory")
+    endif()
+    set(PYTHON3_LIBDIR "${PYTHON3_SITEDIR}")
   endif()
-  set(PYTHON3_LIBDIR "${PYTHON3_SITEDIR}")
   set(PYTHON "${Python3_EXECUTABLE}")
 
   if(MSVC)
diff --git a/debian/rules b/debian/rules
--- a/debian/rules
+++ b/debian/rules
@@ -13,6 +13,7 @@ DH_VERBOSE=1
 
 override_dh_auto_configure:
        dh_auto_configure -- \
+       -DPYTHON3_LIBDIR=lib/python3/dist-packages
        -DCMAKE_INSTALL_RUNSTATEDIR=/run \
        -DRELEASE_VERSION=ON \
        -DASSERT=OFF \
diff --git a/gdk/ChangeLog b/gdk/ChangeLog
--- a/gdk/ChangeLog
+++ b/gdk/ChangeLog
@@ -1,6 +1,14 @@
 # ChangeLog file for GDK
 # This file is updated with Maddlog
 
+* Mon Mar 21 2022 Sjoerd Mullender <sjo...@acm.org>
+- The function BBPkeepref now gets a BAT pointer as argument instead of
+  a bat id.
+
+* Fri Mar 18 2022 Sjoerd Mullender <sjo...@acm.org>
+- Get rid of macro Tsize, use ->twidth instead.
+- Get rid of macro BUNlast, just use BATcount instead.
+
 * Mon Jan 31 2022 Sjoerd Mullender <sjo...@acm.org>
 - The BLOB type has been moved into the GDK layer.
 
diff --git a/gdk/ChangeLog.Jan2022 b/gdk/ChangeLog.Jan2022
--- a/gdk/ChangeLog.Jan2022
+++ b/gdk/ChangeLog.Jan2022
@@ -1,6 +1,14 @@
 # ChangeLog file for GDK
 # This file is updated with Maddlog
 
+* Fri Mar 18 2022 Sjoerd Mullender <sjo...@acm.org>
+- Fixed a race condition which could cause a too large size being written
+  for a .theap file to the BBP.dir file after the correct size file had
+  been saved to disk.
+- We now ignore the size and capacity columns in the BBP.dir file.
+  These values are essential during run time, but not useful in the
+  on-disk image of the database.
+
 * Wed Mar  9 2022 Sjoerd Mullender <sjo...@acm.org>
 - Fixed a bug in the append code for msk (bit mask) bats.
 - Conversions from floating point types to integral types that involve
diff --git a/gdk/gdk.h b/gdk/gdk.h
--- a/gdk/gdk.h
+++ b/gdk/gdk.h
@@ -567,10 +567,10 @@ typedef struct {
 
        ATOMIC_TYPE refs;       /* reference count for this heap */
        bte farmid;             /* id of farm where heap is located */
-       bool cleanhash:1,       /* string heaps must clean hash */
-               dirty:1,        /* specific heap dirty marker */
-               remove:1,       /* remove storage file when freeing */
-               wasempty:1;     /* heap was empty when last saved/created */
+       bool cleanhash;         /* string heaps must clean hash */
+       bool dirty;             /* specific heap dirty marker */
+       bool remove;            /* remove storage file when freeing */
+       bool wasempty;      /* heap was empty when last saved/created */
        storage_t storage;      /* storage mode (mmap/malloc). */
        storage_t newstorage;   /* new desired storage mode at re-allocation. */
        bat parentid;           /* cache id of VIEW parent bat */
@@ -758,8 +758,21 @@ typedef struct {
 #define GDKLIBRARY_MINMAX_POS  061042U /* first in Nov2019: no min/max 
position; no BBPinfo value */
 #define GDKLIBRARY_TAILN       061043U /* first in Jul2021: str offset heaps 
names don't take width into account */
 #define GDKLIBRARY_HASHASH     061044U /* first in Jul2021: hashash bit in 
string heaps */
+#define GDKLIBRARY_HSIZE       061045U /* first in Jan2022: heap "size" values 
*/
 /* if the version number is updated, also fix snapshot_bats() in bat_logger.c 
*/
-#define GDKLIBRARY             061045U /* first after Jul2021 */
+#define GDKLIBRARY             061046U /* first after Jan2022 */
+
+/* The batRestricted field indicates whether a BAT is readonly.
+ * we have modes: BAT_WRITE  = all permitted
+ *                BAT_APPEND = append-only
+ *                BAT_READ   = read-only
+ * VIEW bats are always mapped read-only.
+ */
+typedef enum {
+       BAT_WRITE,                /* all kinds of access allowed */
+       BAT_READ,                 /* only read-access allowed */
+       BAT_APPEND,               /* only reads and appends allowed */
+} restrict_t;
 
 typedef struct BAT {
        /* static bat properties */
@@ -768,13 +781,12 @@ typedef struct BAT {
        bat batCacheid;         /* index into BBP */
 
        /* dynamic bat properties */
+       restrict_t batRestricted; /* access privileges */
+       bool batTransient;      /* should the BAT persist on disk? */
        bool
         batCopiedtodisk:1,     /* once written */
         batDirtyflushed:1,     /* was dirty before commit started? */
-        batDirtydesc:1,        /* bat descriptor dirty marker */
-        batTransient:1;        /* should the BAT persist on disk? */
-       uint8_t /* adjacent bit fields are packed together (if they fit) */
-        batRestricted:2;       /* access privileges */
+        batDirtydesc:1;        /* bat descriptor dirty marker */
        uint16_t /* adjacent bit fields are packed together (if they fit) */
         selcnt:10;             /* how often used in equi select without hash */
        role_t batRole;         /* role of the bat */
@@ -924,10 +936,10 @@ gdk_export void HEAPincref(Heap *h);
  * The BAT iterator provides a number of fields that can (and often
  * should) be used to access information about the BAT.  For string
  * BATs, if a parallel threads adds values, the offset heap (theap) may
- * get replaced by a one that is wider.  This involves changing the
- * twidth and tshift values in the BAT structure.  These changed values
- * should not be used to access the data in the iterator.  Instead, use
- * the width and shift values in the iterator itself.
+ * get replaced by one that is wider.  This involves changing the twidth
_______________________________________________
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org

Reply via email to