Changeset: bfad82785f57 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/bfad82785f57
Branch: Dec2025
Log Message:
merged
diffs (213 lines):
diff --git a/cmake/Modules/FindValgrind.cmake b/cmake/Modules/FindValgrind.cmake
--- a/cmake/Modules/FindValgrind.cmake
+++ b/cmake/Modules/FindValgrind.cmake
@@ -6,33 +6,21 @@
# VALGRIND_FOUND - True if valgrind found.
find_path(VALGRIND_INCLUDE_DIR
- NAMES valgrind.h)
-
-find_library(VALGRIND_LIBRARIES
- NAMES valgrind)
+ NAMES valgrind.h
+ PATH_SUFFIXES valgrind)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Valgrind
DEFAULT_MSG
- VALGRIND_LIBRARIES
VALGRIND_INCLUDE_DIR)
-mark_as_advanced(VALGRIND_INCLUDE_DIR
- VALGRIND_LIBRARIES)
+mark_as_advanced(VALGRIND_INCLUDE_DIR)
if(VALGRIND_FOUND)
- if(NOT TARGET VALGRIND::VALGRIND AND
- (EXISTS "${VALGRIND_LIBRARIES}"))
+ if(NOT TARGET VALGRIND::VALGRIND)
add_library(VALGRIND::VALGRIND UNKNOWN IMPORTED)
set_target_properties(VALGRIND::VALGRIND
PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${VALGRIND_INCLUDE_DIR}")
-
- if(EXISTS "${VALGRIND_LIBRARIES}")
- set_target_properties(VALGRIND::VALGRIND
- PROPERTIES
- IMPORTED_LINK_INTERFACE_LANGUAGES "C"
- IMPORTED_LOCATION "${VALGRIND_LIBRARIES}")
- endif()
endif()
endif()
diff --git a/common/stream/socket_stream.c b/common/stream/socket_stream.c
--- a/common/stream/socket_stream.c
+++ b/common/stream/socket_stream.c
@@ -426,20 +426,6 @@ socket_read(stream *restrict s, void *re
mnstr_set_error_errno(s, errno == EINTR ?
MNSTR_INTERRUPT : MNSTR_READ_ERROR, NULL);
return -1;
}
-#ifdef HAVE_SYS_UN_H
- /* when reading a block size in a block stream
- * (elmsize==2,cnt==1), we may actually get an "OOB" message
- * when this is a Unix domain socket */
- if (s->putoob == socket_putoob_unix &&
- elmsize == 2 && cnt == 1 && nr == 2 &&
- ((char *)buf)[0] == OOBMSG0 &&
- ((char *)buf)[1] == OOBMSG1) {
- /* also read (and discard) the "pay load" */
- (void) recv(s->stream_data.s, buf, 1, 0);
- mnstr_set_error(s, MNSTR_INTERRUPT, "query abort from
client");
- return -1;
- }
-#endif
break;
}
if (nr == 0) {
diff --git a/gdk/CMakeLists.txt b/gdk/CMakeLists.txt
--- a/gdk/CMakeLists.txt
+++ b/gdk/CMakeLists.txt
@@ -100,6 +100,7 @@ target_include_directories(bat
$<TARGET_PROPERTY:matomic,INTERFACE_INCLUDE_DIRECTORIES>
$<TARGET_PROPERTY:mstring,INTERFACE_INCLUDE_DIRECTORIES>
$<$<BOOL:${RTREE_FOUND}>:$<TARGET_PROPERTY:rtree::rtree,INTERFACE_INCLUDE_DIRECTORIES>>
+
$<$<BOOL:${VALGRIND_FOUND}>:$<TARGET_PROPERTY:VALGRIND::VALGRIND,INTERFACE_INCLUDE_DIRECTORIES>>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/monetdb>
$<$<BOOL:${OPENSSL_FOUND}>:${OPENSSL_INCLUDE_DIR}>)
diff --git a/gdk/gdk_posix.c b/gdk/gdk_posix.c
--- a/gdk/gdk_posix.c
+++ b/gdk/gdk_posix.c
@@ -46,9 +46,9 @@
#if defined(__GNUC__) && defined(HAVE_VALGRIND)
#include <valgrind.h>
#else
-#define VALGRIND_MALLOCLIKE_BLOCK(addr, sizeB, rzB, is_zeroed)
-#define VALGRIND_FREELIKE_BLOCK(addr, rzB)
-#define VALGRIND_RESIZEINPLACE_BLOCK(addr, oldSizeB, newSizeB, rzB)
+#define VALGRIND_MALLOCLIKE_BLOCK(addr, sizeB, rzB, is_zeroed) ((void) 0)
+#define VALGRIND_FREELIKE_BLOCK(addr, rzB) ((void) 0)
+#define VALGRIND_RESIZEINPLACE_BLOCK(addr, oldSizeB, newSizeB, rzB) ((void) 0)
#endif
#ifndef MAP_NORESERVE
diff --git a/monetdb5/mal/mal_session.c b/monetdb5/mal/mal_session.c
--- a/monetdb5/mal/mal_session.c
+++ b/monetdb5/mal/mal_session.c
@@ -34,38 +34,39 @@ str
malBootstrap(char *modules[], bool embedded, const char *initpasswd)
{
Client c;
- str msg = MAL_SUCCEED;
+
+ /* we cannot use errors that are handed down to us since we destroy
+ * the error allocator when there is an error
+ * note that our caller logs a CRITICAL error in case we return an
+ * error, so we don't log anything */
c = MCinitClient(MAL_ADMIN, NULL, NULL);
if (c == NULL) {
- throw(MAL, "malBootstrap", "Failed to initialize client");
+ return "MALException:malBootstrap:Failed to initialize
client\n";
}
assert(c != NULL);
c->curmodule = c->usermodule = userModule();
if (c->usermodule == NULL) {
MCcloseClient(c);
- throw(MAL, "malBootstrap", "Failed to initialize client MAL
module");
+ return "MALException:malBootstrap:Failed to initialize client
MAL module\n";
}
- if ((msg = defaultScenario(c))) {
+ (void) defaultScenario(c); /* cannot fail */
+ if (MSinitClientPrg(c, userRef, mainRef) != MAL_SUCCEED) {
MCcloseClient(c);
- return msg;
- }
- if ((msg = MSinitClientPrg(c, userRef, mainRef)) != MAL_SUCCEED) {
- MCcloseClient(c);
- return msg;
+ return "MALException:malBootstrap:Failed to initialize client
program\n";
}
if (MCinitClientThread(c) < 0) {
MCcloseClient(c);
- throw(MAL, "malBootstrap", "Failed to create client thread");
+ return "MALException:malBootstrap:Failed to create client
thread\n";
}
- if ((msg = malIncludeModules(c, modules, 0, embedded, initpasswd)) !=
MAL_SUCCEED) {
+ if (malIncludeModules(c, modules, 0, embedded, initpasswd) !=
MAL_SUCCEED) {
MCcloseClient(c);
- return msg;
+ return "MALException:malBootstrap:Failed to initialize the
modules\n";
}
MCcloseClient(c);
MT_thread_set_qry_ctx(NULL);
- return msg;
+ return MAL_SUCCEED;
}
/*
diff --git a/sql/benchmarks/tpcds/Tests/alter.timeout
b/sql/benchmarks/tpcds/Tests/alter.timeout
deleted file mode 100644
--- a/sql/benchmarks/tpcds/Tests/alter.timeout
+++ /dev/null
@@ -1,1 +0,0 @@
-3
diff --git a/sql/benchmarks/tpcds/Tests/load.timeout
b/sql/benchmarks/tpcds/Tests/load.timeout
--- a/sql/benchmarks/tpcds/Tests/load.timeout
+++ b/sql/benchmarks/tpcds/Tests/load.timeout
@@ -1,1 +1,1 @@
-3
+5
diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in
--- a/testing/Mtest.py.in
+++ b/testing/Mtest.py.in
@@ -2746,7 +2746,7 @@ class ServerClass:
self.sendusr1()
def checkkeys(self):
- if not checkkeys:
+ if not checkkeys or self.port is None:
return
self.outfile.flush()
try:
@@ -2817,12 +2817,10 @@ class ServerClass:
self.lock.release()
def LaunchIt(self, cwd=None, env=os.environ):
- self.outfile.flush()
- self.errfile.flush()
-
cmd = self.cmd
if procdebug:
print('LaunchIt: starting process "%s" (inpipe)\n' % '"
"'.join(cmd))
+
stdin = process.DEVNULL
stdout = self.outfile
stderr = self.errfile
@@ -2843,6 +2841,12 @@ class ServerClass:
else:
stdout = process.PIPE
+ print(f'# Launching {cmd}', file=self.outfile)
+ if cwd is not None:
+ print(f'# in directory {cwd}', file=self.outfile)
+ print(f'# Environment: {env}', file=self.outfile)
+ self.outfile.flush()
+ self.errfile.flush()
if os.name == 'nt':
proc = process.Popen(cmd, stdin=stdin, stdout=stdout,
stderr=stderr, text=True, cwd=cwd, env=env,
diff --git a/tools/mserver/mserver5.c b/tools/mserver/mserver5.c
--- a/tools/mserver/mserver5.c
+++ b/tools/mserver/mserver5.c
@@ -753,6 +753,10 @@ main(int argc, char **av)
};
struct stat sb;
if (binpath != NULL) {
+ if (MT_stat(binpath, &sb) != 0 &&
+ MT_stat(av[0], &sb) == 0 &&
+ MT_path_absolute(av[0]))
+ binpath = av[0];
char *p = strrchr(binpath, DIR_SEP);
if (p != NULL)
*p = '\0';
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]