Changeset: d6a0fa453bce for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/d6a0fa453bce
Modified Files:
MonetDB.spec
sql/test/BugTracker-2026/Tests/All
Branch: default
Log Message:
Merge with Dec2025 branch.
diffs (truncated from 446 to 300 lines):
diff --git a/MonetDB.spec b/MonetDB.spec
--- a/MonetDB.spec
+++ b/MonetDB.spec
@@ -8,22 +8,29 @@
%global version 56.0.0
+# Use bcond_with to add a --with option; i.e., "without" is default.
+# Use bcond_without to add a --without option; i.e., "with" is default.
+# The --with OPTION and --without OPTION arguments can be passed on
+# the commandline of both rpmbuild and mock.
+
+# Use `--with compat` to build a set of RPMs that can be installed next
+# to (at the same time as) the non-compat release version.
%bcond_with compat
%global name MonetDB%{?with_compat:%version}
%{!?buildno: %global buildno %(date +%Y%m%d)}
-# Use bcond_with to add a --with option; i.e., "without" is default.
-# Use bcond_without to add a --without option; i.e., "with" is default.
-# The --with OPTION and --without OPTION arguments can be passed on
-# the commandline of both rpmbuild and mock.
-
-# On 64 bit architectures compile with 128 bit integer support.
+# On 64 bit architectures use `--without hugeint` to compile without 128
+# bit integer support.
%if "%{?_lib}" == "lib64"
%bcond_without hugeint
%endif
+# Use `--without selinux` to not build the MonetDB-selinux RPM. This
+# then also does not require the selinux development packages to build.
+%bcond_without selinux
+
%global release %{buildno}%{?dist}
# This package contains monetdbd which is a (long running) daemon, so
@@ -84,11 +91,7 @@ URL: https://www.monetdb.org/
BugURL: https://github.com/MonetDB/MonetDB/issues
Source:
https://www.monetdb.org/downloads/sources/Dec2025-SP3/MonetDB-%{version}.tar.bz2
-# We need checkpolicy and selinux-policy-devel for the SELinux policy.
BuildRequires: systemd-rpm-macros
-BuildRequires: checkpolicy
-BuildRequires: selinux-policy-devel
-BuildRequires: hardlink
BuildRequires: cmake >= 3.12
BuildRequires: gcc
BuildRequires: bison
@@ -103,12 +106,6 @@ BuildRequires: pkgconfig(bzip2)
BuildRequires: pkgconfig(odbc)
BuildRequires: pkgconfig(readline)
%endif
-%if %{with fits}
-BuildRequires: pkgconfig(cfitsio)
-%endif
-%if %{with geos}
-BuildRequires: geos-devel >= 3.10.0
-%endif
BuildRequires: pkgconfig(libcurl)
BuildRequires: pkgconfig(liblzma)
BuildRequires: pkgconfig(libxml-2.0)
@@ -454,6 +451,7 @@ Requires: %{name}-server%{?_isa} = %{ver
Obsoletes: MonetDB-geom-MonetDB5 < 11.50.0
Provides: %{name}-geom-MonetDB5 = %{version}-%{release}
Provides: %{name}-geom-MonetDB5%{?_isa} = %{version}-%{release}
+BuildRequires: geos-devel >= 3.10.0
%description geom
MonetDB is a database management system that is developed from a
@@ -474,6 +472,7 @@ extensions for %{name}-server.
Summary: MonetDB: Add on module that provides support for FITS files
Group: Applications/Databases
Requires: %{name}-server%{?_isa} = %{version}-%{release}
+BuildRequires: pkgconfig(cfitsio)
%description cfitsio
MonetDB is a database management system that is developed from a
@@ -632,7 +631,6 @@ used from the MAL level.
Summary: MonetDB SQL server modules
Group: Applications/Databases
Requires(pre): %{name}-server%{?_isa} = %{version}-%{release}
-Requires(pre): %{name}-selinux%{?_isa} = %{version}-%{release}
Obsoletes: MonetDB-SQL-server5 < 11.50.0
Provides: %{name}-SQL-server5 = %{version}-%{release}
Provides: %{name}-SQL-server5%{?_isa} = %{version}-%{release}
@@ -807,7 +805,7 @@ developer, but if you do want to test, t
%{python3_sitelib}/MonetDBtesting/*
%endif
-%if %{without compat}
+%if %{with selinux} && %{without compat}
%package selinux
Summary: SELinux policy files for MonetDB
Group: Applications/Databases
@@ -823,6 +821,9 @@ Requires(postun): %{name}-SQL%{?_isa} =
Requires(post): policycoreutils
Requires(postun): policycoreutils
BuildArch: noarch
+BuildRequires: checkpolicy
+BuildRequires: selinux-policy-devel
+BuildRequires: hardlink
%global selinux_types %(awk '/^#[[:space:]]*SELINUXTYPE=/,/^[^#]/ { if ($3 ==
"-") printf "%s ", $2 }' /etc/selinux/config 2>/dev/null)
%global selinux_variants %([ -z "%{selinux_types}" ] && echo mls targeted ||
echo %{selinux_types})
@@ -943,12 +944,14 @@ rm -f "${RPM_BUILD_ROOT}"%{_libdir}/mone
rm -f "${RPM_BUILD_ROOT}"%{_libdir}/monetdb5*/lib_udf*.so
rm -f "${RPM_BUILD_ROOT}"%{_bindir}/monetdb_mtest.sh
+%if %{without compat} && %{with selinux}
if [ -x /usr/bin/hardlink ]; then
# post unification of /bin and /sbin
/usr/bin/hardlink -cv "${RPM_BUILD_ROOT}"%{_datadir}/selinux
else
/usr/sbin/hardlink -cv "${RPM_BUILD_ROOT}"%{_datadir}/selinux
fi
+%endif
# update shebang lines for Python scripts
%if %{?py3_shebang_fix:1}%{!?py3_shebang_fix:0}
@@ -1007,7 +1010,6 @@ rm "${RPM_BUILD_ROOT}"%{_bindir}/sqlsamp
rm "${RPM_BUILD_ROOT}"%{_bindir}/streamcat
rm "${RPM_BUILD_ROOT}"%{_bindir}/testcondvar
rm -r "${RPM_BUILD_ROOT}"%{_datadir}/doc/MonetDB*
-rm "${RPM_BUILD_ROOT}"%{_datadir}/selinux/*/monetdb.pp
rm -r "${RPM_BUILD_ROOT}"%{_datadir}/monetdb
rm -r "${RPM_BUILD_ROOT}"%{_includedir}/monetdb
rm "${RPM_BUILD_ROOT}"%{_libdir}/*.so
diff --git a/misc/selinux/monetdb.if b/misc/selinux/monetdb.if
--- a/misc/selinux/monetdb.if
+++ b/misc/selinux/monetdb.if
@@ -1,1 +1,1 @@
-## <summary></summary>
+## <summary>MonetDB - Monet Database Management System</summary>
diff --git a/misc/selinux/monetdb.te b/misc/selinux/monetdb.te
--- a/misc/selinux/monetdb.te
+++ b/misc/selinux/monetdb.te
@@ -26,11 +26,11 @@ require {
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 sigchld sigkill signull
transition };
+ class process { rlimitinh sigchld siginh sigkill signal signull
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 getattr
getopt read shutdown write setopt };
+ class unix_stream_socket { connectto create_stream_socket_perms getattr
getopt read setopt shutdown write };
}
# First, we declare the monetdbd_t domain, used for the "monetdbd"
@@ -48,8 +48,8 @@ type mserver5_exec_t; # /usr/bin/mserve
init_daemon_domain(mserver5_t, mserver5_exec_t)
# see
https://selinuxproject.org/page/NB_Domain_and_Object_Transitions#Domain_Transition
allow monetdbd_t mserver5_t:process transition;
-allow monetdbd_t mserver5_exec_t:file { execute open read getattr };
-allow mserver5_t mserver5_exec_t:file { entrypoint read execute };
+allow monetdbd_t mserver5_exec_t:file { execute getattr open read };
+allow mserver5_t mserver5_exec_t:file { entrypoint execute read };
type_transition monetdbd_t mserver5_exec_t:process mserver5_t;
# monetdbd must be allowed to kill the server it started
@@ -57,7 +57,7 @@ allow monetdbd_t mserver5_t:process sigk
# on EPEL 7 we need these as well
allow mserver5_t monetdbd_t:process sigchld;
allow monetdbd_t unconfined_service_t:process { signal signull };
-allow mserver5_t proc_t:file { open read getattr }; # read /proc/meminfo
+allow mserver5_t proc_t:file { getattr open read }; # read /proc/meminfo
# declare a type for the systemd unit file (monetdbd.service)
type monetdbd_unit_file_t;
@@ -115,7 +115,7 @@ corenet_tcp_bind_generic_node(monetdbd_t
allow monetdbd_t self:tcp_socket create_stream_socket_perms;
allow monetdbd_t self:udp_socket create_stream_socket_perms;
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:unix_stream_socket { connectto
create_stream_socket_perms };
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)
@@ -132,19 +132,19 @@ corenet_tcp_bind_generic_node(mserver5_t
allow mserver5_t self:tcp_socket create_stream_socket_perms;
allow mserver5_t self:udp_socket create_stream_socket_perms;
allow mserver5_t self:unix_dgram_socket create_socket_perms;
-allow mserver5_t self:unix_stream_socket { create_stream_socket_perms
connectto };
+allow mserver5_t self:unix_stream_socket { connectto
create_stream_socket_perms };
allow mserver5_t self:netlink_selinux_socket create_socket_perms;
manage_dirs_pattern(mserver5_t, tmp_t, tmp_t)
manage_sock_files_pattern(mserver5_t, tmp_t, tmp_t)
allow mserver5_t tmp_t:file create;
manage_sock_files_pattern(mserver5_t, mserver5_db_t, mserver5_db_t)
-allow mserver5_t monetdbd_t:fifo_file { read write getattr ioctl };
-allow mserver5_t monetdbd_t:unix_stream_socket { read write getattr getopt
setopt shutdown };
+allow mserver5_t monetdbd_t:fifo_file { getattr ioctl read write };
+allow mserver5_t monetdbd_t:unix_stream_socket { getattr getopt read setopt
shutdown write };
allow mserver5_t var_t:dir { read };
allow mserver5_t var_lib_t:dir { read };
# we want to be able to read some cgroup files
-fs_search_cgroup_dirs(mserver5_t);
-fs_read_cgroup_files(mserver5_t);
+fs_search_cgroup_dirs(mserver5_t)
+fs_read_cgroup_files(mserver5_t)
allow mserver5_t cgroup_t:dir search;
allow mserver5_t self:process execmem;
allow monetdbd_t var_t:dir { read };
diff --git a/sql/test/BugTracker-2026/Tests/8013-triple-same-predicate-bug.test
b/sql/test/BugTracker-2026/Tests/8013-triple-same-predicate-bug.test
new file mode 100644
--- /dev/null
+++ b/sql/test/BugTracker-2026/Tests/8013-triple-same-predicate-bug.test
@@ -0,0 +1,67 @@
+statement ok
+CREATE TABLE t8013(t1 timestamp, t2 timestamp)
+
+statement ok rowcount 1
+INSERT INTO t8013 VALUES('2026-01-01 00:00:00', '2026-01-02 00:00:00')
+
+query TT nosort
+SELECT * FROM t8013
+----
+2026-01-01 00:00:00
+2026-01-02 00:00:00
+
+-- next query works ok
+query TT nosort
+SELECT * FROM t8013 WHERE t2 > t1
+----
+2026-01-01 00:00:00
+2026-01-02 00:00:00
+
+-- next query works ok
+query TT nosort
+SELECT * FROM t8013 WHERE t2 > t1 AND t2 > t1
+----
+2026-01-01 00:00:00
+2026-01-02 00:00:00
+
+-- next query (3 same predicates) returns no rows
+query TT nosort
+SELECT * FROM t8013 WHERE t2 > t1 AND t2 > t1 AND t2 > t1
+----
+2026-01-01 00:00:00
+2026-01-02 00:00:00
+
+-- next query (4 same predicates) returns no rows
+query TT nosort
+SELECT * FROM t8013 WHERE t2 > t1 AND t2 > t1 AND t2 > t1 AND t2 > t1
+----
+2026-01-01 00:00:00
+2026-01-02 00:00:00
+
+-- next query (5 same predicates) returns no rows
+query TT nosort
+SELECT * FROM t8013 WHERE (t2 > t1 AND t2 > t1) AND (t2 > t1 AND t2 > t1 AND
t2 > t1)
+----
+2026-01-01 00:00:00
+2026-01-02 00:00:00
+
+
+query T nosort
+EXPLAIN SELECT * FROM t8013 WHERE t2 > t1 AND t2 > t1
+----
+project (
+| table("sys"."t8013") [ "t8013"."t1", "t8013"."t2" ]
+) [ "t8013"."t1", "t8013"."t2" ]
+
+
+query T nosort
+EXPLAIN SELECT * FROM t8013 WHERE t2 > t1 AND t2 > t1 AND t2 > t1
+----
+project (
+| table("sys"."t8013") [ "t8013"."t1", "t8013"."t2" ]
+) [ "t8013"."t1", "t8013"."t2" ]
+
+
+statement ok
+DROP TABLE t8013
+
diff --git
a/sql/test/BugTracker-2026/Tests/8014-rel_bin-exp_bin-assert-failure.test
b/sql/test/BugTracker-2026/Tests/8014-rel_bin-exp_bin-assert-failure.test
new file mode 100644
--- /dev/null
+++ b/sql/test/BugTracker-2026/Tests/8014-rel_bin-exp_bin-assert-failure.test
@@ -0,0 +1,126 @@
+statement ok
+CREATE TABLE ctas_bug (
+ c1 INT PRIMARY KEY,
+ c2 VARCHAR(20),
+ c4 INT,
+ c6 VARCHAR(10)
+)
+
+statement ok rowcount 4
+INSERT INTO ctas_bug VALUES
+ (1, 'a', 10, 'x'),
+ (2, 'b', 20, 'y'),
+ (3, 'c', 30, 'z'),
+ (4, 'd', 40, 'w')
+
+query I nosort
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]