Changeset: 194e2e9cdf80 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/194e2e9cdf80
Modified Files:
        clients/Tests/MAL-signatures-hge.test
        clients/Tests/MAL-signatures.test
        clients/odbc/driver/SQLExecDirect.c
Branch: escape-sequences
Log Message:

merge with default


diffs (truncated from 830 to 300 lines):

diff --git a/.hgtags b/.hgtags
--- a/.hgtags
+++ b/.hgtags
@@ -788,3 +788,4 @@ 44e45c9a451f6afd933773094ec25723f713d3be
 43d4a717410d6f6692a16a878640fc7e0f248725 Jan2022_25
 43d4a717410d6f6692a16a878640fc7e0f248725 Jan2022_SP6_release
 5c50a4071c86d1621e20a885a51cc36f2f23eec4 Sep2022_9
+41ca60d96bd0198ca5d74937630a442a5fbaf1cd Sep2022_11
diff --git a/MonetDB.spec b/MonetDB.spec
--- a/MonetDB.spec
+++ b/MonetDB.spec
@@ -855,6 +855,11 @@ fi
 %endif
 
 %changelog
+* Mon Dec 05 2022 Sjoerd Mullender <[email protected]> - 11.45.11-20221205
+- Rebuilt.
+- GH#7342: column which datatype is double couldn't group or aggregation
+  in version 11.45.7
+
 * Mon Nov 28 2022 Sjoerd Mullender <[email protected]> - 11.45.9-20221128
 - Rebuilt.
 - GH#7330: Creating temporary table fails after reconnect
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
@@ -43895,11 +43895,6 @@ CLTsetPrintTimeout;
 Print running query every so many seconds.
 clients
 setquerytimeout
-unsafe pattern clients.setquerytimeout(X_0:bte, X_1:int):void 
-CLTqueryTimeout;
-(empty)
-clients
-setquerytimeout
 unsafe pattern clients.setquerytimeout(X_0:int):void 
 CLTqueryTimeout;
 (empty)
@@ -43909,22 +43904,12 @@ unsafe pattern clients.setquerytimeout(X
 CLTqueryTimeout;
 A query is aborted after q seconds (q=0 means run undisturbed).
 clients
-setquerytimeout
-unsafe pattern clients.setquerytimeout(X_0:sht, X_1:int):void 
-CLTqueryTimeout;
-(empty)
-clients
 setsession
 unsafe pattern clients.setsession(X_0:lng):void 
 CLTsetSessionTimeout;
 Abort a session after  n seconds.
 clients
 setsessiontimeout
-unsafe pattern clients.setsessiontimeout(X_0:bte, X_1:int):void 
-CLTsessionTimeout;
-(empty)
-clients
-setsessiontimeout
 unsafe pattern clients.setsessiontimeout(X_0:int):void 
 CLTsessionTimeout;
 (empty)
@@ -43934,11 +43919,6 @@ unsafe pattern clients.setsessiontimeout
 CLTsessionTimeout;
 Set the session timeout for a particulat session id
 clients
-setsessiontimeout
-unsafe pattern clients.setsessiontimeout(X_0:sht, X_1:int):void 
-CLTsessionTimeout;
-(empty)
-clients
 settimeout
 unsafe pattern clients.settimeout(X_0:lng):void 
 CLTsetTimeout;
@@ -43970,12 +43950,12 @@ CLTsha2sum;
 Return hex string representation of the SHA-2 hash with bits of the given 
string
 clients
 shutdown
-unsafe pattern clients.shutdown(X_0:int):str 
+unsafe pattern clients.shutdown(X_0:bte):str 
 CLTshutdown;
 (empty)
 clients
 shutdown
-unsafe pattern clients.shutdown(X_0:int, X_1:bit):str 
+unsafe pattern clients.shutdown(X_0:bte, X_1:bit):str 
 CLTshutdown;
 Close all other client connections. Return if it succeeds.@If forced is set 
then always stop the system the hard way
 clients
@@ -43985,20 +43965,10 @@ CLTstop;
 Stop the query execution at the next eligble statement.
 clients
 stopsession
-unsafe pattern clients.stopsession(X_0:bte):void 
-CLTstopSession;
-(empty)
-clients
-stopsession
 unsafe pattern clients.stopsession(X_0:int):void 
 CLTstopSession;
 Stop a particular session
 clients
-stopsession
-unsafe pattern clients.stopsession(X_0:sht):void 
-CLTstopSession;
-(empty)
-clients
 suspend
 unsafe pattern clients.suspend(X_0:int):void 
 CLTsuspend;
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
@@ -32390,11 +32390,6 @@ CLTsetPrintTimeout;
 Print running query every so many seconds.
 clients
 setquerytimeout
-unsafe pattern clients.setquerytimeout(X_0:bte, X_1:int):void 
-CLTqueryTimeout;
-(empty)
-clients
-setquerytimeout
 unsafe pattern clients.setquerytimeout(X_0:int):void 
 CLTqueryTimeout;
 (empty)
@@ -32404,22 +32399,12 @@ unsafe pattern clients.setquerytimeout(X
 CLTqueryTimeout;
 A query is aborted after q seconds (q=0 means run undisturbed).
 clients
-setquerytimeout
-unsafe pattern clients.setquerytimeout(X_0:sht, X_1:int):void 
-CLTqueryTimeout;
-(empty)
-clients
 setsession
 unsafe pattern clients.setsession(X_0:lng):void 
 CLTsetSessionTimeout;
 Abort a session after  n seconds.
 clients
 setsessiontimeout
-unsafe pattern clients.setsessiontimeout(X_0:bte, X_1:int):void 
-CLTsessionTimeout;
-(empty)
-clients
-setsessiontimeout
 unsafe pattern clients.setsessiontimeout(X_0:int):void 
 CLTsessionTimeout;
 (empty)
@@ -32429,11 +32414,6 @@ unsafe pattern clients.setsessiontimeout
 CLTsessionTimeout;
 Set the session timeout for a particulat session id
 clients
-setsessiontimeout
-unsafe pattern clients.setsessiontimeout(X_0:sht, X_1:int):void 
-CLTsessionTimeout;
-(empty)
-clients
 settimeout
 unsafe pattern clients.settimeout(X_0:lng):void 
 CLTsetTimeout;
@@ -32465,12 +32445,12 @@ CLTsha2sum;
 Return hex string representation of the SHA-2 hash with bits of the given 
string
 clients
 shutdown
-unsafe pattern clients.shutdown(X_0:int):str 
+unsafe pattern clients.shutdown(X_0:bte):str 
 CLTshutdown;
 (empty)
 clients
 shutdown
-unsafe pattern clients.shutdown(X_0:int, X_1:bit):str 
+unsafe pattern clients.shutdown(X_0:bte, X_1:bit):str 
 CLTshutdown;
 Close all other client connections. Return if it succeeds.@If forced is set 
then always stop the system the hard way
 clients
@@ -32480,20 +32460,10 @@ CLTstop;
 Stop the query execution at the next eligble statement.
 clients
 stopsession
-unsafe pattern clients.stopsession(X_0:bte):void 
-CLTstopSession;
-(empty)
-clients
-stopsession
 unsafe pattern clients.stopsession(X_0:int):void 
 CLTstopSession;
 Stop a particular session
 clients
-stopsession
-unsafe pattern clients.stopsession(X_0:sht):void 
-CLTstopSession;
-(empty)
-clients
 suspend
 unsafe pattern clients.suspend(X_0:int):void 
 CLTsuspend;
diff --git a/clients/odbc/driver/SQLExecDirect.c 
b/clients/odbc/driver/SQLExecDirect.c
--- a/clients/odbc/driver/SQLExecDirect.c
+++ b/clients/odbc/driver/SQLExecDirect.c
@@ -48,7 +48,9 @@ ODBCExecDirect(ODBCStmt *stmt, const SQL
 
        if (stmt->qtimeout != stmt->Dbc->qtimeout) {
                char buf[48];
-               snprintf(buf, sizeof(buf), "call sys.settimeout(%" PRIu64 ")",
+               snprintf(buf, sizeof(buf), "call sys.%s(%" PRIu64 ")",
+                        (stmt->Dbc->major == 11 && stmt->Dbc->minor >= 37)
+                        ? "setquerytimeout" : "settimeout",
                         (uint64_t) stmt->qtimeout);
                if (mapi_query_handle(hdl, buf) == MOK)
                        stmt->Dbc->qtimeout = stmt->qtimeout;
diff --git a/clients/odbc/driver/SQLExecute.c b/clients/odbc/driver/SQLExecute.c
--- a/clients/odbc/driver/SQLExecute.c
+++ b/clients/odbc/driver/SQLExecute.c
@@ -448,7 +448,9 @@ MNDBExecute(ODBCStmt *stmt)
                return SQL_ERROR;
        }
        if (stmt->qtimeout != stmt->Dbc->qtimeout) {
-               snprintf(query, querylen, "call sys.settimeout(%" PRIu64 ")",
+               snprintf(query, querylen, "call sys.%s(%" PRIu64 ")",
+                        (stmt->Dbc->major == 11 && stmt->Dbc->minor >= 37)
+                        ? "setquerytimeout" : "settimeout",
                         (uint64_t) stmt->qtimeout);
                if (mapi_query_handle(hdl, query) == MOK)
                        stmt->Dbc->qtimeout = stmt->qtimeout;
diff --git a/cmake/monetdb-versions.cmake b/cmake/monetdb-versions.cmake
--- a/cmake/monetdb-versions.cmake
+++ b/cmake/monetdb-versions.cmake
@@ -40,7 +40,7 @@ set(MONETDB_VERSION "${MONETDB_VERSION_M
 # common/options and common/utils)
 set(GDK_VERSION_MAJOR "26")
 set(GDK_VERSION_MINOR "0")
-set(GDK_VERSION_PATCH "2")
+set(GDK_VERSION_PATCH "3")
 set(GDK_VERSION 
"${GDK_VERSION_MAJOR}.${GDK_VERSION_MINOR}.${GDK_VERSION_PATCH}")
 
 # version of the MAPI library (subdirectory clients/mapilib)
@@ -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 "2")
+set(MONETDB5_VERSION_PATCH "3")
 set(MONETDB5_VERSION 
"${MONETDB5_VERSION_MAJOR}.${MONETDB5_VERSION_MINOR}.${MONETDB5_VERSION_PATCH}")
 
 # version of the MONETDBE library (subdirectory tools/monetdbe)
@@ -70,5 +70,5 @@ set(STREAM_VERSION "${STREAM_VERSION_MAJ
 # version of the SQL library (subdirectory sql)
 set(SQL_VERSION_MAJOR "13")
 set(SQL_VERSION_MINOR "0")
-set(SQL_VERSION_PATCH "2")
+set(SQL_VERSION_PATCH "3")
 set(SQL_VERSION 
"${SQL_VERSION_MAJOR}.${SQL_VERSION_MINOR}.${SQL_VERSION_PATCH}")
diff --git a/debian/changelog b/debian/changelog
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+monetdb (11.45.11) unstable; urgency=low
+
+  * Rebuilt.
+  * GH#7342: column which datatype is double couldn't group or aggregation
+    in version 11.45.7
+
+ -- Sjoerd Mullender <[email protected]>  Mon, 05 Dec 2022 14:07:46 +0100
+
 monetdb (11.45.9) unstable; urgency=low
 
   * Rebuilt.
diff --git a/gdk/gdk_heap.c b/gdk/gdk_heap.c
--- a/gdk/gdk_heap.c
+++ b/gdk/gdk_heap.c
@@ -180,8 +180,16 @@ HEAPalloc(Heap *h, size_t nitems, size_t
        h->newstorage = h->storage;
        if (h->farmid == 1) {
                QryCtx *qc = MT_thread_get_qry_ctx();
-               if (qc)
-                       ATOMIC_ADD(&qc->datasize, h->size);
+               ATOMIC_BASE_TYPE sz = 0;
+               if (qc) {
+                       sz = ATOMIC_ADD(&qc->datasize, h->size);
+                       sz += h->size;
+                       if (qc->maxmem > 0 && sz > qc->maxmem) {
+                               HEAPfree(h, true);
+                               GDKerror("Query using too much memory.\n");
+                               return GDK_FAIL;
+                       }
+               }
        }
        return GDK_SUCCEED;
 }
@@ -249,8 +257,15 @@ HEAPextend(Heap *h, size_t size, bool ma
                        h->base = p;
                        if (h->farmid == 1) {
                                QryCtx *qc = MT_thread_get_qry_ctx();
-                               if (qc)
-                                       ATOMIC_ADD(&qc->datasize, size - osize);
+                               ATOMIC_BASE_TYPE sz = 0;
+                               if (qc) {
+                                       sz = ATOMIC_ADD(&qc->datasize, size - 
osize);
+                                       sz += size - osize;
+                                       if (qc->maxmem > 0 && sz > qc->maxmem) {
+                                               GDKerror("Query using too much 
memory.\n");
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to