Changeset: ad6f5c353f46 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ad6f5c353f46
Modified Files:
        clients/Tests/MAL-signatures.stable.out
        clients/Tests/MAL-signatures.stable.out.int128
        clients/Tests/exports.stable.out
        gdk/CMakeLists.txt
        gdk/gdk_string.c
        monetdb5/modules/atoms/str.c
        monetdb5/modules/mal/CMakeLists.txt
        monetdb5/modules/mal/batcalc.c
        monetdb5/modules/mal/calc.c
        monetdb5/optimizer/CMakeLists.txt
        monetdb5/optimizer/opt_mergetable.c
        sql/backends/monet5/CMakeLists.txt
        sql/backends/monet5/UDF/capi/capi.c
        sql/backends/monet5/rel_bin.c
        sql/backends/monet5/sql.c
        sql/backends/monet5/sql_scenario.c
        sql/backends/monet5/sql_upgrades.c
        sql/backends/monet5/vaults/fits/fits.c
        sql/backends/monet5/vaults/netcdf/netcdf.c
        sql/backends/monet5/vaults/shp/shp.c
        sql/backends/monet5/wlr.c
        sql/common/sql_types.c
        sql/server/rel_optimizer.c
        sql/server/sql_parser.y
        sql/storage/sql_storage.h
        sql/test/emptydb/Tests/check.stable.out
        sql/test/emptydb/Tests/check.stable.out.32bit
        sql/test/emptydb/Tests/check.stable.out.int128
        sql/test/miscellaneous/Tests/groupby_error.stable.out
        sql/test/sys-schema/Tests/systemfunctions.stable.out
        sql/test/sys-schema/Tests/systemfunctions.stable.out.int128
        tools/monetdbe/monetdbe.c
Branch: unlock
Log Message:

merged with default


diffs (truncated from 159057 to 300 lines):

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
@@ -878,7 +878,7 @@ str MCsuspendClient(int id);
 int MCvalid(Client c);
 void MPresetProfiler(stream *fdout);
 char *MSP_locate_sqlscript(const char *mod_name, bit recurse);
-str MSinitClientPrg(Client cntxt, str mod, str nme);
+str MSinitClientPrg(Client cntxt, const char *mod, const char *nme);
 void MSresetInstructions(MalBlkPtr mb, int start);
 void MSresetVariables(Client cntxt, MalBlkPtr mb, MalStkPtr glb, int start);
 void MSscheduleClient(str command, str challenge, bstream *fin, stream *fout, 
protocol_version protocol, size_t blocksize);
@@ -1004,7 +1004,6 @@ str SERVERsuspend(void *ret);
 str SERVERtrace(void *ret, int *mid, int *flag);
 BUN SQLload_file(Client cntxt, Tablet *as, bstream *b, stream *out, const char 
*csep, const char *rsep, char quote, lng skip, lng maxrow, int best, bool 
from_stdin, const char *tabnam, bool escape);
 str STRBytes(int *res, const str *arg1);
-str STRConcat(str *res, const str *val1, const str *val2);
 str STRFromWChr(str *res, const int *at);
 str STRLength(int *res, const str *arg1);
 str STRLower(str *res, const str *arg1);
diff --git a/clients/examples/C/CMakeLists.txt 
b/clients/examples/C/CMakeLists.txt
--- a/clients/examples/C/CMakeLists.txt
+++ b/clients/examples/C/CMakeLists.txt
@@ -40,7 +40,7 @@ if(TESTING)
   add_executable(streamcat
     streamcat.c)
 
-       target_link_libraries(streamcat
+  target_link_libraries(streamcat
     PRIVATE
     monetdb_config_header
     stream)
diff --git a/clients/mapiclient/CMakeLists.txt 
b/clients/mapiclient/CMakeLists.txt
--- a/clients/mapiclient/CMakeLists.txt
+++ b/clients/mapiclient/CMakeLists.txt
@@ -17,16 +17,12 @@ target_sources(mcutil
   PRIVATE
   dump.c
   dotmonetdb.c
-  dotmonetdb.h
-  eventparser.c
-  eventparser.h)
+  dotmonetdb.h)
 
 target_link_libraries(mcutil
   PRIVATE
   monetdb_config_header
-  mutils
-  mcrypt
-  moptions
+  mstring
   mapi
   stream)
 
@@ -40,15 +36,21 @@ target_sources(mclient
   mhelp.c
   mhelp.h)
 
+target_include_directories(mclient
+  PRIVATE
+  $<$<PLATFORM_ID:Windows>:${HAVE_GETOPT_H}>)
+
 target_link_libraries(mclient
   PRIVATE
   monetdb_config_header
   mcutil
   mprompt
   moptions
+  mutils
   mapi
   stream
   $<$<BOOL:${READLINE_FOUND}>:Readline::Readline>
+  $<$<BOOL:${Iconv_FOUND}>:Iconv::Iconv>
   $<$<PLATFORM_ID:Windows>:${GETOPT_LIB}>)
 
 add_executable(msqldump)
@@ -58,11 +60,16 @@ target_sources(msqldump
   msqldump.c
   msqldump.h)
 
+target_include_directories(msqldump
+  PRIVATE
+  $<$<PLATFORM_ID:Windows>:${HAVE_GETOPT_H}>)
+
 target_link_libraries(msqldump
   PRIVATE
   monetdb_config_header
   mcutil
   moptions
+  mutils
   mapi
   stream
   mprompt
@@ -72,7 +79,13 @@ add_executable(stethoscope)
 
 target_sources(stethoscope
   PRIVATE
-  stethoscope.c)
+  stethoscope.c
+  eventparser.c
+  eventparser.h)
+
+target_include_directories(stethoscope
+  PRIVATE
+  $<$<PLATFORM_ID:Windows>:${HAVE_GETOPT_H}>)
 
 target_link_libraries(stethoscope
   PRIVATE
diff --git a/clients/mapiclient/dump.c b/clients/mapiclient/dump.c
--- a/clients/mapiclient/dump.c
+++ b/clients/mapiclient/dump.c
@@ -776,7 +776,7 @@ dump_type(Mapi mid, stream *toConsole, c
                        space = mnstr_printf(toConsole, "INTERVAL MONTH");
                else
                        fprintf(stderr, "Internal error: unrecognized month 
interval %s\n", c_type_digits);
-       } else if (strcmp(c_type, "sec_interval") == 0) {
+       } else if (strlen(c_type) > 4 && strcmp(c_type+3, "_interval") == 0) {
                if (strcmp(c_type_digits, "4") == 0)
                        space = mnstr_printf(toConsole, "INTERVAL DAY");
                else if (strcmp(c_type_digits, "5") == 0)
@@ -1777,7 +1777,7 @@ dump_table_data(Mapi mid, const char *sc
                                mnstr_printf(toConsole, "NULL");
                        else if (useInserts) {
                                const char *tp = mapi_get_type(hdl, i);
-                               if (strcmp(tp, "sec_interval") == 0) {
+                               if (strlen(tp) > 4 && strcmp(tp+3, "_interval") 
== 0) {
                                        const char *p = strchr(s, '.');
                                        if (p == NULL)
                                                p = s + strlen(s);
diff --git a/clients/mapiclient/mhelp.c b/clients/mapiclient/mhelp.c
--- a/clients/mapiclient/mhelp.c
+++ b/clients/mapiclient/mhelp.c
@@ -524,9 +524,9 @@ SQLhelp sqlhelp1[] = {
         NULL},
        {"START TRANSACTION",
         "Change transaction mode from auto-commit to user controlled 
commit/rollback",
-        "{ START | BEGIN } TRANSACTION transactionmode",
+        "{ START | BEGIN } TRANSACTION [ transactionmode ]",
         "transactionmode",
-        "See also 
https://www.monetdb.org/Documentation/Manuals/SQLreference/Transactions"},
+        "See also 
https://www.monetdb.org/Documentation/SQLreference/Transactions"},
        {"TABLE JOINS",
         "",
         "'(' joined_table ') |\n"
diff --git a/clients/mapilib/monetdb-mapi.pc.in 
b/clients/mapilib/monetdb-mapi.pc.in
--- a/clients/mapilib/monetdb-mapi.pc.in
+++ b/clients/mapilib/monetdb-mapi.pc.in
@@ -6,8 +6,9 @@
 
 Name: monetdb-mapi
 Description: MonetDB MAPI C-client libary
+URL: https://www.monetdb.org/
 Version: @MONETDB_VERSION@
-Requires: monetdb-stream openssl
+Requires.private: monetdb-stream = @MONETDB_VERSION@ openssl
 
 Libs: -L@CMAKE_INSTALL_FULL_LIBDIR@ -lmapi
 Cflags: -I@CMAKE_INSTALL_FULL_INCLUDEDIR@/monetdb
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
@@ -106,6 +106,8 @@ target_sources(MonetODBC
   ODBC.syms)
 
 target_include_directories(MonetODBC
+  PRIVATE
+  $<$<BOOL:${ODBC_FOUND}>:${ODBC_INCLUDE_DIR}>
   PUBLIC
   $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
   $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/monetdb>)
@@ -118,8 +120,7 @@ target_link_libraries(MonetODBC
   PRIVATE
   monetdb_config_header
   mutils
-  mapi
-  ODBC::ODBC)
+  mapi)
 
 install(TARGETS
   MonetODBC
diff --git a/clients/odbc/driver/ODBCQueries.h 
b/clients/odbc/driver/ODBCQueries.h
--- a/clients/odbc/driver/ODBCQueries.h
+++ b/clients/odbc/driver/ODBCQueries.h
@@ -9,148 +9,115 @@
 /* this file contains parts of queries that are used in multiple
  * places */
 
-#define DATA_TYPE(t)                                   \
-               "case " #t ".type "                     \
-                    "when 'bigint' then %d "           \
-                    "when 'blob' then %d "             \
-                    "when 'boolean' then %d "          \
-                    "when 'char' then %d "             \
-                    "when 'clob' then %d "             \
-                    "when 'date' then %d "             \
-                    "when 'decimal' then %d "          \
-                    "when 'double' then %d "           \
-                    "when 'hugeint' then %d "          \
-                    "when 'int' then %d "              \
-                    "when 'month_interval' then "      \
-                         "case " #t ".type_digits "    \
-                              "when 1 then %d "        \
-                              "when 2 then %d "        \
-                              "when 3 then %d "        \
-                         "end "                        \
-                    "when 'real' then %d "             \
-                    "when 'sec_interval' then "        \
-                         "case " #t ".type_digits "    \
-                              "when 4 then %d "        \
-                              "when 5 then %d "        \
-                              "when 6 then %d "        \
-                              "when 7 then %d "        \
-                              "when 8 then %d "        \
-                              "when 9 then %d "        \
-                              "when 10 then %d "       \
-                              "when 11 then %d "       \
-                              "when 12 then %d "       \
-                              "when 13 then %d "       \
-                         "end "                        \
-                    "when 'smallint' then %d "         \
-                    "when 'time' then %d "             \
-                    "when 'timestamp' then %d "        \
-                    "when 'timestamptz' then %d "      \
-                    "when 'timetz' then %d "           \
-                    "when 'tinyint' then %d "          \
-                    "when 'varchar' then %d "          \
+#define DATA_TYPE(t)                                                   \
+               "case " #t ".type "                                             
\
+                    "when 'bigint' then %d "                   \
+                    "when 'blob' then %d "                             \
+                    "when 'boolean' then %d "                  \
+                    "when 'char' then %d "                             \
+                    "when 'clob' then %d "                             \
+                    "when 'date' then %d "                             \
+                    "when 'decimal' then %d "                  \
+                    "when 'double' then %d "                   \
+                    "when 'hugeint' then %d "                  \
+                    "when 'int' then %d "                              \
+                    "when 'month_interval' then "              \
+                         "case " #t ".type_digits "            \
+                              "when 1 then %d "                        \
+                              "when 2 then %d "                        \
+                              "when 3 then %d "                        \
+                         "end "                                                
        \
+                    "when 'real' then %d "                             \
+                    "when 'sec_interval' then "                \
+                         "case " #t ".type_digits "            \
+                              "when 4 then %d "                        \
+                              "when 5 then %d "                        \
+                              "when 6 then %d "                        \
+                              "when 7 then %d "                        \
+                              "when 8 then %d "                        \
+                              "when 9 then %d "                        \
+                              "when 10 then %d "                       \
+                              "when 11 then %d "                       \
+                              "when 12 then %d "                       \
+                              "when 13 then %d "                       \
+                         "end "                                                
        \
+                    "when 'smallint' then %d "                 \
+                    "when 'time' then %d "                             \
+                    "when 'timestamp' then %d "                \
+                    "when 'timestamptz' then %d "              \
+                    "when 'timetz' then %d "                   \
+                    "when 'tinyint' then %d "                  \
+                    "when 'varchar' then %d "                  \
                "end as data_type"
-#define DATA_TYPE_ARGS                                                 \
-               SQL_BIGINT, SQL_LONGVARBINARY, SQL_BIT, SQL_WCHAR,      \
-               SQL_WLONGVARCHAR, SQL_TYPE_DATE, SQL_DECIMAL,           \
-               SQL_DOUBLE, SQL_HUGEINT, SQL_INTEGER,                   \
-               SQL_INTERVAL_YEAR, SQL_INTERVAL_YEAR_TO_MONTH,          \
-               SQL_INTERVAL_MONTH, SQL_REAL, SQL_INTERVAL_DAY,         \
+#define DATA_TYPE_ARGS                                                         
                        \
+               SQL_BIGINT, SQL_LONGVARBINARY, SQL_BIT, SQL_WCHAR,              
\
+               SQL_WLONGVARCHAR, SQL_TYPE_DATE, SQL_DECIMAL,                   
\
+               SQL_DOUBLE, SQL_HUGEINT, SQL_INTEGER,                           
        \
+               SQL_INTERVAL_YEAR, SQL_INTERVAL_YEAR_TO_MONTH,                  
\
+               SQL_INTERVAL_MONTH, SQL_REAL, SQL_INTERVAL_DAY,                 
\
                SQL_INTERVAL_DAY_TO_HOUR, SQL_INTERVAL_DAY_TO_MINUTE,   \
-               SQL_INTERVAL_DAY_TO_SECOND, SQL_INTERVAL_HOUR,          \
-               SQL_INTERVAL_HOUR_TO_MINUTE,                            \
-               SQL_INTERVAL_HOUR_TO_SECOND, SQL_INTERVAL_MINUTE,       \
-               SQL_INTERVAL_MINUTE_TO_SECOND, SQL_INTERVAL_SECOND,     \
-               SQL_SMALLINT, SQL_TYPE_TIME, SQL_TYPE_TIMESTAMP,        \
-               SQL_TYPE_TIMESTAMP, SQL_TYPE_TIME, SQL_TINYINT,         \
+               SQL_INTERVAL_DAY_TO_SECOND, SQL_INTERVAL_HOUR,                  
\
+               SQL_INTERVAL_HOUR_TO_MINUTE,                                    
                \
+               SQL_INTERVAL_HOUR_TO_SECOND, SQL_INTERVAL_MINUTE,               
\
+               SQL_INTERVAL_MINUTE_TO_SECOND, SQL_INTERVAL_SECOND,             
\
+               SQL_SMALLINT, SQL_TYPE_TIME, SQL_TYPE_TIMESTAMP,                
\
+               SQL_TYPE_TIMESTAMP, SQL_TYPE_TIME, SQL_TINYINT,                 
\
                SQL_WVARCHAR
 
-#define TYPE_NAME(t)                                                   \
-               "case " #t ".type "                                     \
-                    "when 'bigint' then 'BIGINT' "                     \
-                    "when 'blob' then 'BINARY LARGE OBJECT' "          \
-                    "when 'boolean' then 'BOOLEAN' "                   \
-                    "when 'char' then 'CHARACTER' "                    \
-                    "when 'clob' then 'CHARACTER LARGE OBJECT' "       \
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to