Changeset: eb3d246706ef for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/eb3d246706ef
Removed Files:
        sql/backends/monet5/sql.h
Modified Files:
        gdk/gdk_string.c
        monetdb_config.h.in
        sql/backends/monet5/CMakeLists.txt
        sql/backends/monet5/copy_io.c
        sql/backends/monet5/dict.c
        sql/backends/monet5/sql.c
        sql/backends/monet5/sql_bincopyconvert.c
        sql/backends/monet5/sql_monet_backend.h
        sql/backends/monet5/sql_scenario.h
        sql/backends/monet5/sql_statistics.h
        sql/server/rel_select.c
        sql/test/BugTracker-2026/Tests/All
        tools/monetdbe/monetdbe.c
Branch: pp_hashjoin
Log Message:

Merge with default branch.


diffs (truncated from 1044 to 300 lines):

diff --git a/clients/odbc/driver/CMakeLists.txt 
b/clients/odbc/driver/CMakeLists.txt
--- a/clients/odbc/driver/CMakeLists.txt
+++ b/clients/odbc/driver/CMakeLists.txt
@@ -130,7 +130,7 @@ target_link_libraries(MonetODBC
   monetdb_config_header
   mapi
   mutils
-  ${ODBCINST_LIBRARIES})
+  $<$<BOOL:${ODBCinst_FOUND}>:${ODBCINST_LIBRARIES}>)
 
 install(TARGETS
   MonetODBC
diff --git a/clients/odbc/driver/SQLColAttribute.c 
b/clients/odbc/driver/SQLColAttribute.c
--- a/clients/odbc/driver/SQLColAttribute.c
+++ b/clients/odbc/driver/SQLColAttribute.c
@@ -317,8 +317,15 @@ SQLColAttribute(SQLHSTMT StatementHandle
 
 SQLRETURN SQL_API
 SQLColAttributeA(SQLHSTMT StatementHandle,
+#ifdef _IODBCUNIX_H
+                /* iODBC, at least on Cygwin, uses SQLUSMALLINT */
+                SQLUSMALLINT ColumnNumber,
+                SQLUSMALLINT FieldIdentifier,
+#else
+                /* UNIXodbc and Windows ODBC use SQLSMALLINT */
                 SQLSMALLINT ColumnNumber,
                 SQLSMALLINT FieldIdentifier,
+#endif
                 SQLPOINTER CharacterAttributePtr,
                 SQLSMALLINT BufferLength,
                 SQLSMALLINT *StringLengthPtr,
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
@@ -40,7 +40,7 @@
 #endif
 
 #ifndef HAVE_SQLGETPRIVATEPROFILESTRING
-#define 
SQLGetPrivateProfileString(section,entry,default,buffer,bufferlen,filename)    
((int) strlcpy(buffer,default,bufferlen))
+#define 
SQLGetPrivateProfileString(section,entry,default,buffer,bufferlen,filename)    
((void) section, (int) strlcpy(buffer,default,bufferlen))
 #endif
 
 static SQLRETURN
diff --git a/clients/odbc/driver/SQLGetInfo.c b/clients/odbc/driver/SQLGetInfo.c
--- a/clients/odbc/driver/SQLGetInfo.c
+++ b/clients/odbc/driver/SQLGetInfo.c
@@ -223,7 +223,9 @@ MNDBGetInfo(ODBCDbc *dbc,
                        SQL_CVT_DECIMAL |
                        SQL_CVT_DOUBLE |
                        SQL_CVT_FLOAT |
+#ifdef SQL_CVT_GUID
                        SQL_CVT_GUID |
+#endif
                        SQL_CVT_INTEGER |
                        SQL_CVT_INTERVAL_DAY_TIME |
                        SQL_CVT_INTERVAL_YEAR_MONTH |
@@ -313,12 +315,14 @@ MNDBGetInfo(ODBCDbc *dbc,
                        SQL_CVT_TIMESTAMP |
                        SQL_CVT_VARCHAR;
                break;
+#ifdef SQL_CONVERT_GUID
        case SQL_CONVERT_GUID:
                nValue =SQL_CVT_CHAR |
                        SQL_CVT_GUID |
                        SQL_CVT_LONGVARCHAR |
                        SQL_CVT_VARCHAR;
                break;
+#endif
        case SQL_CONVERT_FUNCTIONS:
                nValue = SQL_FN_CVT_CAST | SQL_FN_CVT_CONVERT;
                break;
diff --git a/clients/odbc/tests/ODBCStmtAttr.c 
b/clients/odbc/tests/ODBCStmtAttr.c
--- a/clients/odbc/tests/ODBCStmtAttr.c
+++ b/clients/odbc/tests/ODBCStmtAttr.c
@@ -21,6 +21,15 @@
 #include <sql.h>
 #include <sqlext.h>
 
+#ifndef SIZEOF_LONG_INT
+#include <limits.h>
+#if LONG_MAX > INT_MAX
+#define SIZEOF_LONG_INT 8
+#else
+#define SIZEOF_LONG_INT 4
+#endif
+#endif
+
 static void
 prerr(SQLSMALLINT tpe, SQLHANDLE hnd, const char *func, const char *pref)
 {
diff --git a/clients/odbc/tests/ODBCgetInfo.c b/clients/odbc/tests/ODBCgetInfo.c
--- a/clients/odbc/tests/ODBCgetInfo.c
+++ b/clients/odbc/tests/ODBCgetInfo.c
@@ -212,6 +212,9 @@ const struct {
                .info = SQL_CONVERT_BIGINT,
                .name = "SQL_CONVERT_BIGINT",
                .type = INTEGER,
+#ifndef SQL_CVT_GUID
+#define SQL_CVT_GUID 0
+#endif
                .i = SQL_CVT_BIGINT | SQL_CVT_BIT | SQL_CVT_CHAR | 
SQL_CVT_DECIMAL | SQL_CVT_DOUBLE | SQL_CVT_FLOAT | SQL_CVT_INTEGER | 
SQL_CVT_INTERVAL_YEAR_MONTH | SQL_CVT_INTERVAL_DAY_TIME | SQL_CVT_LONGVARCHAR | 
SQL_CVT_NUMERIC | SQL_CVT_REAL | SQL_CVT_SMALLINT | SQL_CVT_TINYINT | 
SQL_CVT_VARCHAR,
        },
        {
diff --git a/cmake/Modules/FindSphinx.cmake b/cmake/Modules/FindSphinx.cmake
--- a/cmake/Modules/FindSphinx.cmake
+++ b/cmake/Modules/FindSphinx.cmake
@@ -8,17 +8,19 @@
 # For copyright information, see the file debian/copyright.
 #]]
 
-find_program(SPHINX_EXECUTABLE NAMES sphinx-build
-  HINTS
-  $ENV{SPHINX_DIR}
-  PATH_SUFFIXES bin
-  DOC "Sphinx documentation generator"
-)
- 
-include(FindPackageHandleStandardArgs)
- 
-find_package_handle_standard_args(Sphinx DEFAULT_MSG
-  SPHINX_EXECUTABLE
-)
- 
-mark_as_advanced(SPHINX_EXECUTABLE)
+if(NOT CYGWIN)
+  find_program(SPHINX_EXECUTABLE NAMES sphinx-build
+    HINTS
+    $ENV{SPHINX_DIR}
+    PATH_SUFFIXES bin
+    DOC "Sphinx documentation generator"
+    )
+
+  include(FindPackageHandleStandardArgs)
+
+  find_package_handle_standard_args(Sphinx DEFAULT_MSG
+    SPHINX_EXECUTABLE
+    )
+
+  mark_as_advanced(SPHINX_EXECUTABLE)
+endif()
diff --git a/common/stream/stream_internal.h b/common/stream/stream_internal.h
--- a/common/stream/stream_internal.h
+++ b/common/stream/stream_internal.h
@@ -172,10 +172,6 @@ struct stream {
        char errmsg[1024]; // avoid allocation on error. We don't have THAT 
many streams..
 };
 
-#ifdef __CYGWIN__
-#define __visibility__(a)
-#endif
-
 void mnstr_va_set_error(stream *s, mnstr_error_kind kind, const char *fmt, 
va_list ap)
        __attribute__((__visibility__("hidden")));
 
diff --git a/gdk/gdk_string.c b/gdk/gdk_string.c
--- a/gdk/gdk_string.c
+++ b/gdk/gdk_string.c
@@ -193,7 +193,7 @@ ustrPut(BAT *b, var_t *dst, const char *
        MT_rwlock_wrlock(&ustrbat->thashlock);
        MT_lock_set(&ustrbat->theaplock);
        assert(ustrbat->tvkey);
-       if (b->thash == (Hash *) 1)
+       if (ustrbat->thash == (Hash *) 1)
                (void) BATcheckhash_locked(ustrbat); /* load hash table */
 
        Heap *h = ustrbat->tvheap;
diff --git a/monetdb5/modules/mal/clients.c b/monetdb5/modules/mal/clients.c
--- a/monetdb5/modules/mal/clients.c
+++ b/monetdb5/modules/mal/clients.c
@@ -191,7 +191,7 @@ CLTquit(Client ctx, MalBlkPtr mb, MalStk
        /* A user can only quit a session under the same id */
        MT_lock_set(&mal_contextLock);
        if (mal_clients[idx].mode == FREECLIENT)
-               msg = createException(MAL, "clients.stop",
+               msg = createException(MAL, "clients.quit",
                                                          "Session not active 
anymore");
        else
                mal_clients[idx].mode = FINISHCLIENT;
diff --git a/monetdb5/modules/mal/sysmon.c b/monetdb5/modules/mal/sysmon.c
--- a/monetdb5/modules/mal/sysmon.c
+++ b/monetdb5/modules/mal/sysmon.c
@@ -30,7 +30,7 @@ SYSMONstatistics(Client cntxt, MalBlkPtr
        /* Temporary hack not allowing MAL clients (mclient -lmal)
           to use this function */
        if (cntxt->sqlcontext == NULL)
-               throw(MAL, "SYSMONstatistics",
+               throw(MAL, "sysmon.user_statistics",
                          SQLSTATE(42000) "Calling from a mclient -lmal.");
 
        BAT *user, *querycount, *totalticks, *started, *finished, *maxquery,
@@ -63,7 +63,7 @@ SYSMONstatistics(Client cntxt, MalBlkPtr
                BBPreclaim(finished);
                BBPreclaim(maxticks);
                BBPreclaim(maxquery);
-               throw(MAL, "SYSMONstatistics", SQLSTATE(HY013) MAL_MALLOC_FAIL);
+               throw(MAL, "sysmon.user_statistics", SQLSTATE(HY013) 
MAL_MALLOC_FAIL);
        }
 
        MT_lock_set(&mal_delayLock);
@@ -74,17 +74,17 @@ SYSMONstatistics(Client cntxt, MalBlkPtr
                        break;
 
                if (BUNappend(user, USRstats[i].username, false) != 
GDK_SUCCEED) {
-                       msg = createException(MAL, "SYSMONstatistics",
+                       msg = createException(MAL, "sysmon.user_statistics",
                                                                  "Failed to 
append 'user'");
                        goto bailout;
                }
                if (BUNappend(querycount, &USRstats[i].querycount, false) != 
GDK_SUCCEED) {
-                       msg = createException(MAL, "SYSMONstatistics",
+                       msg = createException(MAL, "sysmon.user_statistics",
                                                                  "Failed to 
append 'querycount'");
                        goto bailout;
                }
                if (BUNappend(totalticks, &USRstats[i].totalticks, false) != 
GDK_SUCCEED) {
-                       msg = createException(MAL, "SYSMONstatistics",
+                       msg = createException(MAL, "sysmon.user_statistics",
                                                                  "Failed to 
append 'totalticks'");
                        goto bailout;
                }
@@ -92,13 +92,13 @@ SYSMONstatistics(Client cntxt, MalBlkPtr
                if (USRstats[i].maxquery != 0) {
                        tsn = timestamp_fromtime(USRstats[i].started);
                        if (is_timestamp_nil(tsn)) {
-                               msg = createException(MAL, "SYSMONstatistics",
+                               msg = createException(MAL, 
"sysmon.user_statistics",
                                                                          
SQLSTATE(22003)
                                                                          
"failed to convert start time");
                                goto bailout;
                        }
                        if (BUNappend(started, &tsn, false) != GDK_SUCCEED) {
-                               msg = createException(MAL, "SYSMONstatistics",
+                               msg = createException(MAL, 
"sysmon.user_statistics",
                                                                          
"Failed to append 'started'");
                                goto bailout;
                        }
@@ -108,45 +108,45 @@ SYSMONstatistics(Client cntxt, MalBlkPtr
                        } else {
                                tsn = timestamp_fromtime(USRstats[i].finished);
                                if (is_timestamp_nil(tsn)) {
-                                       msg = createException(MAL, 
"SYSMONstatistics",
+                                       msg = createException(MAL, 
"sysmon.user_statistics",
                                                                                
  SQLSTATE(22003)
                                                                                
  "failed to convert finish time");
                                        goto bailout;
                                }
                        }
                        if (BUNappend(finished, &tsn, false) != GDK_SUCCEED) {
-                               msg = createException(MAL, "SYSMONstatistics",
+                               msg = createException(MAL, 
"sysmon.user_statistics",
                                                                          
"Failed to append 'finished'");
                                goto bailout;
                        }
                } else {
                        tsn = timestamp_nil;
                        if (BUNappend(started, &tsn, false) != GDK_SUCCEED) {
-                               msg = createException(MAL, "SYSMONstatistics",
+                               msg = createException(MAL, 
"sysmon.user_statistics",
                                                                          
"Failed to append 'started'");
                                goto bailout;
                        }
                        if (BUNappend(finished, &tsn, false) != GDK_SUCCEED) {
-                               msg = createException(MAL, "SYSMONstatistics",
+                               msg = createException(MAL, 
"sysmon.user_statistics",
                                                                          
"Failed to append 'finished'");
                                goto bailout;
                        }
                }
 
                if (BUNappend(maxticks, &USRstats[i].maxticks, false) != 
GDK_SUCCEED) {
-                       msg = createException(MAL, "SYSMONstatistics",
+                       msg = createException(MAL, "sysmon.user_statistics",
                                                                  "Failed to 
append 'maxticks'");
                        goto bailout;
                }
                if (USRstats[i].maxquery == 0) {
                        if (BUNappend(maxquery, "none", false) != GDK_SUCCEED) {
-                               msg = createException(MAL, "SYSMONstatistics",
+                               msg = createException(MAL, 
"sysmon.user_statistics",
                                                                          
"Failed to append 'maxquery' 1");
                                goto bailout;
                        }
                } else {
                        if (BUNappend(maxquery, USRstats[i].maxquery, false) != 
GDK_SUCCEED) {
-                               msg = createException(MAL, "SYSMONstatistics",
+                               msg = createException(MAL, 
"sysmon.user_statistics",
                                                                          
"Failed to append 'maxquery' 2");
                                goto bailout;
                        }
@@ -189,7 +189,7 @@ SYSMONqueue(Client cntxt, MalBlkPtr mb, 
        /* Temporary hack not allowing MAL clients (mclient -lmal)
           to use this function */
        if (cntxt->sqlcontext == NULL)
-               throw(MAL, "SYSMONqueue",
+               throw(MAL, "sysmon.queue",
                          SQLSTATE(42000) "Calling from a mclient -lmal.");
 
        bat *t = getArgReference_bat(stk, pci, 0),
@@ -239,7 +239,7 @@ SYSMONqueue(Client cntxt, MalBlkPtr mb, 
                BBPreclaim(finished);
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to