Changeset: afff2f2c983a for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=afff2f2c983a
Modified Files:
        MonetDB.spec
        sql/backends/monet5/rel_bin.c
        sql/common/sql_types.c
        sql/common/sql_types.h
        sql/server/rel_optimizer.c
        sql/server/rel_unnest.c
        sql/server/sql_atom.c
        sql/server/sql_mvc.c
        sql/server/sql_mvc.h
        sql/server/sql_parser.y
        sql/server/sql_semantic.c
        sql/storage/sql_storage.h
        sql/storage/store.c
        sql/test/SQLancer/Tests/sqlancer09.test
        sql/test/sysmon/Tests/All
Branch: default
Log Message:

Merged with Oct2020


diffs (truncated from 4951 to 300 lines):

diff --git a/MonetDB.spec b/MonetDB.spec
--- a/MonetDB.spec
+++ b/MonetDB.spec
@@ -41,25 +41,15 @@
 %global fedpkgs 1
 %endif
 
-%if %{?rhel:1}%{!?rhel:0} && 0%{?rhel} < 7
-# RedHat Enterprise Linux < 7
-# There is no macro _rundir, and no directory /run, instead use /var/run.
-%global _rundir %{_localstatedir}/run
-%endif
-
 # On Fedora, the geos library is available, and so we can require it
 # and build the geom modules.  On RedHat Enterprise Linux and
 # derivatives (CentOS, Scientific Linux), the geos library is not
 # available.  However, the geos library is available in the Extra
-# Packages for Enterprise Linux (EPEL).  However, On RHEL 6, the geos
-# library is too old for us, so we need an extra check for an
-# up-to-date version of RHEL.
+# Packages for Enterprise Linux (EPEL).
 %if %{fedpkgs}
-%if %{?rhel:0}%{!?rhel:1} || 0%{?rhel} >= 7
 # By default create the MonetDB-geom-MonetDB5 package on Fedora and RHEL 7
 %bcond_without geos
 %endif
-%endif
 
 # By default use PCRE for the implementation of the SQL LIKE and ILIKE
 # operators.  Otherwise the POSIX regex functions are used.
@@ -73,11 +63,8 @@
 %bcond_without rintegration
 %endif
 
-%if 0%{?rhel} >= 7 || 0%{?fedora} > 0
-# On RHEL 6, Python 3 is too old.  On RHEL 7, Python 3 was too old
-# when RHEL 7 was released, but now it is ok.
+# By default, include Python 3 integration.
 %bcond_without py3integration
-%endif
 
 %if %{fedpkgs}
 # By default, create the MonetDB-cfitsio package.
@@ -104,13 +91,10 @@ Source: https://www.monetdb.org/download
 # that doesn't exist and we need systemd, so instead we just require
 # the macro file that contains the definitions.
 # We need checkpolicy and selinux-policy-devel for the SELinux policy.
-%if %{?rhel:0}%{!?rhel:1} || 0%{?rhel} >= 7
-# RHEL >= 7, and all current Fedora
 BuildRequires: /usr/lib/rpm/macros.d/macros.systemd
 BuildRequires: checkpolicy
 BuildRequires: selinux-policy-devel
 BuildRequires: hardlink
-%endif
 BuildRequires: cmake3 >= 3.12
 BuildRequires: gcc
 BuildRequires: bison
@@ -497,9 +481,7 @@ Suggests: %{name}-client%{?_isa} = %{ver
 %endif
 # versions up to 1.0.5 don't accept the queryid field in the result set
 Conflicts: python-pymonetdb < 1.0.6
-%if %{?rhel:0}%{!?rhel:1} || 0%{?rhel} >= 7
 Requires(pre): systemd
-%endif
 
 %description -n MonetDB5-server
 MonetDB is a database management system that is developed from a
@@ -535,9 +517,7 @@ exit 0
 
 %files -n MonetDB5-server
 %defattr(-,root,root)
-%if %{?rhel:0}%{!?rhel:1} || 0%{?rhel} >= 7
 %{_sysusersdir}/monetdb.conf
-%endif
 %attr(2750,monetdb,monetdb) %dir %{_localstatedir}/lib/monetdb
 %attr(2770,monetdb,monetdb) %dir %{_localstatedir}/monetdb5
 %attr(2770,monetdb,monetdb) %dir %{_localstatedir}/monetdb5/dbfarm
@@ -589,9 +569,7 @@ Provides: %{name}-SQL-server5-hugeint%{?
 %if (0%{?fedora} >= 22)
 Suggests: %{name}-client%{?_isa} = %{version}-%{release}
 %endif
-%if %{?rhel:0}%{!?rhel:1} || 0%{?rhel} >= 7
 %{?systemd_requires}
-%endif
 
 %description SQL-server5
 MonetDB is a database management system that is developed from a
@@ -602,7 +580,6 @@ accelerators.  It also has an SQL front 
 This package contains the monetdb and monetdbd programs and the systemd
 configuration.
 
-%if %{?rhel:0}%{!?rhel:1} || 0%{?rhel} >= 7
 %post SQL-server5
 %systemd_post monetdbd.service
 
@@ -611,7 +588,6 @@ configuration.
 
 %postun SQL-server5
 %systemd_postun_with_restart monetdbd.service
-%endif
 
 %files SQL-server5
 %defattr(-,root,root)
@@ -619,16 +595,9 @@ configuration.
 %{_bindir}/monetdbd
 %dir %attr(775,monetdb,monetdb) %{_localstatedir}/log/monetdb
 %dir %attr(775,monetdb,monetdb) %{_rundir}/monetdb
-%if %{?rhel:0}%{!?rhel:1} || 0%{?rhel} >= 7
 # RHEL >= 7, and all current Fedora
 %{_tmpfilesdir}/monetdbd.conf
 %{_unitdir}/monetdbd.service
-%else
-# RedHat Enterprise Linux < 7
-%exclude %{_sysconfdir}/tmpfiles.d/monetdbd.conf
-# no _unitdir macro
-%exclude %{_prefix}/lib/systemd/system/monetdbd.service
-%endif
 %config(noreplace) %attr(664,monetdb,monetdb) 
%{_localstatedir}/monetdb5/dbfarm/.merovingian_properties
 %verify(not mtime) %attr(664,monetdb,monetdb) 
%{_localstatedir}/monetdb5/dbfarm/.merovingian_lock
 %config(noreplace) %attr(644,root,root) %{_sysconfdir}/logrotate.d/monetdbd
@@ -716,7 +685,6 @@ developer, but if you do want to test, t
 %dir %{python3_sitelib}/MonetDBtesting
 %{python3_sitelib}/MonetDBtesting/*
 
-%if %{?rhel:0}%{!?rhel:1} || 0%{?rhel} >= 7
 %package selinux
 Summary: SELinux policy files for MonetDB
 Group: Applications/Databases
@@ -779,13 +747,12 @@ fi
 %{_datadir}/doc/MonetDB-selinux/*
 %{_datadir}/selinux/*/monetdb.pp
 
-%endif
-
 %prep
 %setup -q
 
 %build
 %cmake3 \
+       -DCMAKE_INSTALL_RUNSTATEDIR=/run \
        -DRELEASE_VERSION=ON \
        -DASSERT=OFF \
        -DCINTEGRATION=%{?with_cintegration:ON}%{!?with_cintegration:OFF} \
@@ -824,14 +791,12 @@ for d in etc var; do mkdir "%{buildroot}
 rm "%{buildroot}/usr/var" "%{buildroot}/usr/etc"
 
 # move file to correct location
-%if %{?rhel:0}%{!?rhel:1} || 0%{?rhel} >= 7
 mkdir -p %{buildroot}%{_tmpfilesdir} %{buildroot}%{_sysusersdir}
 mv %{buildroot}%{_sysconfdir}/tmpfiles.d/monetdbd.conf 
%{buildroot}%{_tmpfilesdir}
 cat > %{buildroot}%{_sysusersdir}/monetdb.conf << EOF
 u monetdb - "MonetDB Server" /var/lib/monetdb
 EOF
 rmdir %{buildroot}%{_sysconfdir}/tmpfiles.d
-%endif
 
 install -d -m 0750 %{buildroot}%{_localstatedir}/lib/monetdb
 install -d -m 0770 %{buildroot}%{_localstatedir}/monetdb5/dbfarm
@@ -850,23 +815,12 @@ rm -f %{buildroot}%{_libdir}/monetdb5/li
 rm -f %{buildroot}%{_bindir}/monetdb_mtest.sh
 rm -rf %{buildroot}%{_datadir}/monetdb # /cmake
 
-%if %{?rhel:0}%{!?rhel:1} || 0%{?rhel} >= 7
 if [ -x /usr/sbin/hardlink ]; then
     /usr/sbin/hardlink -cv %{buildroot}%{_datadir}/selinux
 else
     # Fedora 31
     /usr/bin/hardlink -cv %{buildroot}%{_datadir}/selinux
 fi
-%endif
-
-%if %{?rhel:0}%{!?rhel:1} || 0%{?rhel} >= 7
-# fix up some paths (/var/run -> /run)
-# needed because CMAKE_INSTALL_RUNSTATEDIR refers to /var/run
-sed -i 's|/var/run|/run|' \
-    %{buildroot}%{_tmpfilesdir}/monetdbd.conf \
-    %{buildroot}%{_localstatedir}/monetdb5/dbfarm/.merovingian_properties \
-    %{buildroot}%{_unitdir}/monetdbd.service
-%endif
 
 %changelog
 * Wed Nov 18 2020 Sjoerd Mullender <sjo...@acm.org> - 11.39.7-20201118
diff --git a/debian/rules b/debian/rules
--- a/debian/rules
+++ b/debian/rules
@@ -13,6 +13,7 @@ DH_VERBOSE=1
 
 override_dh_auto_configure:
        dh_auto_configure -- \
+       -DCMAKE_INSTALL_RUNSTATEDIR=/run \
        -DRELEASE_VERSION=ON \
        -DASSERT=OFF \
        -DCINTEGRATION=ON \
diff --git a/monetdb5/modules/mal/sysmon.c b/monetdb5/modules/mal/sysmon.c
--- a/monetdb5/modules/mal/sysmon.c
+++ b/monetdb5/modules/mal/sysmon.c
@@ -164,7 +164,6 @@ SYSMONqueue(Client cntxt, MalBlkPtr mb, 
        timestamp tsn;
        str msg = MAL_SUCCEED;
 
-       (void) cntxt;
        (void) mb;
        sz = (BUN) qsize;       // reserve space for all tuples in QRYqueue
        tag = COLnew(0, TYPE_lng, sz, TRANSIENT);
@@ -196,7 +195,8 @@ SYSMONqueue(Client cntxt, MalBlkPtr mb, 
                        if( i == qhead)
                                break;
                }
-               if( QRYqueue[i].query && (cntxt->user == MAL_ADMIN || 
cntxt->idx == QRYqueue[i].idx) ){
+               if( QRYqueue[i].query && (cntxt->user == MAL_ADMIN || 
+                                       strcmp(cntxt->username, 
QRYqueue[i].username) == 0) ){
                        qtag = (lng) QRYqueue[i].tag;
                        if (BUNappend(tag, &qtag, false) != GDK_SUCCEED)
                                goto bailout;
@@ -272,11 +272,8 @@ SYSMONpause(Client cntxt, MalBlkPtr mb, 
 {
        bool set = false;
        lng tag = 0;
-       (void) mb;
-       (void) stk;
-       (void) pci;
 
-       switch( getArgType(mb,pci,1)){
+       switch(getArgType(mb,pci,1)){
        case TYPE_bte: tag = *getArgReference_bte(stk,pci,1); break;
        case TYPE_sht: tag = *getArgReference_sht(stk,pci,1); break;
        case TYPE_int: tag = *getArgReference_int(stk,pci,1); break;
@@ -308,11 +305,8 @@ SYSMONresume(Client cntxt, MalBlkPtr mb,
 {
        bool set = false;
        lng tag = 0;
-       (void) mb;
-       (void) stk;
-       (void) pci;
 
-       switch( getArgType(mb,pci,1)){
+       switch(getArgType(mb,pci,1)){
        case TYPE_bte: tag = *getArgReference_bte(stk,pci,1); break;
        case TYPE_sht: tag = *getArgReference_sht(stk,pci,1); break;
        case TYPE_int: tag = *getArgReference_int(stk,pci,1); break;
@@ -344,11 +338,8 @@ SYSMONstop(Client cntxt, MalBlkPtr mb, M
 {
        bool set = false;
        lng tag = 0;
-       (void) mb;
-       (void) stk;
-       (void) pci;
 
-       switch( getArgType(mb,pci,1)){
+       switch(getArgType(mb,pci,1)){
        case TYPE_bte: tag = *getArgReference_bte(stk,pci,1); break;
        case TYPE_sht: tag = *getArgReference_sht(stk,pci,1); break;
        case TYPE_int: tag = *getArgReference_int(stk,pci,1); break;
diff --git a/sql/backends/monet5/rel_bin.c b/sql/backends/monet5/rel_bin.c
--- a/sql/backends/monet5/rel_bin.c
+++ b/sql/backends/monet5/rel_bin.c
@@ -1268,10 +1268,8 @@ exp_bin(backend *be, sql_exp *e, stmt *l
                else if (re2)
                        r2 = exp_bin(be, re2, right, NULL, grp, ext, cnt, sel, 
depth+1, 0, push);
 
-               if (!l || !r || (re2 && !r2)) {
-                       TRC_ERROR(SQL_EXECUTION, "Query: '%s'\n", 
be->client->query);
+               if (!l || !r || (re2 && !r2))
                        return NULL;
-               }
 
                (void)is_select;
                if (reduce && left && right) {
diff --git a/sql/common/sql_types.c b/sql/common/sql_types.c
--- a/sql/common/sql_types.c
+++ b/sql/common/sql_types.c
@@ -29,7 +29,7 @@ list *funcs = NULL;
 static sql_type *BIT = NULL;
 static list *localtypes = NULL;
 
-int digits2bits(int digits)
+unsigned int digits2bits(unsigned int digits)
 {
        if (digits < 3)
                return 8;
@@ -56,7 +56,7 @@ int digits2bits(int digits)
 #endif
 }
 
-int bits2digits(int bits)
+unsigned int bits2digits(unsigned int bits)
 {
        if (bits < 4)
                return 1;
diff --git a/sql/common/sql_types.h b/sql/common/sql_types.h
--- a/sql/common/sql_types.h
+++ b/sql/common/sql_types.h
@@ -21,8 +21,8 @@ extern list *aliases;
 extern list *types;
 extern list *funcs;
 
-extern int bits2digits(int b);
-extern int digits2bits(int d);
+extern unsigned int bits2digits(unsigned int b);
+extern unsigned int digits2bits(unsigned int d);
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to