Changeset: f9af3b6c69c8 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/f9af3b6c69c8
Modified Files:
        clients/Tests/exports.stable.out
        sql/test/concurrent/Tests/segments-corruption.SQL.py
Branch: copyintobinary
Log Message:

Merge 'default' into 'copyintobinary'


diffs (truncated from 183181 to 300 lines):

diff --git a/.hgtags b/.hgtags
--- a/.hgtags
+++ b/.hgtags
@@ -781,3 +781,5 @@ bdd04053973daa8a786a30e07b2bf1bd8aa6ebf1
 688ff09b2edc3d637f658f3e7ef3d5f07e3e8f9c Sep2022_1
 ea797696d5e8d8d550f21f09b98d3bcade1d001d Sep2022_3
 68c0e35095ad6a58766c6c1e77229d73148433e2 Sep2022_5
+47675351fec22d5d5dc81eec03dfa08f505afc99 Sep2022_7
+47675351fec22d5d5dc81eec03dfa08f505afc99 Sep2022_release
diff --git a/MonetDB.spec b/MonetDB.spec
--- a/MonetDB.spec
+++ b/MonetDB.spec
@@ -855,6 +855,9 @@ fi
 %endif
 
 %changelog
+* Fri Sep 23 2022 Sjoerd Mullender <[email protected]> - 11.45.7-20220923
+- Rebuilt.
+
 * Thu Sep 22 2022 Sjoerd Mullender <[email protected]> - 11.45.5-20220922
 - Rebuilt.
 
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
@@ -932,7 +932,6 @@ const char *decompressRef;
 int defConstant(MalBlkPtr mb, int type, ValPtr cst);
 const char *defineRef;
 void delArgument(InstrPtr p, int varid);
-void delName(const char *nme, size_t len);
 const char *deleteRef;
 void deleteSymbol(Module scope, Symbol prg);
 const char *deltaRef;
diff --git a/clients/mapiclient/mhelp.c b/clients/mapiclient/mhelp.c
--- a/clients/mapiclient/mhelp.c
+++ b/clients/mapiclient/mhelp.c
@@ -237,7 +237,7 @@ SQLhelp sqlhelp1[] = {
         NULL},
        {"CREATE USER",
         "Create a new database user",
-        "CREATE USER ident WITH [ENCRYPTED | UNENCRYPTED] PASSWORD string NAME 
string SCHEMA ident [SCHEMA PATH string]\n"
+        "CREATE USER ident WITH [ENCRYPTED | UNENCRYPTED] PASSWORD string NAME 
string [SCHEMA ident] [SCHEMA PATH string]\n"
         "[MAX_MEMORY poslng] [MAX_WORKERS posint] [OPTIMIZER string] [DEFAULT 
ROLE ident]",
         "ident",
         "See also 
https://www.monetdb.org/documentation/user-guide/sql-manual/data-definition/privileges/"},
diff --git a/cmake/monetdb-versions.cmake b/cmake/monetdb-versions.cmake
--- a/cmake/monetdb-versions.cmake
+++ b/cmake/monetdb-versions.cmake
@@ -52,7 +52,7 @@ set(MAPI_VERSION "${MAPI_VERSION_MAJOR}.
 # version of the MONETDB5 library (subdirectory monetdb5, not including extras 
or sql)
 set(MONETDB5_VERSION_MAJOR "33")
 set(MONETDB5_VERSION_MINOR "0")
-set(MONETDB5_VERSION_PATCH "0")
+set(MONETDB5_VERSION_PATCH "1")
 set(MONETDB5_VERSION 
"${MONETDB5_VERSION_MAJOR}.${MONETDB5_VERSION_MINOR}.${MONETDB5_VERSION_PATCH}")
 
 # version of the MONETDBE library (subdirectory tools/monetdbe)
diff --git a/common/stream/Tests/urlstream.py b/common/stream/Tests/urlstream.py
--- a/common/stream/Tests/urlstream.py
+++ b/common/stream/Tests/urlstream.py
@@ -10,18 +10,12 @@ import time
 
 OUTPUT = io.StringIO()
 
-def pickport():
-        # pick a free port number
-        s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
-        s.bind(('', 0))
-        port = s.getsockname()[1]
-        s.close()
-        return port
-
-
-def wait_for_server(port, timeout):
+def wait_for_server(timeout):
     deadline = time.time() + timeout
     while time.time() < deadline:
+        if port == 0:
+            time.sleep(0.25)
+            continue
         s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
         s.settimeout(0.1)
         try:
@@ -31,7 +25,8 @@ def wait_for_server(port, timeout):
             time.sleep(0.1)
         finally:
             s.close()
-    print(f'Warning: waited {timeout} seconds for the server to start but 
could still not connect', file=OUTPUT)
+    else:
+        print(f'Warning: waited {timeout} seconds for the server to start but 
could still not connect', file=OUTPUT)
 
 
 class Handler(http.server.BaseHTTPRequestHandler):
@@ -72,17 +67,19 @@ class Handler(http.server.BaseHTTPReques
             self.end_headers()
             self.wfile.write(b'NOT FOUND\n')
 
-def runserver(port):
-    addr = ('', port)
+def runserver():
+    global port
+    addr = ('', 0)
+    srv = http.server.HTTPServer(addr, Handler)
+    port = srv.server_port
     print(f"Listening on {port}", file=OUTPUT)
-    srv = http.server.HTTPServer(addr, Handler)
     srv.serve_forever()
 
 # Start the http server
-port = pickport()
-t = threading.Thread(target=lambda: runserver(port), daemon=True)
+port = 0
+t = threading.Thread(target=lambda: runserver(), daemon=True)
 t.start()
-wait_for_server(port, 5.0)
+wait_for_server(5.0)
 
 url = f'http://localhost:{port}'
 
diff --git a/debian/changelog b/debian/changelog
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+monetdb (11.45.7) unstable; urgency=low
+
+  * Rebuilt.
+
+ -- Sjoerd Mullender <[email protected]>  Fri, 23 Sep 2022 13:45:47 +0200
+
 monetdb (11.45.5) unstable; urgency=low
 
   * Rebuilt.
diff --git a/misc/packages/deb/changelog b/misc/packages/deb/changelog
--- a/misc/packages/deb/changelog
+++ b/misc/packages/deb/changelog
@@ -1,3 +1,9 @@
+monetdb (11.45.7) unstable; urgency=low
+
+  * Rebuilt.
+
+ -- Sjoerd Mullender <[email protected]>  Fri, 23 Sep 2022 13:45:47 +0200
+
 monetdb (11.45.5) unstable; urgency=low
 
   * Rebuilt.
diff --git a/misc/packages/rpm/changelog b/misc/packages/rpm/changelog
--- a/misc/packages/rpm/changelog
+++ b/misc/packages/rpm/changelog
@@ -1,3 +1,6 @@
+* Fri Sep 23 2022 Sjoerd Mullender <[email protected]> - 11.45.7-20220923
+- Rebuilt.
+
 * Thu Sep 22 2022 Sjoerd Mullender <[email protected]> - 11.45.5-20220922
 - Rebuilt.
 
diff --git a/monetdb5/mal/mal_authorize.c b/monetdb5/mal/mal_authorize.c
--- a/monetdb5/mal/mal_authorize.c
+++ b/monetdb5/mal/mal_authorize.c
@@ -50,8 +50,7 @@ static AUTHCallbackCntx authCallbackCntx
 
 void AUTHreset(void)
 {
-       if (vaultKey != NULL)
-               GDKfree(vaultKey);
+       GDKfree(vaultKey);
        vaultKey = NULL;
 }
 
@@ -414,8 +413,7 @@ AUTHunlockVault(const char *password)
        /* even though I think this function should be called only once, it
         * is not of real extra efforts to avoid a mem-leak if it is used
         * multiple times */
-       if (vaultKey != NULL)
-               GDKfree(vaultKey);
+       GDKfree(vaultKey);
 
        if ((vaultKey = GDKstrdup(password)) == NULL)
                throw(MAL, "unlockVault", SQLSTATE(HY013) MAL_MALLOC_FAIL " 
vault key");
@@ -502,7 +500,7 @@ AUTHcypherValue(str *ret, const char *va
        keylen = strlen(vaultKey);
 
        /* XOR all characters.  If we encounter a 'zero' char after the XOR
-        * operation, escape it with an 'one' char. */
+        * operation, escape it with a 'one' char. */
        for (; *s != '\0'; s++) {
                *w = *s ^ vaultKey[(s - value) % keylen];
                if (*w == '\0') {
diff --git a/monetdb5/mal/mal_embedded.c b/monetdb5/mal/mal_embedded.c
--- a/monetdb5/mal/mal_embedded.c
+++ b/monetdb5/mal/mal_embedded.c
@@ -53,7 +53,6 @@ malEmbeddedBoot(int workerlimit, int mem
                /* unlock the vault, first see if we can find the file which
                 * holds the secret */
                char secret[1024];
-               char *secretp = secret;
                FILE *secretf;
                size_t len;
 
@@ -78,7 +77,7 @@ malEmbeddedBoot(int workerlimit, int mem
                                        "(%zu), enlarge your vault key!\n", 
len);
                        }
                }
-               if ((msg = AUTHunlockVault(secretp)) != MAL_SUCCEED) {
+               if ((msg = AUTHunlockVault(secret)) != MAL_SUCCEED) {
                        /* don't show this as a crash */
                        return msg;
                }
diff --git a/monetdb5/mal/mal_instruction.h b/monetdb5/mal/mal_instruction.h
--- a/monetdb5/mal/mal_instruction.h
+++ b/monetdb5/mal/mal_instruction.h
@@ -29,11 +29,29 @@
  * arguments. Access to module and function name are cast in macros to
  * prepare for separate name space management. */
 #define getModuleId(P)         ((P)->modname)
-#define setModuleId(P,S)       (P)->modname= S
+#ifdef NDEBUG
+#define setModuleId(P,S)       do { (P)->modname = (S); } while (0)
+#else
+static inline void
+setModuleId(InstrPtr p, const char *s)
+{
+       assert(s == getName(s));
+       p->modname = s;
+}
+#endif
 #define setModuleScope(P,S)    do {(P)->modname= (S)==NULL?NULL: (S)->name;} 
while (0)
 
-#define getFunctionId(P)       (P)->fcnname
-#define setFunctionId(P,S)     (P)->fcnname= S
+#define getFunctionId(P)       ((P)->fcnname)
+#ifdef NDEBUG
+#define setFunctionId(P,S)     do { (P)->fcnname = (S); } while (0)
+#else
+static inline void
+setFunctionId(InstrPtr p, const char *s)
+{
+       assert(s == getName(s));
+       p->fcnname = s;
+}
+#endif
 #define garbageControl(P)      ((P)->gc & GARBAGECONTROL)
 
 #define getInstrPtr(M,I)       (M)->stmt[I]
diff --git a/monetdb5/mal/mal_namespace.c b/monetdb5/mal/mal_namespace.c
--- a/monetdb5/mal/mal_namespace.c
+++ b/monetdb5/mal/mal_namespace.c
@@ -138,31 +138,16 @@ static const char *findName(const char *
 }
 
 const char *getName(const char *nme) {
-       return findName(nme, strlen(nme), false);
+       return findName(nme, nme?strlen(nme):0, false);
 }
 
 const char *getNameLen(const char *nme, size_t len)
 {
        return findName(nme, len, false);
 }
-/*
- * Name deletion from the namespace is tricky, because there may
- * be multiple threads active on the structure. Moreover, the
- * symbol may be picked up by a concurrent thread and stored
- * somewhere.
- * To avoid all these problems, the namespace should become
- * private to each Client, but this would mean expensive look ups
- * deep into the kernel to access the context.
- */
-void delName(const char *nme, size_t len){
-       const char *n;
-       n= getNameLen(nme,len);
-       if( nme[0]==0 || n == 0) return ;
-       /*Namespace garbage collection not available yet */
-}
 
 const char *putName(const char *nme) {
-       return findName(nme, strlen(nme), true);
+       return findName(nme, nme?strlen(nme):0, true);
 }
 
 const char *putNameLen(const char *nme, size_t len)
diff --git a/monetdb5/mal/mal_namespace.h b/monetdb5/mal/mal_namespace.h
--- a/monetdb5/mal/mal_namespace.h
+++ b/monetdb5/mal/mal_namespace.h
@@ -14,6 +14,5 @@ mal_export const char *putName(const cha
 mal_export const char *putNameLen(const char *nme, size_t len);
 mal_export const char *getName(const char *nme);
 mal_export const char *getNameLen(const char *nme, size_t len);
-mal_export void delName(const char *nme, size_t len);
 
 #endif /* _MAL_NAMESPACE_H */
diff --git a/monetdb5/mal/mal_prelude.c b/monetdb5/mal/mal_prelude.c
--- a/monetdb5/mal/mal_prelude.c
+++ b/monetdb5/mal/mal_prelude.c
@@ -241,7 +241,7 @@ addFunctions(mel_func *fcn){
                /* keep the comment around, setting the static avoid freeing 
the string accidentally , saving on duplicate documentation in the code. */
                mb->statichelp = mb->help = fcn->comment;
 
-               sig= newInstructionArgs(mb, fcn->mod, fcn->fcn, fcn->argc + 
(fcn->retc == 0));
+               sig= newInstructionArgs(mb, mod, putName(fcn->fcn), fcn->argc + 
(fcn->retc == 0));
                sig->retc = 0;
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to