Changeset: b37e90414f7e for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b37e90414f7e Added Files: sql/test/BugTracker-2017/Tests/cleanup_statistics.Bug-6439.sql sql/test/BugTracker-2017/Tests/cleanup_statistics.Bug-6439.stable.err sql/test/BugTracker-2017/Tests/cleanup_statistics.Bug-6439.stable.out sql/test/BugTracker-2017/Tests/crash-in-topn.Bug-6478.sql sql/test/BugTracker-2017/Tests/crash-in-topn.Bug-6478.stable.err sql/test/BugTracker-2017/Tests/crash-in-topn.Bug-6478.stable.out sql/test/BugTracker-2017/Tests/sqlsmith.Bug-6477.sql sql/test/BugTracker-2017/Tests/sqlsmith.Bug-6477.stable.err sql/test/BugTracker-2017/Tests/sqlsmith.Bug-6477.stable.out sql/test/BugTracker-2017/Tests/update_on_procedure.Bug-6479.sql sql/test/BugTracker-2017/Tests/update_on_procedure.Bug-6479.stable.err sql/test/BugTracker-2017/Tests/update_on_procedure.Bug-6479.stable.out sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.32bit sql/test/emptydb-upgrade/Tests/upgrade.stable.out.32bit sql/test/mergetables/Tests/sqlsmith.Bug-6472.sql sql/test/mergetables/Tests/sqlsmith.Bug-6472.stable.err sql/test/mergetables/Tests/sqlsmith.Bug-6472.stable.out sql/test/pg_regress/Tests/numeric.stable.out.FreeBSD.int128 sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out.32bit sql/test/testdb-upgrade/Tests/upgrade.stable.out.32bit Removed Files: sql/test/pg_regress/Tests/float8.stable.err.Windows Modified Files: .hgignore NT/monetdb_config.h.in clients/Tests/MAL-signatures.stable.out clients/Tests/MAL-signatures.stable.out.int128 clients/Tests/exports.stable.out clients/mapiclient/dotmonetdb.c clients/mapiclient/dump.c clients/mapiclient/mclient.c clients/mapiclient/mhelp.c clients/mapiclient/mhelp.h clients/mapiclient/msqldump.h clients/mapilib/mapi.c clients/mapilib/mapi.h clients/odbc/driver/ODBCConvert.c clients/odbc/driver/SQLBrowseConnect.c clients/odbc/driver/SQLConnect.c clients/odbc/driver/SQLFetch.c clients/odbc/setup/drvcfg.c clients/odbc/winsetup/install.c common/stream/ChangeLog common/stream/stream.c common/stream/stream.h common/utils/mcrypt.c common/utils/msabaoth.c common/utils/mutils.c configure.ag gdk/gdk.h gdk/gdk_align.c gdk/gdk_atoms.c gdk/gdk_atoms.h gdk/gdk_bat.c gdk/gdk_batop.c gdk/gdk_bbp.c gdk/gdk_firstn.c gdk/gdk_group.c gdk/gdk_hash.c gdk/gdk_hash.h gdk/gdk_heap.c gdk/gdk_imprints.c gdk/gdk_logger.c gdk/gdk_orderidx.c gdk/gdk_posix.h gdk/gdk_private.h gdk/gdk_project.c gdk/gdk_storage.c gdk/gdk_unique.c gdk/gdk_utils.c monetdb5/mal/mal_atom.c monetdb5/mal/mal_client.c monetdb5/mal/mal_import.c monetdb5/mal/mal_instruction.c monetdb5/mal/mal_interpreter.c monetdb5/mal/mal_readline.c monetdb5/mal/mal_resource.h monetdb5/mal/mal_session.c monetdb5/modules/atoms/inet.c monetdb5/modules/atoms/mtime.c monetdb5/modules/atoms/url.c monetdb5/modules/kernel/alarm.c monetdb5/modules/kernel/bat5.c monetdb5/modules/kernel/status.c monetdb5/modules/mal/bbp.c monetdb5/modules/mal/calc.c monetdb5/modules/mal/clients.c monetdb5/modules/mal/inspect.c monetdb5/modules/mal/language.c monetdb5/modules/mal/mal_io.c monetdb5/modules/mal/mal_mapi.c monetdb5/modules/mal/mdb.c monetdb5/modules/mal/orderidx.c monetdb5/modules/mal/pcre.c monetdb5/modules/mal/profiler.mal monetdb5/modules/mal/remote.c monetdb5/modules/mal/remote.h monetdb5/modules/mal/sabaoth.c monetdb5/modules/mal/tablet.c monetdb5/modules/mal/txtsim.h monetdb5/modules/mal/wlc.c monetdb5/optimizer/opt_support.c sql/backends/monet5/UDF/pyapi/convert_loops.h sql/backends/monet5/rel_bin.c sql/backends/monet5/sql.c sql/backends/monet5/sql_execute.c sql/backends/monet5/sql_gencode.c sql/backends/monet5/sql_result.c sql/backends/monet5/sql_result.h sql/backends/monet5/sql_scenario.c sql/backends/monet5/sql_statement.c sql/backends/monet5/sql_upgrades.c sql/backends/monet5/sql_user.c sql/backends/monet5/vaults/bam/Tests/query2.1.stable.out sql/backends/monet5/vaults/bam/Tests/query2.10.stable.out sql/backends/monet5/vaults/bam/Tests/query2.2.stable.out sql/backends/monet5/vaults/bam/Tests/query2.2.stable.out.int128 sql/backends/monet5/vaults/bam/bam_export.c sql/backends/monet5/vaults/bam/bam_wrapper.c sql/backends/monet5/vaults/vault.c sql/backends/monet5/wlr.c sql/common/sql_mem.c sql/common/sql_types.c sql/common/sql_types.h sql/include/sql_mem.h sql/server/rel_exp.c sql/server/rel_exp.h sql/server/rel_optimizer.c sql/server/rel_rel.c sql/server/rel_select.c sql/server/rel_semantic.c sql/server/sql_atom.c sql/server/sql_atom.h sql/server/sql_mvc.c sql/server/sql_mvc.h sql/storage/store.c sql/test/BugTracker-2012/Tests/currenttime.Bug-2781.SQL.py sql/test/BugTracker-2012/Tests/scalar_subquery_with_alias.Bug-3093.stable.out sql/test/BugTracker-2014/Tests/round-properties.Bug-3515.stable.out sql/test/BugTracker-2014/Tests/round.Bug-3542.stable.out.int128 sql/test/BugTracker-2016/Tests/nested-subquery-in-select.Bug-6125.stable.out sql/test/BugTracker-2017/Tests/All sql/test/BugTracker-2017/Tests/crash_on_count_div_count.Bug-6201.stable.out sql/test/BugTracker-2017/Tests/oidx-on-strings.Bug-6202.stable.err sql/test/BugTracker-2017/Tests/python_loader_clobbers_default_with_null.Bug-6464.stable.err sql/test/BugTracker-2017/Tests/python_loader_clobbers_default_with_null.Bug-6464.stable.out sql/test/Tests/marcin1.stable.out sql/test/Tests/round.stable.out sql/test/emptydb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.int128 sql/test/emptydb-upgrade-hge/Tests/upgrade.stable.out.int128 sql/test/emptydb-upgrade/Tests/upgrade.stable.out sql/test/emptydb-upgrade/Tests/upgrade.stable.out.int128 sql/test/mergetables/Tests/All sql/test/orderidx/Tests/oidx_all_types.stable.err sql/test/orderidx/Tests/oidx_all_types.stable.out sql/test/pg_regress/Tests/float8.stable.err sql/test/pg_regress/Tests/float8.stable.err.int128 sql/test/pg_regress/Tests/numeric.stable.err sql/test/pg_regress/Tests/numeric.stable.out.int128 sql/test/testdb-upgrade-chain-hge/Tests/upgrade.stable.out.int128 sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out.int128 sql/test/testdb-upgrade-hge/Tests/upgrade.stable.out.int128 sql/test/testdb-upgrade/Tests/upgrade.stable.out sql/test/testdb-upgrade/Tests/upgrade.stable.out.int128 testing/Mtest.py.in testing/difflib.c tools/merovingian/daemon/controlrunner.c tools/merovingian/daemon/forkmserver.c tools/merovingian/daemon/merovingian.c tools/merovingian/utils/database.c tools/merovingian/utils/utils.c Branch: data-vaults Log Message:
Merge with default diffs (truncated from 30630 to 300 lines): diff --git a/.hgignore b/.hgignore --- a/.hgignore +++ b/.hgignore @@ -80,7 +80,6 @@ NT/clients NT/common NT/gdk NT/geom -NT/inttypes.h NT/java NT/monetdb5 NT/monetdb_config.h diff --git a/NT/monetdb_config.h.in b/NT/monetdb_config.h.in --- a/NT/monetdb_config.h.in +++ b/NT/monetdb_config.h.in @@ -33,14 +33,12 @@ #define _CRT_SECURE_NO_DEPRECATE 1 #endif -#include <malloc.h> - +#include <stdlib.h> #if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC) /* In this case, malloc and friends are redefined in crtdbg.h to debug versions. We need to include stdlib.h and malloc.h first or else we get conflicting declarations. */ -#include <stdlib.h> #include <crtdbg.h> #endif @@ -51,9 +49,34 @@ #include <sys/types.h> #include <stdio.h> /* NULL, printf etc. */ -#include <stdlib.h> #include <errno.h> #include <stdarg.h> /* va_alist.. */ +#if !defined(_MSC_VER) || _MSC_VER >= 1800 +#include <inttypes.h> +#include <stdbool.h> +#else +#error old versions of Visual Studio are no longer supported +/* ... but this is how you might be able to do it (untested) */ +#if !defined(_MSC_VER) || _MSC_VER >= 1600 +/* old Visual Studio */ +#include <stdint.h> +#else +/* ancient Visual Studio */ +typedef unsigned char uint8_t; +typedef unsigned short uint16_t; +typedef unsigned int uint32_t; +typedef unsigned __int64 uint64_t; +typedef int64_t __int64; +typedef uint64_t unsigned __int64; +#endif +/* normally defined in inttypes.h */ +#define PRId64 "I64d" +#define PRIu64 "I64u" +/* normally defined in stdbool.h */ +#define true 1 +#define false 0 +#define __bool_true_false_are_defined 1 +#endif #include <assert.h> @@ -221,11 +244,6 @@ /* Define to 1 if you have the <ieeefp.h> header file. */ /* #undef HAVE_IEEEFP_H */ -/* Define to 1 if you have the <inttypes.h> header file. */ -#if !defined(_MSC_VER) || _MSC_VER >= 1800 -#define HAVE_INTTYPES_H 1 -#endif - /* Define to 1 if you have the <io.h> header file. */ #define HAVE_IO_H 1 @@ -331,9 +349,6 @@ /* Define to 1 if you have the `madvise' function. */ /* #undef HAVE_MADVISE */ -/* Define to 1 if you have the <malloc.h> header file. */ -#define HAVE_MALLOC_H 1 - /* Define to 1 if you have the <memory.h> header file. */ #define HAVE_MEMORY_H 1 @@ -639,9 +654,6 @@ /* Define to 1 if you have the <unistd.h> header file. */ #define HAVE_UNISTD_H 1 /* generate by the Makefile */ -/* Define if you have mallinfo */ -/* #undef HAVE_USEFUL_MALLINFO */ - /* Define if you have the LibUriParser library */ /* #undef HAVE_URIPARSER */ @@ -828,9 +840,6 @@ STACK_DIRECTION = 0 => direction of growth unknown */ /* #undef STACK_DIRECTION */ -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - /* read-only single-machine data */ #define SYSCONFDIR PREFIX "\\etc" @@ -999,29 +1008,13 @@ c99_snprintf(char *outBuf, size_t size, #define va_copy(x,y) ((x) = (y)) #endif -typedef unsigned char uint8_t; -typedef unsigned short uint16_t; -typedef unsigned int uint32_t; -typedef unsigned __int64 uint64_t; - -/* normally defined in stdbool.h, but that doesn't exist on Windows */ -#define true 1 -#define false 0 -#define __bool_true_false_are_defined 1 - /* normally defined in fcntl.h, but not on Windows */ #define O_CLOEXEC 0 -#ifdef HAVE_LONG_LONG -typedef long long lng; -typedef unsigned long long ulng; -# define SIZEOF_LNG SIZEOF_LONG_LONG -#else -typedef __int64 lng; -typedef unsigned __int64 ulng; -# define SIZEOF_LNG SIZEOF___INT64 -#endif +typedef int64_t lng; +typedef uint64_t ulng; +#define SIZEOF_LNG 8 #ifdef HAVE___INT128 typedef __int128 hge; @@ -1038,10 +1031,10 @@ typedef __uint128_t uhge; #endif /* Format to print 64 bit signed integers. */ -#define LLFMT "%I64d" +#define LLFMT "%" PRId64 /* Format to print 64 bit unsigned integers. */ -#define ULLFMT "%I64u" +#define ULLFMT "%" PRIu64 /* define printf formats for printing size_t and ssize_t variables */ #if SIZEOF_SIZE_T == SIZEOF_INT diff --git a/clients/Tests/MAL-signatures.stable.out b/clients/Tests/MAL-signatures.stable.out --- a/clients/Tests/MAL-signatures.stable.out +++ b/clients/Tests/MAL-signatures.stable.out @@ -8262,7 +8262,7 @@ Ready. [ "profiler", "getUserTime", "command profiler.getUserTime():lng ", "CMDgetUserTime;", "Obtain the user timing information." ] [ "profiler", "getlimit", "command profiler.getlimit():int ", "CMDgetprofilerlimit;", "Avoid floading of events" ] [ "profiler", "noop", "command profiler.noop():void ", "CMDnoopProfiler;", "Fetch any pending performance events" ] -[ "profiler", "openstream", "pattern profiler.openstream(mode:int):void ", "CMDopenProfilerStream;", "Start profiling the events, sent to output stream" ] +[ "profiler", "openstream", "pattern profiler.openstream(mode:int):void ", "CMDopenProfilerStream;", "Start profiling the events, send to output stream" ] [ "profiler", "setheartbeat", "command profiler.setheartbeat(b:int):void ", "CMDsetHeartbeat;", "Set heart beat performance tracing" ] [ "profiler", "setlimit", "command profiler.setlimit(i:int):void ", "CMDsetprofilerlimit;", "Change the profiler event limit counter" ] [ "profiler", "start", "pattern profiler.start():void ", "CMDstartProfiler;", "Start offline performance profiling" ] diff --git a/clients/Tests/MAL-signatures.stable.out.int128 b/clients/Tests/MAL-signatures.stable.out.int128 --- a/clients/Tests/MAL-signatures.stable.out.int128 +++ b/clients/Tests/MAL-signatures.stable.out.int128 @@ -10624,7 +10624,7 @@ Ready. [ "profiler", "getUserTime", "command profiler.getUserTime():lng ", "CMDgetUserTime;", "Obtain the user timing information." ] [ "profiler", "getlimit", "command profiler.getlimit():int ", "CMDgetprofilerlimit;", "Avoid floading of events" ] [ "profiler", "noop", "command profiler.noop():void ", "CMDnoopProfiler;", "Fetch any pending performance events" ] -[ "profiler", "openstream", "pattern profiler.openstream(mode:int):void ", "CMDopenProfilerStream;", "Start profiling the events, sent to output stream" ] +[ "profiler", "openstream", "pattern profiler.openstream(mode:int):void ", "CMDopenProfilerStream;", "Start profiling the events, send to output stream" ] [ "profiler", "setheartbeat", "command profiler.setheartbeat(b:int):void ", "CMDsetHeartbeat;", "Set heart beat performance tracing" ] [ "profiler", "setlimit", "command profiler.setlimit(i:int):void ", "CMDsetprofilerlimit;", "Change the profiler event limit counter" ] [ "profiler", "start", "pattern profiler.start():void ", "CMDstartProfiler;", "Start offline performance profiling" ] 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 @@ -189,9 +189,7 @@ bat BBPindex(const char *nme); void BBPkeepref(bat i); bat BBPlimit; void BBPlock(void); -str BBPlogical(bat b, str buf); int BBPout; -str BBPphysical(bat b, str buf); BAT *BBPquickdesc(bat b, int delaccess); int BBPreclaim(BAT *b); int BBPrelease(bat b); @@ -266,7 +264,7 @@ gdk_return GDKreleasesem(int sem_id, str void GDKreset(int status, int exit); gdk_return GDKsetenv(const char *name, const char *value); void GDKsetmallocsuccesscount(lng count); -ssize_t GDKstrFromStr(unsigned char *dst, const unsigned char *src, ssize_t len); +ssize_t GDKstrFromStr(unsigned char *restrict dst, const unsigned char *restrict src, ssize_t len); str GDKstrdup(const char *s) __attribute__((__warn_unused_result__)); str GDKstrndup(const char *s, size_t n) __attribute__((__warn_unused_result__)); void GDKsyserror(_In_z_ _Printf_format_string_ const char *format, ...) __attribute__((__format__(__printf__, 1, 2))); @@ -383,8 +381,8 @@ int dlclose(void *handle); char *dlerror(void); void *dlopen(const char *file, int mode); void *dlsym(void *handle, const char *name); -size_t escapedStr(char *dst, const char *src, size_t dstlen, const char *sep1, const char *sep2, int quote); -size_t escapedStrlen(const char *src, const char *sep1, const char *sep2, int quote); +size_t escapedStr(char *restrict dst, const char *restrict src, size_t dstlen, const char *sep1, const char *sep2, int quote); +size_t escapedStrlen(const char *restrict src, const char *sep1, const char *sep2, int quote); ssize_t fltFromStr(const char *src, size_t *len, flt **dst); ssize_t fltToStr(str *dst, size_t *len, const flt *src); NANCONST flt flt_nil; @@ -478,7 +476,7 @@ void rewinddir(DIR *dir); ssize_t shtFromStr(const char *src, size_t *len, sht **dst); ssize_t shtToStr(str *dst, size_t *len, const sht *src); const sht sht_nil; -ssize_t strFromStr(const char *src, size_t *len, str *dst); +ssize_t strFromStr(const char *restrict src, size_t *restrict len, str *restrict dst); BUN strHash(const char *s); size_t strLen(const char *s); int strNil(const char *s); @@ -528,11 +526,13 @@ char *mapi_get_host(Mapi mid); char *mapi_get_lang(Mapi mid); int64_t mapi_get_last_id(MapiHdl hdl); int mapi_get_len(MapiHdl hdl, int fnr); +int64_t mapi_get_maloptimizertime(MapiHdl hdl); char *mapi_get_mapi_version(Mapi mid); char *mapi_get_monet_version(Mapi mid); char *mapi_get_motd(Mapi mid); char *mapi_get_name(MapiHdl hdl, int fnr); char *mapi_get_query(MapiHdl hdl); +int64_t mapi_get_querytime(MapiHdl hdl); int mapi_get_querytype(MapiHdl hdl); int64_t mapi_get_row_count(MapiHdl hdl); int mapi_get_scale(MapiHdl hdl, int fnr); @@ -2616,20 +2616,20 @@ ssize_t bstream_read(bstream *s, size_t buffer *buffer_create(size_t size); void buffer_destroy(buffer *b); char *buffer_get_buf(buffer *b); -void buffer_init(buffer *b, char *buf, size_t size); -stream *buffer_rastream(buffer *b, const char *name); -stream *buffer_wastream(buffer *b, const char *name); -stream *callback_stream(void *priv, ssize_t( *read)(void *priv, void *buf, size_t elmsize, size_t cnt), void( *close)(void *priv), void( *destroy)(void *priv), const char *name); +void buffer_init(buffer *restrict b, char *restrict buf, size_t size); +stream *buffer_rastream(buffer *restrict b, const char *restrict name); +stream *buffer_wastream(buffer *restrict b, const char *restrict name); +stream *callback_stream(void *restrict priv, ssize_t( *read)(void *restrict priv, void *restrict buf, size_t elmsize, size_t cnt), void( *close)(void *priv), void( *destroy)(void *priv), const char *restrict name); void close_stream(stream *s); -stream *file_rastream(FILE *fp, const char *name); -stream *file_rstream(FILE *fp, const char *name); -stream *file_wastream(FILE *fp, const char *name); -stream *file_wstream(FILE *fp, const char *name); +stream *file_rastream(FILE *restrict fp, const char *restrict name); +stream *file_rstream(FILE *restrict fp, const char *restrict name); +stream *file_wastream(FILE *restrict fp, const char *restrict name); +stream *file_wstream(FILE *restrict fp, const char *restrict name); FILE *getFile(stream *s); int getFileNo(stream *s); size_t getFileSize(stream *s); -stream *iconv_rstream(stream *ss, const char *charset, const char *name); -stream *iconv_wstream(stream *ss, const char *charset, const char *name); +stream *iconv_rstream(stream *restrict ss, const char *restrict charset, const char *restrict name); +stream *iconv_wstream(stream *restrict ss, const char *restrict charset, const char *restrict name); int isa_block_stream(stream *s); int isa_fixed_block_stream(stream *s); int mnstr_byteorder(stream *s); @@ -2638,48 +2638,48 @@ void mnstr_close(stream *s); void mnstr_destroy(stream *s); int mnstr_errnr(stream *s); char *mnstr_error(stream *s); -int mnstr_fgetpos(stream *s, lng *p); +int mnstr_fgetpos(stream *restrict s, fpos_t *restrict p); int mnstr_flush(stream *s); -int mnstr_fsetpos(stream *s, lng p); +int mnstr_fsetpos(stream *restrict s, fpos_t *restrict p); int mnstr_fsync(stream *s); buffer *mnstr_get_buffer(stream *s); int mnstr_init(void); int mnstr_isalive(stream *s); char *mnstr_name(stream *s); -int mnstr_printf(stream *s, _In_z_ _Printf_format_string_ const char *format, ...) __attribute__((__format__(__printf__, 2, 3))); -ssize_t mnstr_read(stream *s, void *buf, size_t elmsize, size_t cnt); -int mnstr_readBte(stream *s, signed char *val); -int mnstr_readBteArray(stream *s, signed char *val, size_t cnt); -int mnstr_readChr(stream *s, char *val); -int mnstr_readHge(stream *s, hge *val); -int mnstr_readHgeArray(stream *s, hge *val, size_t cnt); -int mnstr_readInt(stream *s, int *val); -int mnstr_readIntArray(stream *s, int *val, size_t cnt); -int mnstr_readLng(stream *s, lng *val); -int mnstr_readLngArray(stream *s, lng *val, size_t cnt); -int mnstr_readSht(stream *s, short *val); -int mnstr_readShtArray(stream *s, short *val, size_t cnt); -int mnstr_readStr(stream *s, char *val); -ssize_t mnstr_read_block(stream *s, void *buf, size_t elmsize, size_t cnt); -ssize_t mnstr_readline(stream *s, void *buf, size_t maxcnt); +int mnstr_printf(stream *restrict s, _In_z_ _Printf_format_string_ const char *restrict format, ...) __attribute__((__format__(__printf__, 2, 3))); +ssize_t mnstr_read(stream *restrict s, void *restrict buf, size_t elmsize, size_t cnt); +int mnstr_readBte(stream *restrict s, int8_t *restrict val); +int mnstr_readBteArray(stream *restrict s, int8_t *restrict val, size_t cnt); +int mnstr_readChr(stream *restrict s, char *restrict val); _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list