Changeset: ecd8c8346361 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/ecd8c8346361
Modified Files:
gdk/gdk_logger.c
sql/storage/bat/bat_logger.c
Branch: group-commit
Log Message:
merged with default
diffs (truncated from 5977 to 300 lines):
diff --git a/.hgtags b/.hgtags
--- a/.hgtags
+++ b/.hgtags
@@ -756,3 +756,5 @@ f458e1c71c73d6bd9636369c1406eadb74f016bf
00463fdd0d51d7ce058549a82bc74efaea6035a2 Jul2021_15
00463fdd0d51d7ce058549a82bc74efaea6035a2 Jul2021_SP3_release
db3cec8ea853884e857fcfb413428116cb95e786 Jul2021_17
+8c015afafb5903ea59b0e2cffac1138a0d82e007 Jul2021_19
+8c015afafb5903ea59b0e2cffac1138a0d82e007 Jul2021_SP4_release
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/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/mapilib/mapi.c b/clients/mapilib/mapi.c
--- a/clients/mapilib/mapi.c
+++ b/clients/mapilib/mapi.c
@@ -4358,7 +4358,7 @@ read_into_cache(MapiHdl hdl, int lookahe
for (;;) {
line = read_line(mid);
if (line == NULL) {
- if (mnstr_eof(mid->from)) {
+ if (mid->from && mnstr_eof(mid->from)) {
mapi_log_record(mid, "unexpected end of file");
mapi_log_record(mid, __func__);
close_connection(mid);
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/cmake/monetdb-packages.cmake b/cmake/monetdb-packages.cmake
--- a/cmake/monetdb-packages.cmake
+++ b/cmake/monetdb-packages.cmake
@@ -23,7 +23,7 @@ include(monetdb-wix-packages)
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
get_os_release_info(LINUX_DISTRO LINUX_DISTRO_VERSION)
- if (${LINUX_DISTRO} STREQUAL "debian")
+ if ("${LINUX_DISTRO}" STREQUAL "debian")
monetdb_debian_extra_files()
endif()
endif()
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/documentation/source/developers_handbook.rst
b/documentation/source/developers_handbook.rst
--- a/documentation/source/developers_handbook.rst
+++ b/documentation/source/developers_handbook.rst
@@ -120,7 +120,7 @@ Consider the following single client con
Alternatively existing ``.sql`` scripts can be converted to sqllogic tests
(.test) with ``Mconvert.py``.
For example::
- $Mconvert.py --auto <module>/Tests <convert_me>.sql
+ $ Mconvert.py --auto <module>/Tests <convert_me>.sql
All new tests need to be placed in the appropriate test folder and their name
respectively in the
index ``All`` file.
diff --git a/gdk/gdk.h b/gdk/gdk.h
--- a/gdk/gdk.h
+++ b/gdk/gdk.h
@@ -758,8 +758,9 @@ 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 */
typedef struct BAT {
/* static bat properties */
diff --git a/gdk/gdk_bat.c b/gdk/gdk_bat.c
--- a/gdk/gdk_bat.c
+++ b/gdk/gdk_bat.c
@@ -180,28 +180,6 @@ BATsetdims(BAT *b, uint16_t width)
}
const char *
-gettailnamebi(const BATiter *bi)
-{
- if (bi->type == TYPE_str) {
- switch (bi->width) {
- case 1:
- return "tail1";
- case 2:
- return "tail2";
- case 4:
-#if SIZEOF_VAR_T == 8
- return "tail4";
- case 8:
-#endif
- break;
- default:
- MT_UNREACHABLE();
- }
- }
- return "tail";
-}
-
-const char *
gettailname(const BAT *b)
{
if (b->ttype == TYPE_str) {
diff --git a/gdk/gdk_batop.c b/gdk/gdk_batop.c
--- a/gdk/gdk_batop.c
+++ b/gdk/gdk_batop.c
@@ -1391,14 +1391,23 @@ BATappend_or_update(BAT *b, BAT *p, cons
else if (pos <= bi.minpos && bi.minpos
< pos + ni.count)
bi.minpos = BUN_NONE;
}
+ if (complex_cand(n)) {
+ for (BUN i = 0, j = ni.count; i < j;
i++)
+ o[i] = *(oid *)Tpos(&ni, i);
+ /* last value */
+ v = o[ni.count - 1];
+ } else {
+ for (BUN i = 0, j = ni.count; i < j;
i++)
+ o[i] = v++;
+ /* last value added (not one beyond) */
+ v--;
+ }
if (bi.maxpos != BUN_NONE) {
- if (v + ni.count - 1 >= BUNtoid(b,
bi.maxpos))
+ if (v >= BUNtoid(b, bi.maxpos))
bi.maxpos = pos + ni.count - 1;
else if (pos <= bi.maxpos && bi.maxpos
< pos + ni.count)
bi.maxpos = BUN_NONE;
}
- for (BUN i = 0, j = ni.count; i < j; i++)
- o[i] = v++;
}
} else {
/* if the extremes of n are at least as
diff --git a/gdk/gdk_bbp.c b/gdk/gdk_bbp.c
--- a/gdk/gdk_bbp.c
+++ b/gdk/gdk_bbp.c
@@ -443,6 +443,8 @@ heapinit(BAT *b, const char *buf,
(void) bbpversion; /* could be used to implement compatibility */
minpos = maxpos = (uint64_t) oid_nil; /* for GDKLIBRARY_MINMAX_POS case
*/
+ size = 0; /* for GDKLIBRARY_HSIZE case */
+ storage = STORE_INVALID; /* for GDKLIBRARY_HSIZE case */
if (bbpversion <= GDKLIBRARY_MINMAX_POS ?
sscanf(buf,
" %10s %" SCNu16 " %" SCNu16 " %" SCNu16 " %" SCNu64
@@ -453,6 +455,7 @@ heapinit(BAT *b, const char *buf,
&nokey1, &nosorted, &norevsorted, &base,
&free, &size, &storage,
&n) < 12 :
+ bbpversion <= GDKLIBRARY_HSIZE ?
sscanf(buf,
" %10s %" SCNu16 " %" SCNu16 " %" SCNu16 " %" SCNu64
" %" SCNu64 " %" SCNu64 " %" SCNu64 " %" SCNu64
@@ -461,7 +464,16 @@ heapinit(BAT *b, const char *buf,
type, &width, &var, &properties, &nokey0,
&nokey1, &nosorted, &norevsorted, &base,
&free, &size, &storage, &minpos, &maxpos,
- &n) < 14) {
+ &n) < 14 :
+ sscanf(buf,
+ " %10s %" SCNu16 " %" SCNu16 " %" SCNu16 " %" SCNu64
+ " %" SCNu64 " %" SCNu64 " %" SCNu64 " %" SCNu64
+ " %" SCNu64 " %" SCNu64 " %" SCNu64
+ "%n",
+ type, &width, &var, &properties, &nokey0,
+ &nokey1, &nosorted, &norevsorted, &base,
+ &free, &minpos, &maxpos,
+ &n) < 12) {
TRC_CRITICAL(GDK, "invalid format for BBP.dir on line %d",
lineno);
return -1;
}
@@ -515,7 +527,14 @@ heapinit(BAT *b, const char *buf,
/* (properties & 0x0200) is the old tdense flag */
b->tseqbase = (properties & 0x0200) == 0 || base >= (uint64_t) oid_nil
? oid_nil : (oid) base;
b->theap->free = (size_t) free;
- b->theap->size = (size_t) size;
+ /* set heap size to match capacity */
+ if (b->ttype == TYPE_msk) {
+ /* round up capacity to multiple of 32 */
+ b->batCapacity = (b->batCapacity + 31) & ~((BUN) 31);
+ b->theap->size = b->batCapacity / 8;
+ } else {
+ b->theap->size = (size_t) b->batCapacity << b->tshift;
+ }
b->theap->base = NULL;
settailname(b->theap, filename, t, width);
b->theap->storage = STORE_INVALID;
@@ -531,25 +550,30 @@ heapinit(BAT *b, const char *buf,
b->tmaxpos = (BUN) maxpos;
else
b->tmaxpos = BUN_NONE;
- if (b->theap->free > b->theap->size) {
- TRC_CRITICAL(GDK, "\"free\" value larger than \"size\" in heap
of bat %d on line %d\n", (int) bid, lineno);
- return -1;
- }
return n;
}
static int
-vheapinit(BAT *b, const char *buf, bat bid, const char *filename, int lineno)
+vheapinit(BAT *b, const char *buf, bat bid, unsigned bbpversion, const char
*filename, int lineno)
{
int n = 0;
uint64_t free, size;
uint16_t storage;
+ (void) bbpversion; /* could be used to implement compatibility */
+
+ size = 0; /* for GDKLIBRARY_HSIZE case */
+ storage = STORE_INVALID; /* for GDKLIBRARY_HSIZE case */
if (b->tvarsized && b->ttype != TYPE_void) {
- if (sscanf(buf,
+ if (bbpversion <= GDKLIBRARY_HSIZE ?
+ sscanf(buf,
" %" SCNu64 " %" SCNu64 " %" SCNu16
"%n",
- &free, &size, &storage, &n) < 3) {
+ &free, &size, &storage, &n) < 3 :
+ sscanf(buf,
+ " %" SCNu64
+ "%n",
+ &free, &n) < 1) {
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]