Changeset: 4751de1e20bb for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4751de1e20bb Added Files: sql/test/BugTracker-2018/Tests/procedure-create-table.Bug-6604.sql sql/test/BugTracker-2018/Tests/sqlitelogictest-cast-null-not-in.Bug-6605.sql sql/test/BugTracker-2018/Tests/sqlitelogictest-cast-null-not-in.Bug-6605.stable.err sql/test/BugTracker-2018/Tests/sqlitelogictest-cast-null-not-in.Bug-6605.stable.out sql/test/BugTracker-2018/Tests/sqlitelogictest-groupby-coalesce-error-message.Bug-6608.sql sql/test/BugTracker-2018/Tests/sqlitelogictest-groupby-coalesce-error-message.Bug-6608.stable.out Modified Files: MonetDB.spec buildtools/selinux/monetdb.te gdk/gdk_aggr.c gdk/gdk_select.c sql/ChangeLog.Mar2018 sql/backends/monet5/rel_bin.c sql/backends/monet5/sql_upgrades.c sql/scripts/21_dependency_views.sql sql/server/rel_optimizer.c sql/server/rel_psm.c sql/server/rel_schema.c sql/server/rel_select.c sql/server/sql_parser.h sql/server/sql_parser.y sql/test/BugTracker-2014/Tests/temporary.Bug-3430.stable.err sql/test/BugTracker-2018/Tests/All sql/test/BugTracker-2018/Tests/sqlitelogictest-complex-case-not-in.Bug-6594.sql sql/test/BugTracker-2018/Tests/sqlitelogictest-complex-case-not-in.Bug-6594.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.32bit sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.int128 sql/test/emptydb-upgrade-chain/Tests/upgrade.stable.out.powerpc64.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.32bit sql/test/emptydb-upgrade/Tests/upgrade.stable.out.int128 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/orderidx/Tests/simpletable.sql sql/test/orderidx/Tests/simpletable.stable.out sql/test/orderidx/Tests/simpletable.stable.out.32bit sql/test/orderidx/Tests/smalltable.sql sql/test/orderidx/Tests/smalltable.stable.out sql/test/orderidx/Tests/smalltable.stable.out.32bit sql/test/pg_regress/Tests/vacuum.sql sql/test/pg_regress/Tests/vacuum.stable.out 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.32bit 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.32bit sql/test/testdb-upgrade/Tests/upgrade.stable.out.int128 Branch: remote_auth Log Message:
Merge with default diffs (truncated from 2824 to 300 lines): diff --git a/MonetDB.spec b/MonetDB.spec --- a/MonetDB.spec +++ b/MonetDB.spec @@ -640,7 +640,6 @@ fi %exclude %{_libdir}/monetdb5/fits.mal %exclude %{_libdir}/monetdb5/autoload/*_fits.mal %exclude %{_libdir}/monetdb5/createdb/*_fits.sql -%exclude %{_libdir}/monetdb5/lib_fits.so %endif %if %{?with_geos:1}%{!?with_geos:0} %exclude %{_libdir}/monetdb5/geom.mal @@ -674,25 +673,16 @@ fi %endif %exclude %{_libdir}/monetdb5/autoload/??_sql*.mal %{_libdir}/monetdb5/autoload/*.mal -%if %{?with_geos:1}%{!?with_geos:0} -%exclude %{_libdir}/monetdb5/lib_geom.so -%endif -%if %{?with_lidar:1}%{!?with_lidar:0} -%exclude %{_libdir}/monetdb5/lib_lidar.so -%endif -%if %{?with_pyintegration:1}%{!?with_pyintegration:0} -%exclude %{_libdir}/monetdb5/lib_pyapi.so -%endif -%if %{?with_rintegration:1}%{!?with_rintegration:0} -%exclude %{_libdir}/monetdb5/lib_rapi.so -%endif %if %{?with_samtools:1}%{!?with_samtools:0} %exclude %{_libdir}/monetdb5/bam.mal %exclude %{_libdir}/monetdb5/autoload/*_bam.mal -%exclude %{_libdir}/monetdb5/lib_bam.so %endif -%exclude %{_libdir}/monetdb5/lib_sql.so -%{_libdir}/monetdb5/*.so +%{_libdir}/monetdb5/lib_capi.so +%{_libdir}/monetdb5/lib_generator.so +%{_libdir}/monetdb5/lib_lsst.so +%{_libdir}/monetdb5/lib_opt_sql_append.so +%{_libdir}/monetdb5/lib_udf.so +%{_libdir}/monetdb5/lib_vault.so %doc %{_mandir}/man1/mserver5.1.gz %dir %{_datadir}/doc/MonetDB %docdir %{_datadir}/doc/MonetDB diff --git a/buildtools/selinux/monetdb.te b/buildtools/selinux/monetdb.te --- a/buildtools/selinux/monetdb.te +++ b/buildtools/selinux/monetdb.te @@ -1,7 +1,24 @@ -policy_module(monetdb, 0.2) +policy_module(monetdb, 0.3) # 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 +# Declare the system types and classes we're using. +require { + type proc_net_t; + type tmp_t; + type var_t; + class dir { read }; + class fd { use }; + class fifo_file { getattr read write }; + class file { entrypoint execute getattr manage_file_perms map open read }; + class netlink_selinux_socket create_socket_perms; + class process { rlimitinh siginh signal transition }; + class tcp_socket create_stream_socket_perms; + class udp_socket create_stream_socket_perms; + class unix_dgram_socket create_socket_perms; + class unix_stream_socket { connectto create_stream_socket_perms getopt read shutdown write }; +} + # First, we declare the monetdbd_t domain, used for the "monetdbd" # process. Because it is launched by systemd, we tell the policy that # monetdbd_exec_t (the context of monetdbd), when launched by systemd, @@ -79,6 +96,7 @@ allow monetdbd_t self:udp_socket create_ allow monetdbd_t self:unix_dgram_socket create_socket_perms; allow monetdbd_t self:unix_stream_socket { create_stream_socket_perms connectto }; allow monetdbd_t self:netlink_selinux_socket create_socket_perms; +allow monetdbd_t proc_net_t:file read; manage_dirs_pattern(monetdbd_t, tmp_t, tmp_t) manage_sock_files_pattern(monetdbd_t, tmp_t, tmp_t) manage_sock_files_pattern(monetdbd_t, mserver5_db_t, mserver5_db_t) diff --git a/gdk/gdk_aggr.c b/gdk/gdk_aggr.c --- a/gdk/gdk_aggr.c +++ b/gdk/gdk_aggr.c @@ -147,7 +147,7 @@ BATgroupaggrinit(BAT *b, BAT *g, BAT *e, /* ---------------------------------------------------------------------- */ /* sum */ -static inline int +static inline bool samesign(double x, double y) { return (x >= 0) == (y >= 0); @@ -182,13 +182,13 @@ static BUN dofsum(const void *restrict values, oid seqb, BUN start, BUN end, void *restrict results, BUN ngrp, int tp1, int tp2, const oid *restrict cand, const oid *candend, const oid *restrict gids, - oid min, oid max, int skip_nils, int abort_on_error, - int nil_if_empty, const char *func) + oid min, oid max, bool skip_nils, bool abort_on_error, + bool nil_if_empty, const char *func) { struct pergroup { int npartials; int maxpartials; - int valseen; + bool valseen; #ifdef INFINITES_ALLOWED float infs; #else @@ -224,7 +224,7 @@ dofsum(const void *restrict values, oid return BUN_NONE; for (grp = 0; grp < ngrp; grp++) { pergroup[grp].npartials = 0; - pergroup[grp].valseen = 0; + pergroup[grp].valseen = false; pergroup[grp].maxpartials = 2; pergroup[grp].infs = 0; pergroup[grp].partials = GDKmalloc(pergroup[grp].maxpartials * sizeof(double)); @@ -268,7 +268,7 @@ dofsum(const void *restrict values, oid } continue; } - pergroup[grp].valseen = 1; + pergroup[grp].valseen = true; #ifdef INFINITES_ALLOWED if (isinf(x)) { pergroup[grp].infs += x; @@ -476,7 +476,7 @@ dofsum(const void *restrict values, oid goto overflow); \ } \ } else { \ - int seenval = 0; \ + bool seenval = false; \ for (i = start; i < end && nils == 0; i++) { \ x = vals[i]; \ if (is_##TYPE1##_nil(x)) { \ @@ -490,7 +490,7 @@ dofsum(const void *restrict values, oid TYPE2, sum, \ GDK_##TYPE2##_max, \ goto overflow); \ - seenval = 1; \ + seenval = true; \ } \ } \ *seen = seenval; \ @@ -500,7 +500,7 @@ dofsum(const void *restrict values, oid } else if (ngrp == 1) { \ /* single group, with candidate list */ \ TYPE2 sum; \ - int seenval = 0; \ + bool seenval = false; \ ALGODEBUG fprintf(stderr, \ "#%s: with candidates, no groups; " \ "start " BUNFMT ", end " BUNFMT \ @@ -523,7 +523,7 @@ dofsum(const void *restrict values, oid TYPE2, sum, \ GDK_##TYPE2##_max, \ goto overflow); \ - seenval = 1; \ + seenval = true; \ } \ } \ if (seenval) \ @@ -609,11 +609,11 @@ dofsum(const void *restrict values, oid } while (0) static BUN -dosum(const void *restrict values, int nonil, oid seqb, BUN start, BUN end, +dosum(const void *restrict values, bool nonil, oid seqb, BUN start, BUN end, void *restrict results, BUN ngrp, int tp1, int tp2, const oid *restrict cand, const oid *candend, const oid *restrict gids, - oid min, oid max, int skip_nils, int abort_on_error, - int nil_if_empty, const char *func) + oid min, oid max, bool skip_nils, bool abort_on_error, + bool nil_if_empty, const char *func) { BUN nils = 0; BUN i; @@ -810,7 +810,7 @@ BATgroupsum(BAT *b, BAT *g, BAT *e, BAT nils = dosum(Tloc(b, 0), b->tnonil, b->hseqbase, start, end, Tloc(bn, 0), ngrp, b->ttype, tp, cand, candend, gids, min, max, - skip_nils, abort_on_error, 1, "BATgroupsum"); + skip_nils, abort_on_error, true, "BATgroupsum"); if (nils < BUN_NONE) { BATsetcount(bn, ngrp); @@ -936,7 +936,7 @@ BATsum(void *res, int tp, BAT *b, BAT *s if (BATcount(b) == 0) return GDK_SUCCEED; nils = dosum(Tloc(b, 0), b->tnonil, b->hseqbase, start, end, - res, 1, b->ttype, tp, cand, candend, &min, min, max, + res, true, b->ttype, tp, cand, candend, &min, min, max, skip_nils, abort_on_error, nil_if_empty, "BATsum"); return nils < BUN_NONE ? GDK_SUCCEED : GDK_FAIL; } @@ -947,8 +947,7 @@ BATsum(void *res, int tp, BAT *b, BAT *s #define AGGR_PROD(TYPE1, TYPE2, TYPE3) \ do { \ const TYPE1 *restrict vals = (const TYPE1 *) values; \ - assert(gidincr == 0 || gidincr == 1); \ - gid = 0; /* doesn't change if gidincr == 0 */ \ + gid = 0; /* doesn't change if gidincr == false */ \ for (;;) { \ if (cand) { \ if (cand == candend) \ @@ -961,7 +960,7 @@ BATsum(void *res, int tp, BAT *b, BAT *s if (i == end) \ break; \ } \ - if (gids == NULL || gidincr == 0 || \ + if (gids == NULL || !gidincr || \ (gids[i] >= min && gids[i] <= max)) { \ if (gidincr) { \ if (gids) \ @@ -998,8 +997,7 @@ BATsum(void *res, int tp, BAT *b, BAT *s #define AGGR_PROD_HGE(TYPE) \ do { \ const TYPE *vals = (const TYPE *) values; \ - assert(gidincr == 0 || gidincr == 1); \ - gid = 0; /* doesn't change if gidincr == 0 */ \ + gid = 0; /* doesn't change if gidincr == false */ \ for (;;) { \ if (cand) { \ if (cand == candend) \ @@ -1012,7 +1010,7 @@ BATsum(void *res, int tp, BAT *b, BAT *s if (i == end) \ break; \ } \ - if (gids == NULL || gidincr == 0 || \ + if (gids == NULL || !gidincr || \ (gids[i] >= min && gids[i] <= max)) { \ if (gidincr) { \ if (gids) \ @@ -1044,8 +1042,7 @@ BATsum(void *res, int tp, BAT *b, BAT *s #define AGGR_PROD_LNG(TYPE) \ do { \ const TYPE *restrict vals = (const TYPE *) values; \ - assert(gidincr == 0 || gidincr == 1); \ - gid = 0; /* doesn't change if gidincr == 0 */ \ + gid = 0; /* doesn't change if gidincr == false */ \ for (;;) { \ if (cand) { \ if (cand == candend) \ @@ -1058,7 +1055,7 @@ BATsum(void *res, int tp, BAT *b, BAT *s if (i == end) \ break; \ } \ - if (gids == NULL || gidincr == 0 || \ + if (gids == NULL || !gidincr || \ (gids[i] >= min && gids[i] <= max)) { \ if (gidincr) { \ if (gids) \ @@ -1094,8 +1091,7 @@ BATsum(void *res, int tp, BAT *b, BAT *s #define AGGR_PROD_FLOAT(TYPE1, TYPE2) \ do { \ const TYPE1 *restrict vals = (const TYPE1 *) values; \ - assert(gidincr == 0 || gidincr == 1); \ - gid = 0; /* doesn't change if gidincr == 0 */ \ + gid = 0; /* doesn't change if gidincr == false */ \ for (;;) { \ if (cand) { \ if (cand == candend) \ @@ -1108,7 +1104,7 @@ BATsum(void *res, int tp, BAT *b, BAT *s if (i == end) \ break; \ } \ - if (gids == NULL || gidincr == 0 || \ + if (gids == NULL || !gidincr || \ (gids[i] >= min && gids[i] <= max)) { \ if (gidincr) { \ if (gids) \ @@ -1146,8 +1142,8 @@ BATsum(void *res, int tp, BAT *b, BAT *s static BUN doprod(const void *restrict values, oid seqb, BUN start, BUN end, void *restrict results, BUN ngrp, int tp1, int tp2, const oid *restrict cand, const oid *candend, - const oid *restrict gids, int gidincr, oid min, oid max, - int skip_nils, int abort_on_error, int nil_if_empty, const char *func) + const oid *restrict gids, bool gidincr, oid min, oid max, + bool skip_nils, bool abort_on_error, bool nil_if_empty, const char *func) { BUN nils = 0; BUN i; @@ -1412,8 +1408,8 @@ BATgroupprod(BAT *b, BAT *g, BAT *e, BAT nils = doprod(Tloc(b, 0), b->hseqbase, start, end, Tloc(bn, 0), ngrp, b->ttype, tp, - cand, candend, gids, 1, min, max, - skip_nils, abort_on_error, 1, "BATgroupprod"); + cand, candend, gids, true, min, max, + skip_nils, abort_on_error, true, "BATgroupprod"); if (nils < BUN_NONE) { BATsetcount(bn, ngrp); @@ -1476,8 +1472,8 @@ BATprod(void *res, int tp, BAT *b, BAT * } if (BATcount(b) == 0) return GDK_SUCCEED; - nils = doprod(Tloc(b, 0), b->hseqbase, start, end, res, 1, - b->ttype, tp, cand, candend, &min, 0, min, max, _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list