Changeset: 16a967a47cdc for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=16a967a47cdc
Added Files:
        
sql/test/BugTracker-2016/Tests/min-max-uuid-column-wrong-results.Bug-3953.sql
Removed Files:
        sql/test/BugTracker-2011/Tests/and-power.Bug-3013.stable.out.int128
        sql/test/BugTracker-2016/Tests/data-uuid.csv.bz2
        
sql/test/BugTracker-2016/Tests/min-max-uuid-column-wrong-results.Bug-3953.sql.in
Modified Files:
        MonetDB.spec
        NT/monetdb_config.h.in
        buildtools/selinux/monetdb.te
        clients/Tests/exports.stable.out
        configure.ag
        gdk/ChangeLog
        gdk/gdk.h
        gdk/gdk_aggr.c
        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_calc.c
        gdk/gdk_calc_compare.h
        gdk/gdk_calc_private.h
        gdk/gdk_firstn.c
        gdk/gdk_group.c
        gdk/gdk_hash.c
        gdk/gdk_imprints.c
        gdk/gdk_join.c
        gdk/gdk_logger.c
        gdk/gdk_logger.h
        gdk/gdk_project.c
        gdk/gdk_qsort.c
        gdk/gdk_search.c
        gdk/gdk_select.c
        gdk/gdk_ssort.c
        gdk/gdk_unique.c
        gdk/gdk_utils.c
        gdk/gdk_value.c
        geom/monetdb5/geom.c
        geom/monetdb5/geom.h
        monetdb5/extras/rapi/converters.c.h
        monetdb5/mal/mal_atom.c
        monetdb5/mal/mal_authorize.c
        monetdb5/mal/mal_builder.c
        monetdb5/mal/mal_debugger.c
        monetdb5/mal/mal_function.c
        monetdb5/mal/mal_instruction.c
        monetdb5/mal/mal_interpreter.c
        monetdb5/mal/mal_parser.c
        monetdb5/modules/atoms/color.c
        monetdb5/modules/atoms/color.h
        monetdb5/modules/atoms/json.c
        monetdb5/modules/atoms/mtime.c
        monetdb5/modules/atoms/str.c
        monetdb5/modules/kernel/algebra.c
        monetdb5/modules/kernel/batcolor.c
        monetdb5/modules/kernel/batmmath.c
        monetdb5/modules/kernel/microbenchmark.c
        monetdb5/modules/kernel/mmath.c
        monetdb5/modules/kernel/mmath.h
        monetdb5/modules/mal/batcalc.c
        monetdb5/modules/mal/calc.c
        monetdb5/modules/mal/clients.c
        monetdb5/modules/mal/iterator.c
        monetdb5/modules/mal/language.c
        monetdb5/modules/mal/mal_io.c
        monetdb5/modules/mal/mkey.c
        monetdb5/modules/mal/pcre.c
        monetdb5/modules/mal/remote.c
        monetdb5/modules/mal/tablet.c
        monetdb5/optimizer/opt_mergetable.c
        monetdb5/optimizer/opt_multiplex.c
        monetdb5/optimizer/opt_remap.c
        sql/ChangeLog
        sql/backends/monet5/LSST/lsst.c
        sql/backends/monet5/Tests/pyloader07.sql
        sql/backends/monet5/Tests/pyloader07.stable.out
        sql/backends/monet5/Tests/pyloader07.stable.out.Windows
        sql/backends/monet5/UDF/cudf/udf_impl.h
        sql/backends/monet5/UDF/pyapi/conversion.c
        sql/backends/monet5/UDF/pyapi/convert_loops.h
        sql/backends/monet5/UDF/pyapi/emit.c
        sql/backends/monet5/UDF/pyapi/type_conversion.c
        sql/backends/monet5/generator/generator.c
        sql/backends/monet5/sql.c
        sql/backends/monet5/sql_cast_impl_down_from_flt.h
        sql/backends/monet5/sql_cast_impl_int.h
        sql/backends/monet5/sql_cast_impl_up_to_flt.h
        sql/backends/monet5/sql_cat.c
        sql/backends/monet5/sql_fround.c
        sql/backends/monet5/sql_fround_impl.h
        sql/backends/monet5/sql_result.c
        sql/backends/monet5/sql_round.c
        sql/backends/monet5/sql_round_impl.h
        sql/backends/monet5/sql_scenario.c
        sql/backends/monet5/sql_user.c
        sql/backends/monet5/vaults/bam/bam_lib.c
        sql/backends/monet5/vaults/fits/fits.c
        sql/backends/monet5/vaults/lidar/lidar.c
        sql/backends/monet5/vaults/netcdf/netcdf.c
        sql/backends/monet5/vaults/shp/shp.c
        sql/server/sql_atom.c
        sql/server/sql_mvc.c
        sql/server/sql_parser.y
        sql/server/sql_privileges.c
        sql/storage/bat/bat_storage.c
        sql/storage/bat/bat_table.c
        sql/storage/store.c
        sql/storage/store_dependency.c
        sql/test/BugTracker-2011/Tests/and-power.Bug-3013.stable.out
        sql/test/BugTracker-2015/Tests/string_split.Bug-3564.stable.err
        sql/test/BugTracker-2016/Tests/All
        sql/test/BugTracker-2017/Tests/All
        sql/test/BugTracker-2017/Tests/double-groupby-column.Bug-6207.sql
        sql/test/BugTracker-2017/Tests/double-groupby-column.Bug-6207.stable.out
        
sql/test/BugTracker-2017/Tests/extract_quarter_week_from_date.Bug-3831.sql
        sql/test/Tests/fsum.sql
        sql/test/Tests/fsum.stable.err
        sql/test/Tests/fsum.stable.out
        sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out
        sql/test/emptydb-upgrade/Tests/upgrade.stable.out
        sql/test/mergetables/Tests/All
        sql/test/testdb-upgrade-chain/Tests/upgrade.stable.out
        sql/test/testdb-upgrade/Tests/upgrade.stable.out
        testing/Mtest.py.in
Branch: trails
Log Message:

Merge with default


diffs (truncated from 9156 to 300 lines):

diff --git a/MonetDB.spec b/MonetDB.spec
--- a/MonetDB.spec
+++ b/MonetDB.spec
@@ -885,7 +885,7 @@ developer, but if you do want to test, t
 
 %if %{?rhel:0}%{!?rhel:1} || 0%{?rhel} >= 7
 %package selinux
-Summary: MonetDB - Monet Database Management System
+Summary: SELinux policy files for MonetDB
 Group: Applications/Databases
 %if "%{_selinux_policy_version}" != ""
 Requires:       selinux-policy >= %{_selinux_policy_version}
@@ -1002,6 +1002,11 @@ make %{?_smp_mflags}
 
 %if %{?rhel:0}%{!?rhel:1} || 0%{?rhel} >= 7
 cd buildtools/selinux
+%if 0%{?fedora} < 27
+# no `map' policy available before Fedora 27
+sed -i '/map/d' monetdb.te
+%endif
+
 for selinuxvariant in %{selinux_variants}
 do
   make NAME=${selinuxvariant} -f /usr/share/selinux/devel/Makefile
@@ -1041,6 +1046,9 @@ done
 %postun -p /sbin/ldconfig
 
 %changelog
+* Sun Nov  5 2017 Sjoerd Mullender <sjo...@acm.org> - 11.27.9-20171105
+- BZ#6460 - selinux doen't allow mmap
+
 * Mon Oct 23 2017 Sjoerd Mullender <sjo...@acm.org> - 11.27.9-20171023
 - Rebuilt.
 - BZ#6207: identifier ambiguous when grouping and selecting the same
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,6 +33,12 @@
 #define _CRT_SECURE_NO_DEPRECATE 1
 #endif
 
+/* include Intel's mathimf.h early, before any other include files
+ * might try to include math.h */
+#ifdef __INTEL_COMPILER
+#include <mathimf.h>
+#endif
+
 #include <malloc.h>
 
 #if defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC)
@@ -160,14 +166,6 @@
 /* Define if the fits module is to be enabled */
 /* #undef HAVE_FITS */
 
-/* Define to 1 if you have the `fpclass' function. */
-#define HAVE_FPCLASS 1         /* uses _fpclass, see mmath.c */
-
-/* Define to 1 if you have the `fpclassify' function. */
-#if defined(_MSC_VER) && _MSC_VER > 1600
-#define HAVE_FPCLASSIFY 1
-#endif
-
 /* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
 /* #undef HAVE_FSEEKO */
 
@@ -237,11 +235,6 @@
 /* Define to 1 if you have the <io.h> header file. */
 #define HAVE_IO_H 1
 
-/* Define to 1 if you have the `isinf' function. */
-#if !defined(_MSC_VER) || _MSC_VER > 1600
-#define HAVE_ISINF 1
-#endif
-
 /* Define to 1 if you have the <kvm.h> header file. */
 /* #undef HAVE_KVM_H */
 
@@ -369,7 +362,7 @@
 /* #undef HAVE_NL_LANGINFO */
 
 /* Define to 1 if you have the `nextafterf' function. */
-#if !defined(_MSC_VER) || _MSC_VER > 1600
+#if defined(__INTEL_COMPILER) || !defined(_MSC_VER) || _MSC_VER > 1600
 #define HAVE_NEXTAFTERF 1
 #endif
 
@@ -430,7 +423,7 @@
 /* #undef HAVE_RESTRICT */
 
 /* Define to 1 if you have the `round' function. */
-#if !defined(_MSC_VER) || _MSC_VER > 1600
+#if defined(__INTEL_COMPILER) || !defined(_MSC_VER) || _MSC_VER > 1600
 #define HAVE_ROUND 1
 #endif
 
diff --git a/buildtools/selinux/monetdb.te b/buildtools/selinux/monetdb.te
--- a/buildtools/selinux/monetdb.te
+++ b/buildtools/selinux/monetdb.te
@@ -1,4 +1,4 @@
-policy_module(monetdb, 0.1)
+policy_module(monetdb, 0.2)
 # The above line declares that this file is a SELinux policy file. Its
 # name is monetdb, so the file should be saved as monetdb.te
 
@@ -39,6 +39,7 @@ manage_files_pattern(mserver5_t, mserver
 manage_dirs_pattern(mserver5_t, mserver5_db_t, mserver5_db_t)
 manage_files_pattern(monetdbd_t, mserver5_db_t, mserver5_db_t)
 manage_dirs_pattern(monetdbd_t, mserver5_db_t, mserver5_db_t)
+allow mserver5_t mserver5_db_t:file { map };
 
 # the context used for the configuration files
 type monetdbd_etc_t;
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
@@ -379,7 +379,7 @@ cqfix_fptr cqfix_get(void);
 void cqfix_set(cqfix_fptr);
 ssize_t dblFromStr(const char *src, size_t *len, dbl **dst);
 ssize_t dblToStr(str *dst, size_t *len, const dbl *src);
-const dbl dbl_nil;
+NANCONST dbl dbl_nil;
 char *dirname(char *path);
 int dlclose(void *handle);
 char *dlerror(void);
@@ -389,7 +389,7 @@ size_t escapedStr(char *dst, const char 
 size_t escapedStrlen(const char *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);
-const flt flt_nil;
+NANCONST flt flt_nil;
 geomcatalogfix_fptr geomcatalogfix_get(void);
 void geomcatalogfix_set(geomcatalogfix_fptr);
 geomsqlfix_fptr geomsqlfix_get(void);
diff --git a/configure.ag b/configure.ag
--- a/configure.ag
+++ b/configure.ag
@@ -2722,8 +2722,6 @@ AC_CHECK_FUNCS([\
        fabsf \
        fallocate \
        fcntl \
-       fpclass \
-       fpclassify \
        fsync \
        ftime \
        getexecname \
@@ -2732,7 +2730,6 @@ AC_CHECK_FUNCS([\
        getopt_long \
        gettimeofday \
        getuid \
-       isinf \
        llabs \
        localtime_r \
        lockf \
diff --git a/gdk/ChangeLog b/gdk/ChangeLog
--- a/gdk/ChangeLog
+++ b/gdk/ChangeLog
@@ -1,6 +1,10 @@
 # ChangeLog file for MonetDB
 # This file is updated with Maddlog
 
+* Tue Nov  7 2017 Sjoerd Mullender <sjo...@acm.org>
+- The NIL representation of the internal flt and dbl types was changed
+  from the smallest representable finite value to NaN (not-a-number).
+
 * Mon Sep 18 2017 Sjoerd Mullender <sjo...@acm.org>
 - Changed the interface of ATOMformat and VALformat: they now return a
   pointer to the allocated string.
diff --git a/gdk/gdk.h b/gdk/gdk.h
--- a/gdk/gdk.h
+++ b/gdk/gdk.h
@@ -859,7 +859,8 @@ typedef struct {
 #define GDKLIBRARY_NOKEY       061034  /* nokey values can't be trusted */
 #define GDKLIBRARY_BADEMPTY    061035  /* possibility of duplicate empty str */
 #define GDKLIBRARY_TALIGN      061036  /* talign field in BBP.dir */
-#define GDKLIBRARY             061037
+#define GDKLIBRARY_NIL_NAN     061037  /* flt/dbl NIL not represented by NaN */
+#define GDKLIBRARY             061040
 
 typedef struct BAT {
        /* static bat properties */
@@ -1293,13 +1294,13 @@ gdk_export BUN ORDERfndlast(BAT *b, cons
 gdk_export BUN BUNfnd(BAT *b, const void *right);
 
 #define BUNfndVOID(b, v)                                               \
-       (((*(const oid*)(v) == oid_nil) ^ ((b)->tseqbase == oid_nil)) | \
+       ((is_oid_nil(*(const oid*)(v)) ^ is_oid_nil((b)->tseqbase)) |   \
                (*(const oid*)(v) < (b)->tseqbase) |                    \
                (*(const oid*)(v) >= (b)->tseqbase + (b)->batCount) ?   \
         BUN_NONE :                                                     \
         (BUN) (*(const oid*)(v) - (b)->tseqbase))
 
-#define BATttype(b)    ((b)->ttype == TYPE_void && (b)->tseqbase != oid_nil ? \
+#define BATttype(b)    ((b)->ttype == TYPE_void && !is_oid_nil((b)->tseqbase) 
? \
                         TYPE_oid : (b)->ttype)
 #define Tbase(b)       ((b)->tvheap->base)
 
@@ -1528,19 +1529,19 @@ gdk_export void GDKqsort(void *h, void *
 gdk_export void GDKqsort_rev(void *h, void *t, const void *base, size_t n, int 
hs, int ts, int tpe);
 
 #define BATtordered(b) ((b)->ttype == TYPE_void || (b)->tsorted)
-#define BATtrevordered(b) (((b)->ttype == TYPE_void && (b)->tseqbase == 
oid_nil) || (b)->trevsorted)
-#define BATtdense(b)   (BATtvoid(b) && (b)->tseqbase != oid_nil)
+#define BATtrevordered(b) (((b)->ttype == TYPE_void && 
is_oid_nil((b)->tseqbase)) || (b)->trevsorted)
+#define BATtdense(b)   (BATtvoid(b) && !is_oid_nil((b)->tseqbase))
 #define BATtvoid(b)    (((b)->tdense && (b)->tsorted) || (b)->ttype==TYPE_void)
 #define BATtkey(b)     (b->tkey != FALSE || BATtdense(b))
 
 /* set some properties that are trivial to deduce */
 #define BATsettrivprop(b)                                              \
        do {                                                            \
-               assert((b)->hseqbase != oid_nil);                       \
+               assert(!is_oid_nil((b)->hseqbase));                     \
                (b)->batDirtydesc = 1;  /* likely already set */        \
                /* the other head properties should already be correct */ \
                if ((b)->ttype == TYPE_void) {                          \
-                       if ((b)->tseqbase == oid_nil) {                 \
+                       if (is_oid_nil((b)->tseqbase)) {                \
                                (b)->tnonil = (b)->batCount == 0;       \
                                (b)->tnil = !(b)->tnonil;               \
                                (b)->trevsorted = 1;                    \
@@ -1570,7 +1571,7 @@ gdk_export void GDKqsort_rev(void *h, vo
                        } else if ((b)->ttype == TYPE_oid) {            \
                                /* b->batCount == 1 */                  \
                                oid sqbs;                               \
-                               if ((sqbs = ((oid *) (b)->theap.base)[0]) == 
oid_nil) { \
+                               if (is_oid_nil((sqbs = ((oid *) 
(b)->theap.base)[0]))) { \
                                        (b)->tdense = 0;                \
                                        (b)->tnonil = 0;                \
                                        (b)->tnil = 1;                  \
@@ -2427,7 +2428,7 @@ gdk_export void *THRdata[THREADDATA];
 static inline bat
 BBPcheck(bat x, const char *y)
 {
-       if (x && x != bat_nil) {
+       if (!is_bat_nil(x)) {
                assert(x > 0);
 
                if (x < 0 || x >= getBBPsize() || BBP_logical(x) == NULL) {
@@ -2457,7 +2458,7 @@ static inline char *
 Tpos(BATiter *bi, BUN p)
 {
        bi->tvid = bi->b->tseqbase;
-       if (bi->tvid != oid_nil)
+       if (!is_oid_nil(bi->tvid))
                bi->tvid += p;
        return (char*)&bi->tvid;
 }
diff --git a/gdk/gdk_aggr.c b/gdk/gdk_aggr.c
--- a/gdk/gdk_aggr.c
+++ b/gdk/gdk_aggr.c
@@ -10,7 +10,7 @@
 #include "gdk.h"
 #include "gdk_private.h"
 #include "gdk_calc_private.h"
-#ifdef __INTEL_COMPILER
+#if defined(_MSC_VER) && defined(__INTEL_COMPILER)
 #include <mathimf.h>
 #else
 #include <math.h>
@@ -104,12 +104,12 @@ BATgroupaggrinit(BAT *b, BAT *g, BAT *e,
                                gids = (const oid *) Tloc(g, 0);
                                /* find first non-nil */
                                for (i = 0, ngrp = BATcount(g); i < ngrp; i++, 
gids++) {
-                                       if (*gids != oid_nil) {
+                                       if (!is_oid_nil(*gids)) {
                                                min = *gids;
                                                break;
                                        }
                                }
-                               if (min != oid_nil) {
+                               if (!is_oid_nil(min)) {
                                        /* found a non-nil, max must be last
                                         * value (and there is one!) */
                                        max = * (const oid *) Tloc(g, 
BUNlast(g) - 1);
@@ -118,7 +118,7 @@ BATgroupaggrinit(BAT *b, BAT *g, BAT *e,
                                /* we'll do a complete scan */
                                gids = (const oid *) Tloc(g, 0);
                                for (i = 0, ngrp = BATcount(g); i < ngrp; i++, 
gids++) {
-                                       if (*gids != oid_nil) {
+                                       if (!is_oid_nil(*gids)) {
                                                if (*gids < min)
                                                        min = *gids;
                                                if (*gids > max)
@@ -151,15 +151,6 @@ BATgroupaggrinit(BAT *b, BAT *g, BAT *e,
 /* ---------------------------------------------------------------------- */
 /* sum */
 
-#if defined(_MSC_VER) && _MSC_VER < 1800
-#ifndef isnan
-#define isnan(x)       _isnan(x)
-#endif
-#ifndef isinf
-#define isinf(x)       (_fpclass(x) & (_FPCLASS_NINF | _FPCLASS_PINF))
-#endif
-#endif
-
 static inline int
 samesign(double x, double y)
 {
@@ -199,19 +190,25 @@ dofsum(const void *restrict values, oid 
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to