Changeset: 2f125d4df82e for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2f125d4df82e
Modified Files:
buildtools/autogen/autogen/msc.py
clients/Tests/exports.stable.out
clients/mapiclient/tomograph.c
clients/odbc/driver/ODBCConvert.c
common/stream/stream_socket.h
configure.ag
gdk/gdk_posix.c
gdk/gdk_private.h
monetdb5/extras/rapi/Makefile.ag
monetdb5/modules/atoms/json.c
monetdb5/modules/kernel/mmath.h
monetdb5/modules/mal/sysmon.c
monetdb5/optimizer/opt_jit.c
monetdb5/optimizer/opt_jit.h
monetdb5/optimizer/opt_prelude.c
monetdb5/optimizer/opt_prelude.h
monetdb5/optimizer/opt_pushselect.c
sql/backends/monet5/sql.h
sql/backends/monet5/sql_cast.h
sql/backends/monet5/sql_scenario.h
sql/backends/monet5/sql_statistics.c
sql/backends/monet5/sql_upgrades.c
sql/backends/monet5/vaults/bam/bam_db_interface.h
sql/backends/monet5/vaults/bam/bam_export.h
sql/backends/monet5/vaults/bam/bam_loader.h
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/server/Makefile.ag
sql/server/rel_optimizer.c
sql/storage/bat/bat_storage.c
testing/Mtimeout.c
Branch: default
Log Message:
Merge with Jul2017 branch.
diffs (truncated from 1666 to 300 lines):
diff --git a/buildtools/autogen/autogen/msc.py
b/buildtools/autogen/autogen/msc.py
--- a/buildtools/autogen/autogen/msc.py
+++ b/buildtools/autogen/autogen/msc.py
@@ -98,7 +98,7 @@ def msc_assignment(fd, var, values, msc)
o = ""
for v in values:
o = o + " " + v.replace('/', '\\')
- if var[0] != '@':
+ if var[0] != '@' and '.' not in var:
fd.write("%s = %s\n" % (var, o))
def msc_cflags(fd, var, values, msc):
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
@@ -1948,7 +1948,6 @@ str alter_tableRef;
str alter_triggerRef;
str alter_typeRef;
str alter_userRef;
-str alter_userRef;
str alter_viewRef;
str andRef;
str antijoinRef;
@@ -2040,7 +2039,6 @@ str create_tableRef;
str create_triggerRef;
str create_typeRef;
str create_userRef;
-str create_userRef;
str create_viewRef;
str crossRef;
str dataflowRef;
@@ -2076,7 +2074,6 @@ str drop_tableRef;
str drop_triggerRef;
str drop_typeRef;
str drop_userRef;
-str drop_userRef;
str drop_viewRef;
void dumpExceptionsToStream(stream *out, str msg);
void dumpModules(stream *out);
@@ -2188,7 +2185,6 @@ str identityRef;
str ifthenelseRef;
str ilikeRef;
str ilikeselectRef;
-str ilikeselectRef;
str ilikethetaselectRef;
str ilikeuselectRef;
void initHeartbeat(void);
@@ -2246,7 +2242,6 @@ str levenshteinbasic2_impl(int *result,
str levenshteinbasic_impl(int *result, str *s, str *t);
str likeRef;
str likeselectRef;
-str likeselectRef;
str likethetaselectRef;
str likeuselectRef;
void listModules(stream *out, Module s);
@@ -2521,7 +2516,6 @@ str sinkRef;
void slash_2_dir_sep(str fname);
str sliceRef;
str sortRef;
-str sortRef;
str sortReverseRef;
str soundex_impl(str *res, str *Name);
str sqlRef;
diff --git a/clients/mapiclient/tomograph.c b/clients/mapiclient/tomograph.c
--- a/clients/mapiclient/tomograph.c
+++ b/clients/mapiclient/tomograph.c
@@ -1394,7 +1394,7 @@ update(char *line, EventRecord *ev)
if (ev->state >= MDB_PING ) {
if (cpus == 0 && ev->state == MDB_PING) {
char *s;
- if( (s= ev->stmt,'['))
+ if( (s= strchr(ev->stmt,'[')) != NULL)
s++;
else s = ev->stmt;
while (s && isspace((unsigned char) *s))
diff --git a/clients/odbc/driver/ODBCConvert.c
b/clients/odbc/driver/ODBCConvert.c
--- a/clients/odbc/driver/ODBCConvert.c
+++ b/clients/odbc/driver/ODBCConvert.c
@@ -1215,6 +1215,7 @@ ODBCFetch(ODBCStmt *stmt,
SQLPOINTER origptr;
SQLLEN origbuflen;
SQLLEN *origlenp;
+ SQLLEN sz;
if (buflen < 0) {
/* Invalid string or buffer length */
@@ -1251,8 +1252,6 @@ ODBCFetch(ODBCStmt *stmt,
lenp = NULL;
}
switch (sql_type) {
- SQLLEN sz;
-
default:
case SQL_CHAR:
case SQL_VARCHAR:
diff --git a/common/stream/stream_socket.h b/common/stream/stream_socket.h
--- a/common/stream/stream_socket.h
+++ b/common/stream/stream_socket.h
@@ -9,6 +9,9 @@
/* This file contains the prototype declarations of the stream
* functions that need special include files (sockets) */
+#ifndef _STREAM_SOCKET_H_
+#define _STREAM_SOCKET_H_
+
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
@@ -27,3 +30,5 @@ stream_export stream *socket_rstream(SOC
stream_export stream *socket_wstream(SOCKET socket, const char *name);
stream_export stream *socket_rastream(SOCKET socket, const char *name);
stream_export stream *socket_wastream(SOCKET socket, const char *name);
+
+#endif /* _STREAM_SOCKET_H_ */
diff --git a/configure.ag b/configure.ag
--- a/configure.ag
+++ b/configure.ag
@@ -626,19 +626,14 @@ AS_VAR_IF([enable_strict], [yes], [
MCHECK_ADD_FLAG([-Wduplicated-cond])
MCHECK_ADD_FLAG([-Wduplicated-branches])
MCHECK_ADD_FLAG([-Wrestrict])
+ MCHECK_ADD_FLAG([-Wnested-externs])
- # With clang 2.8, 3.3, 5.0 (no other tested) and gcc < 4.5
- # (tested 3.4.6, 4.2.1, 4.3.2, 4.4.4, 4.4.5, 4.5.1, 4.5.2),
- # "-Wunreachable-code" triggers numerous "will never be
- # executed" (at least) in our stream code, mostly (if
- # not all) false positives, though, as well as in
- # YACC/BISON-generated code; thus, we do not use
- # "-Wunreachable-code" with clang and gcc < 4.5 .
- # At the same time, Apple deprecated OpenSSL in favour of
- # their own CommonCrypto API. We don't mind about that.
+ # We can deal with -Wunrechable-code on modern
+ # compilers, but FreeBSD's clang (3.4.1) is too old.
+ # We need a version that understands the DISABLES
+ # CODE comment that is in the code at various places.
AS_CASE([$CC_ver],
- [clang-*|gcc-[[0-3]].*|gcc-4.[[0-4]].*],
-
[MCHECK_ADD_FLAG([-Wno-deprecated-declarations])],
+ [clang-3.*], [],
[MCHECK_ADD_FLAG([-Wunreachable-code])])
dnl Our code is not (yet?) up to these:
@@ -652,7 +647,6 @@ AS_VAR_IF([enable_strict], [yes], [
dnl MCHECK_ADD_FLAG([-Wfloat-equal])
dnl MCHECK_ADD_FLAG([-Winline])
dnl MCHECK_ADD_FLAG([-Wmissing-noreturn])
- dnl MCHECK_ADD_FLAG([-Wnested-externs])
dnl MCHECK_ADD_FLAG([-Wpadded])
dnl MCHECK_ADD_FLAG([-Wredundant-decls])
dnl MCHECK_ADD_FLAG([-Wshadow])
diff --git a/gdk/gdk_posix.c b/gdk/gdk_posix.c
--- a/gdk/gdk_posix.c
+++ b/gdk/gdk_posix.c
@@ -306,25 +306,22 @@ MT_getrss(void)
size_t rss = 0;
kd = kvm_open(NULL, "/dev/null", NULL, O_RDONLY, "kvm_open");
- if (kd == NULL)
- return 0;
-
- ki = kvm_getprocs(kd, KERN_PROC_PID, getpid(), &ski);
- if (ki == NULL) {
- kvm_close(kd);
- return 0;
- }
-
+ if (kd != NULL) {
+ ki = kvm_getprocs(kd, KERN_PROC_PID, getpid(), &ski);
+ if (ki != NULL) {
#ifdef __NetBSD__ /* should we use configure for this? */
- /* see bug 3217 */
- rss = ki->kp_eproc.e_vm.vm_rssize;
+ /* see bug 3217 */
+ rss = ki->kp_eproc.e_vm.vm_rssize;
#else
- rss = ki->ki_rssize;
+ rss = ki->ki_rssize;
#endif
+ kvm_close(kd);
- kvm_close(kd);
-
- return rss * MT_pagesize();
+ return rss * MT_pagesize();
+ } else {
+ kvm_close(kd);
+ }
+ }
#elif defined(__linux__)
/* get RSS on Linux */
int fd;
diff --git a/gdk/gdk_private.h b/gdk/gdk_private.h
--- a/gdk/gdk_private.h
+++ b/gdk/gdk_private.h
@@ -27,12 +27,12 @@ enum heaptype {
};
__hidden gdk_return ATOMheap(int id, Heap *hp, size_t cap)
- __attribute__ ((__warn_unused_result__))
+ __attribute__((__warn_unused_result__))
__attribute__((__visibility__("hidden")));
__hidden int ATOMisdescendant(int id, int parentid)
__attribute__((__visibility__("hidden")));
__hidden int ATOMunknown_find(const char *nme)
- __attribute__ ((__warn_unused_result__))
+ __attribute__((__warn_unused_result__))
__attribute__((__visibility__("hidden")));
__hidden str ATOMunknown_name(int a)
__attribute__((__visibility__("hidden")));
@@ -41,11 +41,10 @@ enum heaptype {
__hidden int BATcheckimprints(BAT *b)
__attribute__((__visibility__("hidden")));
__hidden gdk_return BATcheckmodes(BAT *b, int persistent)
- __attribute__ ((__warn_unused_result__))
+ __attribute__((__warn_unused_result__))
__attribute__((__visibility__("hidden")));
__hidden int BATcheckorderidx(BAT *b)
__attribute__((__visibility__("hidden")));
-
__hidden BAT *BATcreatedesc(oid hseq, int tt, int heapnames, int role)
__attribute__((__visibility__("hidden")));
__hidden void BATdelete(BAT *b)
@@ -55,24 +54,24 @@ enum heaptype {
__hidden void BATfree(BAT *b)
__attribute__((__visibility__("hidden")));
__hidden gdk_return BATgroup_internal(BAT **groups, BAT **extents, BAT
**histo, BAT *b, BAT *s, BAT *g, BAT *e, BAT *h, int subsorted)
- __attribute__ ((__warn_unused_result__))
+ __attribute__((__warn_unused_result__))
__attribute__((__visibility__("hidden")));
__hidden void BATinit_idents(BAT *bn)
__attribute__((__visibility__("hidden")));
__hidden BAT *BATload_intern(bat bid, int lock)
__attribute__((__visibility__("hidden")));
__hidden gdk_return BATmaterialize(BAT *b)
- __attribute__ ((__warn_unused_result__))
+ __attribute__((__warn_unused_result__))
__attribute__((__visibility__("hidden")));
__hidden gdk_return BATsave(BAT *b)
- __attribute__ ((__warn_unused_result__))
+ __attribute__((__warn_unused_result__))
__attribute__((__visibility__("hidden")));
__hidden void BATsetdims(BAT *b)
__attribute__((__visibility__("hidden")));
__hidden size_t BATvmsize(BAT *b, int dirty)
__attribute__((__visibility__("hidden")));
__hidden gdk_return BBPcacheit(BAT *bn, int lock)
- __attribute__ ((__warn_unused_result__))
+ __attribute__((__warn_unused_result__))
__attribute__((__visibility__("hidden")));
void BBPdump(void); /* never called: for debugging only */
__hidden void BBPexit(void)
@@ -82,7 +81,7 @@ void BBPdump(void); /* never called: fo
__hidden void BBPinit(void)
__attribute__((__visibility__("hidden")));
__hidden bat BBPinsert(BAT *bn)
- __attribute__ ((__warn_unused_result__))
+ __attribute__((__warn_unused_result__))
__attribute__((__visibility__("hidden")));
__hidden int BBPselectfarm(int role, int type, enum heaptype hptype)
__attribute__((__visibility__("hidden")));
@@ -108,19 +107,14 @@ void BBPdump(void); /* never called: fo
__attribute__((__visibility__("hidden")));
__hidden Heap *createOIDXheap(BAT *b, int stable)
__attribute__((__visibility__("hidden")));
-__hidden void gdk_bbp_reset(void)
- __attribute__((__visibility__("hidden")));
__hidden gdk_return BUNreplace(BAT *b, oid left, const void *right, bit force)
- __attribute__ ((__warn_unused_result__))
+ __attribute__((__warn_unused_result__))
__attribute__((__visibility__("hidden")));
__hidden gdk_return GDKextend(const char *fn, size_t size)
- __attribute__ ((__warn_unused_result__))
+ __attribute__((__warn_unused_result__))
__attribute__((__visibility__("hidden")));
__hidden gdk_return GDKextendf(int fd, size_t size, const char *fn)
- __attribute__ ((__warn_unused_result__))
- __attribute__((__visibility__("hidden")));
-__hidden gdk_return GDKextractParentAndLastDirFromPath(const char *path, char
*last_dir_parent, char *last_dir)
- __attribute__ ((__warn_unused_result__))
+ __attribute__((__warn_unused_result__))
__attribute__((__visibility__("hidden")));
__hidden int GDKfdlocate(int farmid, const char *nme, const char *mode, const
char *ext)
__attribute__((__visibility__("hidden")));
@@ -134,24 +128,24 @@ void BBPdump(void); /* never called: fo
__attribute__((__format__(__printf__, 2, 3)))
__attribute__((__visibility__("hidden")));
__hidden gdk_return GDKmove(int farmid, const char *dir1, const char *nme1,
const char *ext1, const char *dir2, const char *nme2, const char *ext2)
- __attribute__ ((__warn_unused_result__))
+ __attribute__((__warn_unused_result__))
__attribute__((__visibility__("hidden")));
__hidden void *GDKmremap(const char *path, int mode, void *old_address, size_t
old_size, size_t *new_size)
__attribute__((__visibility__("hidden")));
__hidden gdk_return GDKmunmap(void *addr, size_t len)
- __attribute__ ((__warn_unused_result__))
+ __attribute__((__warn_unused_result__))
__attribute__((__visibility__("hidden")));
__hidden gdk_return GDKremovedir(int farmid, const char *nme)
- __attribute__ ((__warn_unused_result__))
+ __attribute__((__warn_unused_result__))
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list