Changeset: f016580a6ce2 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/f016580a6ce2
Modified Files:
clients/Tests/MAL-signatures-hge.test
clients/Tests/MAL-signatures.test
gdk/gdk.h
gdk/gdk_batop.c
sql/backends/monet5/sql.c
sql/include/sql_catalog.h
sql/storage/bat/bat_storage.c
sql/storage/bat/bat_storage.h
sql/storage/sql_storage.h
sql/storage/store.c
Branch: nilmask
Log Message:
merged with default
diffs (truncated from 3864 to 300 lines):
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
@@ -49815,8 +49815,13 @@ SQLstddev_pop;
return the standard deviation population of groups
sql
stop_vacuum
+unsafe pattern sql.stop_vacuum(X_0:str, X_1:str):void
+SQLstr_stop_vacuum;
+stop auto vacuum
+sql
+stop_vacuum
unsafe pattern sql.stop_vacuum(X_0:str, X_1:str, X_2:str):void
-SQLstr_column_stop_vacuum;
+SQLstr_stop_vacuum;
stop auto vacuum
sql
storage
@@ -49975,13 +49980,23 @@ SYSupdate_tables;
Procedure triggered on update of the sys._tables table
sql
vacuum
+unsafe pattern sql.vacuum(X_0:str, X_1:str, X_2:int):void
+SQLstr_auto_vacuum;
+auto vacuum string column of given table with interval(sec)
+sql
+vacuum
unsafe pattern sql.vacuum(X_0:str, X_1:str, X_2:str, X_3:int):void
-SQLstr_column_auto_vacuum;
+SQLstr_auto_vacuum;
auto vacuum string column with interval(sec)
sql
vacuum
+unsafe pattern sql.vacuum(X_0:str, X_1:str):void
+SQLstr_vacuum;
+vacuum a string column
+sql
+vacuum
unsafe pattern sql.vacuum(X_0:str, X_1:str, X_2:str):void
-SQLstr_column_vacuum;
+SQLstr_vacuum;
vacuum a string column
sql
variance
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
@@ -38225,8 +38225,13 @@ SQLstddev_pop;
return the standard deviation population of groups
sql
stop_vacuum
+unsafe pattern sql.stop_vacuum(X_0:str, X_1:str):void
+SQLstr_stop_vacuum;
+stop auto vacuum
+sql
+stop_vacuum
unsafe pattern sql.stop_vacuum(X_0:str, X_1:str, X_2:str):void
-SQLstr_column_stop_vacuum;
+SQLstr_stop_vacuum;
stop auto vacuum
sql
storage
@@ -38360,8 +38365,13 @@ SYSupdate_tables;
Procedure triggered on update of the sys._tables table
sql
vacuum
+unsafe pattern sql.vacuum(X_0:str, X_1:str, X_2:int):void
+SQLstr_auto_vacuum;
+auto vacuum string column of given table with interval(sec)
+sql
+vacuum
unsafe pattern sql.vacuum(X_0:str, X_1:str, X_2:str, X_3:int):void
-SQLstr_column_auto_vacuum;
+SQLstr_auto_vacuum;
auto vacuum string column with interval(sec)
sql
vacuum
diff --git a/clients/mapiclient/mclient.c b/clients/mapiclient/mclient.c
--- a/clients/mapiclient/mclient.c
+++ b/clients/mapiclient/mclient.c
@@ -3879,6 +3879,8 @@ main(int argc, char **argv)
}
mapi_destroy(mid);
+ if (toConsole != stdout_stream && toConsole != stderr_stream)
+ close_stream(toConsole);
mnstr_destroy(stdout_stream);
mnstr_destroy(stderr_stream);
if (priv.buf != NULL)
diff --git a/clients/mapiclient/mhelp.c b/clients/mapiclient/mhelp.c
--- a/clients/mapiclient/mhelp.c
+++ b/clients/mapiclient/mhelp.c
@@ -88,7 +88,7 @@ SQLhelp sqlhelp1[] = {
"ALTER USER ident\n"
" [WITH [ENCRYPTED | UNENCRYPTED] PASSWORD string]\n"
" [SET SCHEMA ident] [SCHEMA PATH string] [DEFAULT ROLE ident]\n"
- " [MAX_MEMORY posbytes | NO MAX_MEMORY] [MAX_WORKERS poscount | NO
MAX_WORKERS]",
+ " [MAX_MEMORY posbytes | MAX_MEMORY sizestr | NO MAX_MEMORY]
[MAX_WORKERS poscount | NO MAX_WORKERS]",
"ident",
"See also
https://www.monetdb.org/documentation/user-guide/sql-manual/data-definition/privileges/"},
{"ANALYZE",
@@ -252,7 +252,7 @@ SQLhelp sqlhelp1[] = {
{"CREATE USER",
"Create a new database user",
"CREATE USER ident WITH [ENCRYPTED | UNENCRYPTED] PASSWORD string NAME
string [SCHEMA ident] [SCHEMA PATH string]\n"
- "[MAX_MEMORY posbytes | NO MAX_MEMORY] [MAX_WORKERS poscount | NO
MAX_WORKERS]\n"
+ "[MAX_MEMORY posbytes | MAX_MEMORY sizestr | NO MAX_MEMORY]
[MAX_WORKERS poscount | NO MAX_WORKERS]\n"
"[OPTIMIZER string] [DEFAULT ROLE ident]",
"ident",
"See also
https://www.monetdb.org/documentation/user-guide/sql-manual/data-definition/privileges/"},
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
@@ -14,10 +14,8 @@ import os
import re
import subprocess
import sys
-import threading
-sys.path.append(os.environ.get('TSTSRCDIR','.'))
-import tlstester
+from MonetDBtesting.tlstester import TLSTesterClient
level = logging.WARNING
# if sys.platform == 'win32':
@@ -27,45 +25,20 @@ if '-v' in sys.argv:
#level = logging.DEBUG
logging.basicConfig(level=level)
+# A tmpdir to write certificates to
tgtdir = os.environ['TSTTRGDIR']
assert os.path.isdir(tgtdir)
+scratchdir = os.path.join(tgtdir, "scratch")
+logging.debug(f"scratchdir={scratchdir}")
-hostnames = ['localhost']
-# Generate certificates and write them to the scratch dir
-# Write them to the scratch dir for inspection by the user.
-certs = tlstester.Certs(hostnames)
-certsdir = os.path.join(tgtdir, "certs")
-try:
- os.mkdir(certsdir)
-except FileExistsError:
- pass
-count = 0
-for name, content in certs.all().items():
- with open(os.path.join(certsdir, name), "wb") as a:
- a.write(content)
- count += 1
-logging.debug(f"Wrote {count} files to {certsdir}")
+tlstester = TLSTesterClient(scratchdir)
+
def certpath(name):
- return os.path.join(certsdir, name)
-def certbytes(name):
- filename = certpath(name)
- with open(filename, 'rb') as f:
- return f.read()
-
-# Start the worker threads
-
-server = tlstester.TLSTester(
- certs=certs,
- listen_addr='127.0.0.1',
- preassigned=dict(),
- sequential=False,
- hostnames=hostnames)
-server_thread = threading.Thread(target=server.serve_forever, daemon=True)
-server_thread.start()
+ return tlstester.download(name)
def attempt(experiment: str, portname: str, expected_error_regex: str,
tls=True, host='localhost', **params):
- port = server.get_port(portname)
+ port = tlstester.get_port(portname)
scheme = 'monetdbs' if tls else 'monetdb'
url = f"{scheme}://{host}:{port}/demo"
if params:
@@ -197,7 +170,7 @@ attempt('connect_server_name', 'sni', No
# Connect to port 'server1' over TLS, with certhash set to a prefix of the hash
# of the server certificate in DER form. Have a succesful MAPI exchange.
-server1hash = sha256(certs.get_file('server1.der')).hexdigest()
+server1hash = sha256(tlstester.fetch('server1.der')).hexdigest()
attempt('connect_right_hash', 'server1', None, certhash='sha256:' +
server1hash[:6])
# connect_wrong_hash
@@ -218,7 +191,7 @@ attempt('connect_wrong_hash', 'server1',
# Connect to port 'server1' over TLS, with certhash set to a prefix of the hash
# of the CA1 certificate in DER form. This should fail.
-ca1hash = sha256(certs.get_file('ca1.der')).hexdigest()
+ca1hash = sha256(tlstester.fetch('ca1.der')).hexdigest()
attempt('connect_ca_hash', 'server1', "does not match certhash",
certhash='sha256:' + ca1hash[:6])
diff --git a/clients/odbc/driver/ODBCError.c b/clients/odbc/driver/ODBCError.c
--- a/clients/odbc/driver/ODBCError.c
+++ b/clients/odbc/driver/ODBCError.c
@@ -373,27 +373,6 @@ appendODBCError(ODBCError **head, ODBCEr
}
-#if 0 /* unused */
-/*
- * Prepends a valid ODBCError object 'err' to the front of the list
- * of a valid ODBCError object 'head' and return the new head.
- *
- * Precondition: both head and err must be valid (non NULL)
- * Returns: the new head (which is the same as the prepended 'err').
- */
-void
-prependODBCError(ODBCError **head, ODBCError *err)
-{
- assert(head);
- assert(err);
- assert(err->next == NULL);
-
- err->next = *head;
- *head = err;
-}
-#endif
-
-
/*
* Frees the ODBCError object including its linked ODBCError objects.
*
diff --git a/clients/odbc/driver/ODBCError.h b/clients/odbc/driver/ODBCError.h
--- a/clients/odbc/driver/ODBCError.h
+++ b/clients/odbc/driver/ODBCError.h
@@ -110,18 +110,6 @@ int getErrorRecCount(ODBCError *error);
void appendODBCError(ODBCError **head, ODBCError *err);
-#if 0 /* unused */
-/*
- * Prepends a valid ODBCError object 'this' to the front of the list
- * of a valid ODBCError object 'head' and return the new head.
- *
- * Precondition: both head and this must be valid (non NULL)
- * Returns: the new head (which is the same as the prepended 'this').
- */
-void prependODBCError(ODBCError **head, ODBCError *err);
-#endif
-
-
/*
* Frees the ODBCError object including its linked ODBCError objects.
*
diff --git a/clients/odbc/driver/SQLConnect.c b/clients/odbc/driver/SQLConnect.c
--- a/clients/odbc/driver/SQLConnect.c
+++ b/clients/odbc/driver/SQLConnect.c
@@ -487,8 +487,12 @@ MNDBConnectSettings(ODBCDbc *dbc, const
mapi_reconnect(mid);
}
if (mid == NULL || mapi_error(mid)) {
- const char *error_state = "08001";
+ const char *error_state;
const char *error_explanation = mid ? mapi_error_str(mid) :
NULL;
+ if (error_explanation && strncmp(error_explanation,
"InvalidCredentialsException:", 28) == 0)
+ error_state = "28000";
+ else
+ error_state = "08001";
addDbcError(dbc, error_state, error_explanation, 0);
if (mid)
mapi_destroy(mid);
diff --git a/clients/odbc/samples/CMakeLists.txt
b/clients/odbc/samples/CMakeLists.txt
--- a/clients/odbc/samples/CMakeLists.txt
+++ b/clients/odbc/samples/CMakeLists.txt
@@ -26,17 +26,9 @@ target_link_libraries(arraytest
PRIVATE
ODBC::ODBC)
-add_executable(odbcconnect
- odbcconnect.c)
-
-target_link_libraries(odbcconnect
- PRIVATE
- ODBC::ODBC)
-
install(TARGETS
odbcsample1
arraytest
- odbcconnect
RUNTIME
DESTINATION
${CMAKE_INSTALL_BINDIR}
@@ -46,7 +38,6 @@ if(WIN32)
install(FILES
$<TARGET_PDB_FILE:odbcsample1>
$<TARGET_PDB_FILE:arraytest>
- $<TARGET_PDB_FILE:odbcconnect>
DESTINATION ${CMAKE_INSTALL_BINDIR}
OPTIONAL)
endif()
diff --git a/clients/odbc/tests/CMakeLists.txt
b/clients/odbc/tests/CMakeLists.txt
--- a/clients/odbc/tests/CMakeLists.txt
+++ b/clients/odbc/tests/CMakeLists.txt
@@ -39,11 +39,19 @@ target_link_libraries(ODBCtester
PRIVATE
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]