From 16e19df2b4df49dc30578d9f825f731d64a671ff Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Mon, 10 Dec 2018 13:21:07 +0100 Subject: [PATCH 01/49] Rebase to 10.3.11 --- mariadb.spec | 12 ++++++++++-- sources | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/mariadb.spec b/mariadb.spec index 18254fb..6798061 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -142,7 +142,7 @@ %global sameevr %{epoch}:%{version}-%{release} Name: mariadb -Version: 10.3.10 +Version: 10.3.11 Release: 1%{?with_debug:.debug}%{?dist} Epoch: 3 @@ -861,7 +861,8 @@ fi # Reported to upstream as: https://jira.mariadb.org/browse/MDEV-14340 # TODO: check, if it changes location inside that file depending on values passed to Cmake mkdir -p %{buildroot}/%{_libdir}/pkgconfig -mv %{buildroot}/%{_datadir}/pkgconfig/*.pc %{buildroot}/%{_libdir}/pkgconfig +mv %{buildroot}/%{_datadir}/pkgconfig/mariadb.pc %{buildroot}/%{_libdir}/pkgconfig +rm %{buildroot}/usr/lib/pkgconfig/libmariadb.pc # install INFO_SRC, INFO_BIN into libdir (upstream thinks these are doc files, # but that's pretty wacko --- see also %%{name}-file-contents.patch) @@ -1560,6 +1561,13 @@ fi %endif %changelog +* Mon Dec 10 2018 Michal Schorm - 3:10.3.11-1 +- Rebase to 10.3.11 +- CVEs fixed: + CVE-2018-3282, CVE-2016-9843, CVE-2018-3174, CVE-2018-3143, CVE-2018-3156 + CVE-2018-3251, CVE-2018-3185, CVE-2018-3277, CVE-2018-3162, CVE-2018-3173 + CVE-2018-3200, CVE-2018-3284 + * Fri Oct 05 2018 Michal Schorm - 3:10.3.10-1 - Rebase to 10.3.10 diff --git a/sources b/sources index 3cf2c1c..d49a3e9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (mariadb-10.3.10.tar.gz) = dee7789dff359a6352ceacb2db6bcb4730940e9458adda4e23894f9bfa0a7ff8c238060bffca58a60b662275e52a31ea1784d51fae114312b003c024e9412b31 +SHA512 (mariadb-10.3.11.tar.gz) = 1adc1f9bbabf848726c669a7a0ab01257ba31882758b53fbf3b1316f2295670dba1c3d1f3292d7c1a749c701504588694a55d020839e690595897b0e20435298 From 9a804d72e6e0859ec63619243d87541b66145150 Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Sat, 15 Dec 2018 08:02:31 +0100 Subject: [PATCH 02/49] Remove ppc64 optimization which is no longer necessary --- mariadb.spec | 4 ---- 1 file changed, 4 deletions(-) diff --git a/mariadb.spec b/mariadb.spec index 6798061..239335f 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -755,10 +755,6 @@ rm -r storage/tokudb/mysql-test/tokudb/t/*.py CFLAGS="%{optflags} -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE" # force PIC mode so that we can build libmysqld.so CFLAGS="$CFLAGS -fPIC" -# significant performance gains can be achieved by compiling with -O3 optimization; rhbz#1051069 -%ifarch ppc64 -CFLAGS=`echo $CFLAGS| sed -e "s|-O2|-O3|g" ` -%endif # Override all optimization flags when making a debug build %{?with_debug: CFLAGS="$CFLAGS -O0 -g"} From af148a5cec664127f6f6b6484464c36199c559ac Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Sun, 6 Jan 2019 03:16:37 +0100 Subject: [PATCH 03/49] Add a weak dependence on a 'mysql-selinux' package --- mariadb.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mariadb.spec b/mariadb.spec index 239335f..6329943 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -398,6 +398,9 @@ Suggests: logrotate Requires: %{_sysconfdir}/my.cnf Requires: %{_sysconfdir}/my.cnf.d +# Aditional SELinux rules shipped in a separate package +Recommends: mysql-selinux + # for fuser in mysql-check-socket Requires: psmisc From e9dc01434bf247af82c3803d8af129b3dd748495 Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Wed, 9 Jan 2019 09:56:03 +0100 Subject: [PATCH 04/49] Rebase to 10.3.12 --- mariadb-shebang.patch | 8 ++++---- mariadb.spec | 16 +++++++++++++--- sources | 2 +- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/mariadb-shebang.patch b/mariadb-shebang.patch index 9a3d3f3..4f0a267 100644 --- a/mariadb-shebang.patch +++ b/mariadb-shebang.patch @@ -4,11 +4,11 @@ Maintainer's note: This script is not python3 compatible: ModuleNotFoundError: No module named 'commands' -diff -Naurp mariadb-10.3.10/storage/rocksdb/myrocks_hotbackup mariadb-10.3.10/storage/rocksdb/myrocks_hotbackup_patched ---- mariadb-10.3.10/storage/rocksdb/myrocks_hotbackup 2018-10-02 11:45:43.000000000 +0200 -+++ mariadb-10.3.10/storage/rocksdb/myrocks_hotbackup_patched 2018-10-05 14:27:02.960060700 +0200 +diff -Naurp mariadb-10.3.12/storage/rocksdb/myrocks_hotbackup.py mariadb-10.3.12/storage/rocksdb/myrocks_hotbackup.py_patched +--- mariadb-10.3.12/storage/rocksdb/myrocks_hotbackup.py 2019-01-04 16:28:50.000000000 +0100 ++++ mariadb-10.3.12/storage/rocksdb/myrocks_hotbackup.py_patched 2019-01-08 12:00:54.468750863 +0100 @@ -1,4 +1,4 @@ --#!/usr/bin/env python +-#!@PYTHON_SHEBANG@ +#!/usr/bin/python2 from __future__ import division diff --git a/mariadb.spec b/mariadb.spec index 6329943..f09a251 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -142,7 +142,7 @@ %global sameevr %{epoch}:%{version}-%{release} Name: mariadb -Version: 10.3.11 +Version: 10.3.12 Release: 1%{?with_debug:.debug}%{?dist} Epoch: 3 @@ -793,6 +793,7 @@ export CFLAGS CXXFLAGS -DINSTALL_SCRIPTDIR=bin \ -DINSTALL_SQLBENCHDIR=share \ -DINSTALL_SUPPORTFILESDIR=share/%{pkg_name} \ + -DINSTALL_PCDIR=%{_lib}/pkgconfig \ -DMYSQL_DATADIR="%{dbdatadir}" \ -DMYSQL_UNIX_ADDR="/var/lib/mysql/mysql.sock" \ -DTMPDIR=/var/tmp \ @@ -818,6 +819,7 @@ export CFLAGS CXXFLAGS -DPLUGIN_TOKUDB=%{?with_tokudb:DYNAMIC}%{!?with_tokudb:NO} \ -DPLUGIN_CONNECT=%{?with_connect:DYNAMIC}%{!?with_connect:NO} \ -DWITH_CASSANDRA=%{?with_cassandra:TRUE}%{!?with_cassandra:FALSE} \ + -DPLUGIN_CACHING_SHA2_PASSWORD=%{?with_clibrary:DYNAMIC}%{!?with_clibrary:OFF} \ -DPLUGIN_AWS_KEY_MANAGEMENT=NO \ -DCONNECT_WITH_MONGO=OFF \ -DCONNECT_WITH_JDBC=OFF \ @@ -860,8 +862,9 @@ fi # Reported to upstream as: https://jira.mariadb.org/browse/MDEV-14340 # TODO: check, if it changes location inside that file depending on values passed to Cmake mkdir -p %{buildroot}/%{_libdir}/pkgconfig -mv %{buildroot}/%{_datadir}/pkgconfig/mariadb.pc %{buildroot}/%{_libdir}/pkgconfig -rm %{buildroot}/usr/lib/pkgconfig/libmariadb.pc +mv %{buildroot}/%{_datadir}/pkgconfig/*.pc %{buildroot}/%{_libdir}/pkgconfig +# Client part should be included in package 'mariadb-connector-c' +rm %{buildroot}%{_libdir}/pkgconfig/libmariadb.pc # install INFO_SRC, INFO_BIN into libdir (upstream thinks these are doc files, # but that's pretty wacko --- see also %%{name}-file-contents.patch) @@ -1044,6 +1047,7 @@ rm %{buildroot}%{_mandir}/man1/tokuftdump.1* rm %{buildroot}%{_mandir}/man1/tokuft_logprint.1* %else %if 0%{?fedora} >= 28 || 0%{?rhel} > 7 +mkdir -p %{buildroot}%{_sysconfdir}/systemd/system/mariadb.service.d echo 'Environment="LD_PRELOAD=%{_libdir}/libjemalloc.so.2"' >> %{buildroot}%{_sysconfdir}/systemd/system/mariadb.service.d/tokudb.conf %endif # Move to better location, systemd config files has to be in /lib/ @@ -1560,6 +1564,12 @@ fi %endif %changelog +* Tue Jan 08 2019 Michal Schorm - 3:10.3.12-1 +- Rebase to 10.3.12 +- Disable building of the caching_sha2_password plugin, it is shipped + by 'mariadb-connector-c' +- Remove libmariadb.pc, is it shipped by 'mariadb-connector-c' + * Mon Dec 10 2018 Michal Schorm - 3:10.3.11-1 - Rebase to 10.3.11 - CVEs fixed: diff --git a/sources b/sources index d49a3e9..95b6891 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (mariadb-10.3.11.tar.gz) = 1adc1f9bbabf848726c669a7a0ab01257ba31882758b53fbf3b1316f2295670dba1c3d1f3292d7c1a749c701504588694a55d020839e690595897b0e20435298 +SHA512 (mariadb-10.3.12.tar.gz) = 9dd2939684c4591db306be6afb34663626dfaae133f88dd31125c759dce16b9e9d767a9254e30d9ee5fa2ea027e223dd4799effba8a8b0e4638d5de9e2512003 From 4f1f8bb5b67cc499d5a7c508ad0f8ea2337c0696 Mon Sep 17 00:00:00 2001 From: Honza Horak Date: Wed, 9 Jan 2019 21:25:26 +0100 Subject: [PATCH 05/49] Use specific python shebang --- mariadb-myrocks-hotbackup.patch | 32 ++++++++++++++++++++++++++++++++ mariadb-pythonver.patch | 30 ++++++++++++++++++++++++++++++ mariadb.spec | 20 +++++++++++++++++--- 3 files changed, 79 insertions(+), 3 deletions(-) create mode 100644 mariadb-myrocks-hotbackup.patch create mode 100644 mariadb-pythonver.patch diff --git a/mariadb-myrocks-hotbackup.patch b/mariadb-myrocks-hotbackup.patch new file mode 100644 index 0000000..ff2a1b1 --- /dev/null +++ b/mariadb-myrocks-hotbackup.patch @@ -0,0 +1,32 @@ +Do not import commands library as it is not used + +It also makes the script not work on python3, but since the script already uses +subprocess in practice, removing commands import is effectively no change and +fixes the python3 compatibility. + +Upstream PR: https://github.com/MariaDB/server/pull/1080 + +From 9c89fd49a757a87ba5899b3548b0fb1d172c0ec3 Mon Sep 17 00:00:00 2001 +From: Honza Horak +Date: Wed, 9 Jan 2019 15:05:02 +0100 +Subject: [PATCH] Do not import commands library as it is not used + +--- + storage/rocksdb/myrocks_hotbackup.py | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/storage/rocksdb/myrocks_hotbackup.py b/storage/rocksdb/myrocks_hotbackup.py +index 69c75b7cbfd..906ba814776 100755 +--- a/storage/rocksdb/myrocks_hotbackup.py ++++ b/storage/rocksdb/myrocks_hotbackup.py +@@ -8,7 +8,6 @@ import os + import stat + import sys + import re +-import commands + import subprocess + import logging + import logging.handlers +-- +2.17.2 + diff --git a/mariadb-pythonver.patch b/mariadb-pythonver.patch new file mode 100644 index 0000000..e667a76 --- /dev/null +++ b/mariadb-pythonver.patch @@ -0,0 +1,30 @@ +Upstream PR: https://github.com/MariaDB/server/pull/1081 + +From d2cbf56d36e422802aa7e53ec0f4e6be8fd53cf5 Mon Sep 17 00:00:00 2001 +From: Honza Horak +Date: Wed, 9 Jan 2019 20:17:29 +0100 +Subject: [PATCH] Make the PYTHON_SHEBANG value configurable + +In Fedora 30 it is required to specify either /usr/bin/python2 or /usr/bin/python3 in the shebang, so we need a way to say explicit shebang, ideally in the cmake call. +--- + CMakeLists.txt | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a139c9e5fa4..ccccb08bef1 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -342,7 +342,9 @@ MYSQL_CHECK_SSL() + MYSQL_CHECK_READLINE() + + SET(MALLOC_LIBRARY "system") +-SET(PYTHON_SHEBANG "/usr/bin/env python") ++IF(NOT DEFINED PYTHON_SHEBANG) ++ SET(PYTHON_SHEBANG "/usr/bin/env python") ++ENDIF() + + CHECK_PCRE() + +-- +2.17.2 + diff --git a/mariadb.spec b/mariadb.spec index f09a251..f25235f 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -109,6 +109,13 @@ %global pcre_bundled_version 8.42 %endif +# Use main python interpretter version +%if 0%{?fedora} || 0%{?rhel} > 7 +%global python_path /usr/bin/python3 +%else +%global python_path /usr/bin/python2 +%endif + # Include systemd files %global daemon_name %{name} %global daemondir %{_unitdir} @@ -143,7 +150,7 @@ Name: mariadb Version: 10.3.12 -Release: 1%{?with_debug:.debug}%{?dist} +Release: 2%{?with_debug:.debug}%{?dist} Epoch: 3 Summary: A very fast and robust SQL database server @@ -176,8 +183,10 @@ Source71: LICENSE.clustercheck # https://jira.mariadb.org/browse/MDEV-12646 Source72: mariadb-server-galera.te -# Patch1: Fix python shebang to specificaly say the python version -Patch1: %{pkgnamepatch}-shebang.patch +# Patch1: Make the myrocks_hotbackup script python3 compatible +Patch1: %{pkgnamepatch}-myrocks-hotbackup.patch +# Patch2: Make the python interpretter be configurable +Patch2: %{pkgnamepatch}-pythonver.patch # Patch4: Red Hat distributions specific logrotate fix # it would be big unexpected change, if we start shipping it now. Better wait for MariaDB 10.2 Patch4: %{pkgnamepatch}-logrotate.patch @@ -680,6 +689,7 @@ sources. find . -name "*.jar" -type f -exec rm --verbose -f {} \; %patch1 -p1 +%patch2 -p1 %patch4 -p1 %patch7 -p1 %patch9 -p1 @@ -819,6 +829,7 @@ export CFLAGS CXXFLAGS -DPLUGIN_TOKUDB=%{?with_tokudb:DYNAMIC}%{!?with_tokudb:NO} \ -DPLUGIN_CONNECT=%{?with_connect:DYNAMIC}%{!?with_connect:NO} \ -DWITH_CASSANDRA=%{?with_cassandra:TRUE}%{!?with_cassandra:FALSE} \ + -DPYTHON_SHEBANG=%{python_path} \ -DPLUGIN_CACHING_SHA2_PASSWORD=%{?with_clibrary:DYNAMIC}%{!?with_clibrary:OFF} \ -DPLUGIN_AWS_KEY_MANAGEMENT=NO \ -DCONNECT_WITH_MONGO=OFF \ @@ -1564,6 +1575,9 @@ fi %endif %changelog +* Wed Jan 09 2019 Honza Horak - 3:10.3.12-2 +- Use specific python shebang + * Tue Jan 08 2019 Michal Schorm - 3:10.3.12-1 - Rebase to 10.3.12 - Disable building of the caching_sha2_password plugin, it is shipped From e5d3c9353618c63adb156f061a4e9153ab3827a4 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Fri, 11 Jan 2019 17:17:14 -0800 Subject: [PATCH 06/49] Drop mysql-selinux recommends for now due to bug #1665643 --- mariadb.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/mariadb.spec b/mariadb.spec index f25235f..90f485c 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -150,7 +150,7 @@ Name: mariadb Version: 10.3.12 -Release: 2%{?with_debug:.debug}%{?dist} +Release: 3%{?with_debug:.debug}%{?dist} Epoch: 3 Summary: A very fast and robust SQL database server @@ -408,7 +408,8 @@ Requires: %{_sysconfdir}/my.cnf Requires: %{_sysconfdir}/my.cnf.d # Aditional SELinux rules shipped in a separate package -Recommends: mysql-selinux +# Disabled until https://bugzilla.redhat.com/show_bug.cgi?id=1665643 is fixed. +#Recommends: mysql-selinux # for fuser in mysql-check-socket Requires: psmisc @@ -1575,6 +1576,9 @@ fi %endif %changelog +* Fri Jan 11 2019 Kevin Fenzi - 3:10.3.12-3 +- Drop mysql-selinux recommends for now due to bug #1665643 + * Wed Jan 09 2019 Honza Horak - 3:10.3.12-2 - Use specific python shebang From e00d26b60c5f5dce2d853d5909b1c8c238906e96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= Date: Mon, 14 Jan 2019 19:08:29 +0100 Subject: [PATCH 07/49] Rebuilt for libcrypt.so.2 (#1666033) --- mariadb.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mariadb.spec b/mariadb.spec index 90f485c..3164c2a 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -150,7 +150,7 @@ Name: mariadb Version: 10.3.12 -Release: 3%{?with_debug:.debug}%{?dist} +Release: 4%{?with_debug:.debug}%{?dist} Epoch: 3 Summary: A very fast and robust SQL database server @@ -1576,6 +1576,9 @@ fi %endif %changelog +* Mon Jan 14 2019 Björn Esser - 3:10.3.12-4 +- Rebuilt for libcrypt.so.2 (#1666033) + * Fri Jan 11 2019 Kevin Fenzi - 3:10.3.12-3 - Drop mysql-selinux recommends for now due to bug #1665643 From 49fab2f9eedc85c570741ccff709fb17078d1af1 Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Wed, 16 Jan 2019 12:48:02 +0100 Subject: [PATCH 08/49] Tweak handling of the mysql-selinux requirement --- mariadb.spec | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/mariadb.spec b/mariadb.spec index 3164c2a..70c7f40 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -8,6 +8,10 @@ # Set this to 1 to see which tests fail, but 0 on production ready build %global ignore_testsuite_result 0 +# Aditional SELinux rules +# Disabled until https://bugzilla.redhat.com/show_bug.cgi?id=1665643 is fixed +%global require_mysql_selinux 0 + # In f20+ use unversioned docdirs, otherwise the old versioned one %global _pkgdocdirname %{pkg_name}%{!?_pkgdocdir:-%{version}} %{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{pkg_name}-%{version}} @@ -150,7 +154,7 @@ Name: mariadb Version: 10.3.12 -Release: 4%{?with_debug:.debug}%{?dist} +Release: 5%{?with_debug:.debug}%{?dist} Epoch: 3 Summary: A very fast and robust SQL database server @@ -407,9 +411,11 @@ Suggests: logrotate Requires: %{_sysconfdir}/my.cnf Requires: %{_sysconfdir}/my.cnf.d -# Aditional SELinux rules shipped in a separate package -# Disabled until https://bugzilla.redhat.com/show_bug.cgi?id=1665643 is fixed. -#Recommends: mysql-selinux +# Aditional SELinux rules (common for MariaDB & MySQL) shipped in a separate package +# For cases, where we want to fix a SELinux issues in MariaDB sooner than patched selinux-policy-targeted package is released +%if %require_mysql_selinux +Requires: (mysql-selinux if selinux-policy-targeted) +%endif # for fuser in mysql-check-socket Requires: psmisc @@ -1576,6 +1582,9 @@ fi %endif %changelog +* Wed Jan 16 2019 Michal Schorm - 3:10.3.12-5 +- Tweak handling of the mysql-selinux requirement, leave disabled due to #1665643 + * Mon Jan 14 2019 Björn Esser - 3:10.3.12-4 - Rebuilt for libcrypt.so.2 (#1666033) From 4c38589fa0a2c2a4149ed4d05e455b18952ffa16 Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Thu, 17 Jan 2019 10:48:44 +0100 Subject: [PATCH 09/49] Update commands for newer CMake --- mariadb.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mariadb.spec b/mariadb.spec index 70c7f40..74e1c62 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -844,8 +844,8 @@ export CFLAGS CXXFLAGS %{?with_debug: -DCMAKE_BUILD_TYPE=Debug -DWITH_ASAN=OFF -DWITH_INNODB_EXTRA_DEBUG=ON -DWITH_VALGRIND=ON} # Print all Cmake options values -# cmake -LAH for List Advanced Help -cmake -L +# cmake ./ -LAH for List Advanced Help +cmake ./ -L make %{?_smp_mflags} VERBOSE=1 From 4cd2a4be5473783c5af7523b81e3a62459604e4d Mon Sep 17 00:00:00 2001 From: Carl George Date: Thu, 17 Jan 2019 10:48:21 -0600 Subject: [PATCH 10/49] Fix ggsapi typo --- mariadb.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mariadb.spec b/mariadb.spec index 74e1c62..69cf6e8 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -1000,7 +1000,7 @@ rm -r %{buildroot}%{_datadir}/%{pkg_name}/policy/apparmor chmod -x %{buildroot}%{_datadir}/sql-bench/myisam.cnf # Disable plugins -%if %{with ggsapi} +%if %{with gssapi} sed -i 's/^plugin-load-add/#plugin-load-add/' %{buildroot}%{_sysconfdir}/my.cnf.d/auth_gssapi.cnf %endif %if %{with cracklib} @@ -1359,7 +1359,7 @@ fi %{?with_cracklib:%exclude %{_libdir}/%{pkg_name}/plugin/cracklib_password_check.so} %{?with_rocksdb:%exclude %{_libdir}/%{pkg_name}/plugin/ha_rocksdb.so} %{?with_tokudb:%exclude %{_libdir}/%{pkg_name}/plugin/ha_tokudb.so} -%{?with_ggsapi:%exclude %{_libdir}/%{pkg_name}/plugin/auth_gssapi.so} +%{?with_gssapi:%exclude %{_libdir}/%{pkg_name}/plugin/auth_gssapi.so} %{?with_sphinx:%exclude %{_libdir}/%{pkg_name}/plugin/ha_sphinx.so} %{?with_cassandra:%exclude %{_libdir}/%{pkg_name}/plugin/ha_cassandra.so} %if %{with clibrary} From a444b291f8223d243da003726ebc6dcbc39ad1be Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Sat, 19 Jan 2019 00:57:35 +0100 Subject: [PATCH 11/49] Tweak the testsuite execution, speed up the testsuite on rebuilds Enable mysql-selinux requirement --- mariadb.spec | 63 +++++++++++++++++++++++++++++++++------------------- 1 file changed, 40 insertions(+), 23 deletions(-) diff --git a/mariadb.spec b/mariadb.spec index 69cf6e8..9093a91 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -8,9 +8,15 @@ # Set this to 1 to see which tests fail, but 0 on production ready build %global ignore_testsuite_result 0 +# The last version on which the full testsuite has been run +# In case of further rebuilds of that version, don't require full testsuite to be run +# run only "main" suite +%global last_tested_version 10.3.12 +# Set to 1 to force run the testsuite even if it was already tested in current version +%global force_run_testsuite 0 + # Aditional SELinux rules -# Disabled until https://bugzilla.redhat.com/show_bug.cgi?id=1665643 is fixed -%global require_mysql_selinux 0 +%global require_mysql_selinux 1 # In f20+ use unversioned docdirs, otherwise the old versioned one %global _pkgdocdirname %{pkg_name}%{!?_pkgdocdir:-%{version}} @@ -154,7 +160,7 @@ Name: mariadb Version: 10.3.12 -Release: 5%{?with_debug:.debug}%{?dist} +Release: 6%{?with_debug:.debug}%{?dist} Epoch: 3 Summary: A very fast and robust SQL database server @@ -1144,28 +1150,35 @@ export MTR_BUILD_THREAD=%{__isa_bits} ( set -ex - cd mysql-test - perl ./mysql-test-run.pl --parallel=auto --force --retry=1 --ssl \ - --suite-timeout=900 --testcase-timeout=30 \ - --mysqld=--binlog-format=mixed --force-restart \ - --shutdown-timeout=60 --max-test-fail=5 --big-test \ - --skip-test=spider \ -%if %{ignore_testsuite_result} - --max-test-fail=9999 || : -%else - --skip-test-list=unstable-tests -%endif -# Second run for the SPIDER suites that fail with SCA (ssl self signed certificate) - perl ./mysql-test-run.pl --parallel=auto --force --retry=1 \ - --suite-timeout=60 --testcase-timeout=10 \ - --mysqld=--binlog-format=mixed --force-restart \ - --shutdown-timeout=60 --max-test-fail=0 --big-test \ - --skip-ssl --suite=spider,spider/bg \ -%if %{ignore_testsuite_result} - --max-test-fail=999 || : -%endif + export common_testsuite_arguments=" --parallel=auto --force --retry=1 --suite-timeout=900 --testcase-timeout=30 --mysqld=--binlog-format=mixed --force-restart --shutdown-timeout=60 --max-test-fail=5 " + + # If full testsuite has already been run on this version and we don't explicitly want the full testsuite to be run + if [[ "%{last_tested_version}" == "%{version}" ]] && [[ %{force_run_testsuite} -eq 0 ]] + then + # in further rebuilds only run the basic "main" suite (~800 tests) + echo "running only base testsuite" + perl ./mysql-test-run.pl $common_testsuite_arguments --ssl --suite=main --mem --skip-test-list=unstable-tests + fi + + # If either this version wasn't marked as tested yet or I explicitly want to run the testsuite, run everything we have (~4000 test) + if [[ "%{last_tested_version}" != "%{version}" ]] || [[ %{force_run_testsuite} -ne 0 ]] + then + echo "running advanced testsuite" + perl ./mysql-test-run.pl $common_testsuite_arguments --ssl --big-test --skip-test=spider \ + %if %{ignore_testsuite_result} + --max-test-fail=9999 || : + %else + --skip-test-list=unstable-tests + %endif + # Second run for the SPIDER suites that fail with SCA (ssl self signed certificate) + perl ./mysql-test-run.pl $common_testsuite_arguments --skip-ssl --big-test --mem --suite=spider,spider/bg \ + %if %{ignore_testsuite_result} + --max-test-fail=999 || : + %endif + # blank line + fi ) %endif # if dry run @@ -1582,6 +1595,10 @@ fi %endif %changelog +* Sat Jan 19 2019 Michal Schorm - 3:10.3.12-6 +- Enable mysql-selinux requirement +- Tweak the testsuite execution, speed up the testsuite on rebuilds + * Wed Jan 16 2019 Michal Schorm - 3:10.3.12-5 - Tweak handling of the mysql-selinux requirement, leave disabled due to #1665643 From 4ea2bb47f22cb826f378190bb83e7de96ac8e117 Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Mon, 21 Jan 2019 13:56:44 +0100 Subject: [PATCH 12/49] Change weak dependency of RocksDB and TokuDB storage engines from Recommends to Suggests Add "Suggests" weak dependencies to more storage engines --- mariadb.spec | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/mariadb.spec b/mariadb.spec index 9093a91..72af6d4 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -406,10 +406,14 @@ Requires: %{name}-common%{?_isa} = %{sameevr} Requires: %{name}-errmsg%{?_isa} = %{sameevr} Recommends: %{name}-server-utils%{?_isa} = %{sameevr} Recommends: %{name}-backup%{?_isa} = %{sameevr} -%{?with_cracklib:Recommends: %{name}-cracklib-password-check%{?_isa} = %{sameevr}} -%{?with_gssapi:Recommends: %{name}-gssapi-server%{?_isa} = %{sameevr}} -%{?with_rocksdb:Recommends: %{name}-rocksdb-engine%{?_isa} = %{sameevr}} -%{?with_tokudb:Recommends: %{name}-tokudb-engine%{?_isa} = %{sameevr}} +%{?with_cracklib:Recommends: %{name}-cracklib-password-check%{?_isa} = %{sameevr}} +%{?with_gssapi:Recommends: %{name}-gssapi-server%{?_isa} = %{sameevr}} +%{?with_rocksdb:Suggests: %{name}-rocksdb-engine%{?_isa} = %{sameevr}} +%{?with_tokudb:Suggests: %{name}-tokudb-engine%{?_isa} = %{sameevr}} +%{?with_sphinx:Suggests: %{name}-sphinx-engine%{?_isa} = %{sameevr}} +%{?with_oqgraph:Suggests: %{name}-oqgraph-engine%{?_isa} = %{sameevr}} +%{?with_connect:Suggests: %{name}-connect-engine%{?_isa} = %{sameevr}} +%{?with_cassandra:Suggests: %{name}-cassandra-engine%{?_isa} = %{sameevr}} Suggests: mytop Suggests: logrotate @@ -1598,6 +1602,9 @@ fi * Sat Jan 19 2019 Michal Schorm - 3:10.3.12-6 - Enable mysql-selinux requirement - Tweak the testsuite execution, speed up the testsuite on rebuilds +- Change weak dependency of RocksDB and TokuDB storage engines + from Recommends to Suggests +- Add "Suggests" weak dependencies to more storage engines * Wed Jan 16 2019 Michal Schorm - 3:10.3.12-5 - Tweak handling of the mysql-selinux requirement, leave disabled due to #1665643 From fba85c10dd3ffc0f2ababc568440fa7eb345d1b0 Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Wed, 23 Jan 2019 19:46:37 +0100 Subject: [PATCH 13/49] Fix TokuDB Jemalloc ld_preload; #1668375 Tweak macros usage --- mariadb.spec | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/mariadb.spec b/mariadb.spec index 72af6d4..035a31d 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -128,7 +128,6 @@ # Include systemd files %global daemon_name %{name} -%global daemondir %{_unitdir} %global daemon_no_prefix %{pkg_name} %global mysqld_pid_dir mariadb @@ -160,7 +159,7 @@ Name: mariadb Version: 10.3.12 -Release: 6%{?with_debug:.debug}%{?dist} +Release: 7%{?with_debug:.debug}%{?dist} Epoch: 3 Summary: A very fast and robust SQL database server @@ -1075,11 +1074,9 @@ rm %{buildroot}%{_mandir}/man1/tokuftdump.1* rm %{buildroot}%{_mandir}/man1/tokuft_logprint.1* %else %if 0%{?fedora} >= 28 || 0%{?rhel} > 7 -mkdir -p %{buildroot}%{_sysconfdir}/systemd/system/mariadb.service.d -echo 'Environment="LD_PRELOAD=%{_libdir}/libjemalloc.so.2"' >> %{buildroot}%{_sysconfdir}/systemd/system/mariadb.service.d/tokudb.conf +mkdir -p %{buildroot}%{_unitdir}/mariadb.service.d +echo -e '[Service]\nEnvironment="LD_PRELOAD=%{_libdir}/libjemalloc.so.2"' >> %{buildroot}%{_unitdir}/mariadb.service.d/tokudb.conf %endif -# Move to better location, systemd config files has to be in /lib/ -mv %{buildroot}%{_sysconfdir}/systemd/system/mariadb.service.d %{buildroot}/usr/lib/systemd/system/ %endif %if %{without config} @@ -1443,7 +1440,9 @@ fi %{_datadir}/%{pkg_name}/systemd/mariadb@.service %endif -%{daemondir}/%{daemon_name}* +%{_unitdir}/%{daemon_name}* +%{?with_tokudb:%exclude %{_unitdir}/mariadb.service.d/tokudb.conf} + %{_libexecdir}/mysql-prepare-db-dir %{_libexecdir}/mysql-check-socket %{_libexecdir}/mysql-check-upgrade @@ -1492,7 +1491,7 @@ fi %{_mandir}/man1/tokuft_logprint.1* %config(noreplace) %{_sysconfdir}/my.cnf.d/tokudb.cnf %{_libdir}/%{pkg_name}/plugin/ha_tokudb.so -/usr/lib/systemd/system/mariadb.service.d/tokudb.conf +%{_unitdir}/mariadb.service.d/tokudb.conf %endif %if %{with gssapi} @@ -1599,6 +1598,11 @@ fi %endif %changelog +* Wed Jan 23 2019 Michal Schorm - 3:10.3.12-7 +- Fix TokuDB Jemalloc ld_preload + Resolves: #1668375 +- Tweak macros usage + * Sat Jan 19 2019 Michal Schorm - 3:10.3.12-6 - Enable mysql-selinux requirement - Tweak the testsuite execution, speed up the testsuite on rebuilds From 73b0cf5ba22c962a64a9bcb227421d44fbbc1730 Mon Sep 17 00:00:00 2001 From: Honza Horak Date: Wed, 30 Jan 2019 07:25:50 +0100 Subject: [PATCH 14/49] Fix several SSL tests that failed because of different SSL cipher expectation --- mariadb-ssl-cipher-tests.patch | 52 ++++++++++++++++++++++++++++++++++ mariadb.spec | 8 +++++- rh-skipped-tests-base.list | 8 ------ 3 files changed, 59 insertions(+), 9 deletions(-) create mode 100644 mariadb-ssl-cipher-tests.patch diff --git a/mariadb-ssl-cipher-tests.patch b/mariadb-ssl-cipher-tests.patch new file mode 100644 index 0000000..3d04c4c --- /dev/null +++ b/mariadb-ssl-cipher-tests.patch @@ -0,0 +1,52 @@ +diff -up mariadb-10.3.9/mysql-test/main/ssl_cipher.test.fixtest mariadb-10.3.9/mysql-test/main/ssl_cipher.test +--- mariadb-10.3.9/mysql-test/main/ssl_cipher.test.fixtest 2019-01-27 19:39:19.610027153 +0100 ++++ mariadb-10.3.9/mysql-test/main/ssl_cipher.test 2019-01-27 19:42:10.045430776 +0100 +@@ -13,7 +13,9 @@ + connect (ssl_con,localhost,root,,,,,SSL); + + # Check Cipher Name and Cipher List ++--replace_regex /TLS_AES_.*/AES128-SHA/ + SHOW STATUS LIKE 'Ssl_cipher'; ++--replace_regex /TLS_AES_.*/AES128-SHA/ + SHOW STATUS LIKE 'Ssl_cipher_list'; + + connection default; +diff -up mariadb-10.3.9/mysql-test/main/ssl.result.fixtestssl mariadb-10.3.9/mysql-test/main/ssl.result +--- mariadb-10.3.9/mysql-test/main/ssl.result.fixtestssl 2019-01-27 20:41:52.605213547 +0100 ++++ mariadb-10.3.9/mysql-test/main/ssl.result 2019-01-27 20:42:03.977320005 +0100 +@@ -2176,7 +2176,7 @@ still connected? + connection default; + disconnect ssl_con; + create user mysqltest_1@localhost; +-grant usage on mysqltest.* to mysqltest_1@localhost require cipher "AES256-SHA"; ++grant usage on mysqltest.* to mysqltest_1@localhost require cipher "TLS_AES_256_GCM_SHA384"; + Variable_name Value +-Ssl_cipher AES256-SHA ++Ssl_cipher TLS_AES_256_GCM_SHA384 + drop user mysqltest_1@localhost; +diff -up mariadb-10.3.9/mysql-test/main/ssl.test.fixtestssl mariadb-10.3.9/mysql-test/main/ssl.test +--- mariadb-10.3.9/mysql-test/main/ssl.test.fixtestssl 2019-01-27 20:40:39.756531579 +0100 ++++ mariadb-10.3.9/mysql-test/main/ssl.test 2019-01-27 20:41:02.631745724 +0100 +@@ -33,8 +33,8 @@ connection default; + disconnect ssl_con; + + create user mysqltest_1@localhost; +-grant usage on mysqltest.* to mysqltest_1@localhost require cipher "AES256-SHA"; +---exec $MYSQL -umysqltest_1 --ssl-cipher=AES256-SHA -e "show status like 'ssl_cipher'" 2>&1 ++grant usage on mysqltest.* to mysqltest_1@localhost require cipher "TLS_AES_256_GCM_SHA384"; ++--exec $MYSQL -umysqltest_1 --ssl-cipher=TLS_AES_256_GCM_SHA384 -e "show status like 'ssl_cipher'" 2>&1 + drop user mysqltest_1@localhost; + + # Wait till all disconnects are completed +diff -up mariadb-10.3.9/mysql-test/main/ssl_cert_verify.test.fixcerttest mariadb-10.3.9/mysql-test/main/ssl_cert_verify.test +--- mariadb-10.3.9/mysql-test/main/ssl_cert_verify.test.fixcerttest 2019-01-27 21:11:12.280726041 +0100 ++++ mariadb-10.3.9/mysql-test/main/ssl_cert_verify.test 2019-01-27 21:10:01.034041434 +0100 +@@ -30,7 +30,7 @@ let $ssl_verify_pass_path = --ssl --ssl- + --enable_reconnect + --source include/wait_until_connected_again.inc + +---replace_result TLSv1.2 TLS_VERSION TLSv1.1 TLS_VERSION TLSv1 TLS_VERSION ++--replace_result TLSv1.3 TLS_VERSION TLSv1.2 TLS_VERSION TLSv1.1 TLS_VERSION TLSv1 TLS_VERSION + --exec $MYSQL --protocol=tcp --ssl-ca=$MYSQL_TEST_DIR/std_data/ca-cert-verify.pem --ssl-verify-server-cert -e "SHOW STATUS like 'Ssl_version'" + + --echo # restart server using restart diff --git a/mariadb.spec b/mariadb.spec index 035a31d..92dc0ac 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -159,7 +159,7 @@ Name: mariadb Version: 10.3.12 -Release: 7%{?with_debug:.debug}%{?dist} +Release: 8%{?with_debug:.debug}%{?dist} Epoch: 3 Summary: A very fast and robust SQL database server @@ -203,6 +203,8 @@ Patch4: %{pkgnamepatch}-logrotate.patch Patch7: %{pkgnamepatch}-scripts.patch # Patch9: pre-configure to comply with guidelines Patch9: %{pkgnamepatch}-ownsetup.patch +# Patch10: Fix cipher name in the SSL Cipher name test +Patch10: %{pkgnamepatch}-ssl-cipher-tests.patch BuildRequires: cmake gcc-c++ BuildRequires: multilib-rpm-config @@ -709,6 +711,7 @@ find . -name "*.jar" -type f -exec rm --verbose -f {} \; %patch4 -p1 %patch7 -p1 %patch9 -p1 +%patch10 -p1 # workaround for upstream bug #56342 #rm mysql-test/t/ssl_8k_key-master.opt @@ -1598,6 +1601,9 @@ fi %endif %changelog +* Wed Jan 30 2019 Honza Horak - 3:10.3.12-8 +- Fix several SSL tests that failed because of different SSL cipher expectation + * Wed Jan 23 2019 Michal Schorm - 3:10.3.12-7 - Fix TokuDB Jemalloc ld_preload Resolves: #1668375 diff --git a/rh-skipped-tests-base.list b/rh-skipped-tests-base.list index 62a1726..e41440b 100644 --- a/rh-skipped-tests-base.list +++ b/rh-skipped-tests-base.list @@ -2,16 +2,8 @@ # https://jira.mariadb.org/browse/MDEV-8404?focusedCommentId=84275&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-84275 main.ssl_7937 : #1399847 main.ssl_crl_clients : #1399847 -main.ssl_cert_verify : - main.ssl_8k_key : -# From 10.3.9 -main.openssl_1 : -main.openssl_6975 : -main.ssl : -main.ssl_cipher : - # perfschema.nesting : #1399847 perfschema.socket_summary_by_instance_func : #1399847 From 6ec65c33b713c83a38997d73d3167ba32fda3d37 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 1 Feb 2019 09:39:27 +0000 Subject: [PATCH 15/49] - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- mariadb.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mariadb.spec b/mariadb.spec index 92dc0ac..3869625 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -159,7 +159,7 @@ Name: mariadb Version: 10.3.12 -Release: 8%{?with_debug:.debug}%{?dist} +Release: 9%{?with_debug:.debug}%{?dist} Epoch: 3 Summary: A very fast and robust SQL database server @@ -1601,6 +1601,9 @@ fi %endif %changelog +* Fri Feb 01 2019 Fedora Release Engineering - 3:10.3.12-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + * Wed Jan 30 2019 Honza Horak - 3:10.3.12-8 - Fix several SSL tests that failed because of different SSL cipher expectation From 44e21fbd64582eddba0b867e6144fe835af5350a Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Mon, 11 Feb 2019 10:57:03 +0100 Subject: [PATCH 16/49] Disable again the 'mysql-selinux' requirement. Bug remained, #1665643 --- mariadb.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mariadb.spec b/mariadb.spec index 3869625..ceaf8da 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -16,7 +16,7 @@ %global force_run_testsuite 0 # Aditional SELinux rules -%global require_mysql_selinux 1 +%global require_mysql_selinux 0 # In f20+ use unversioned docdirs, otherwise the old versioned one %global _pkgdocdirname %{pkg_name}%{!?_pkgdocdir:-%{version}} @@ -159,7 +159,7 @@ Name: mariadb Version: 10.3.12 -Release: 9%{?with_debug:.debug}%{?dist} +Release: 10%{?with_debug:.debug}%{?dist} Epoch: 3 Summary: A very fast and robust SQL database server @@ -1601,6 +1601,9 @@ fi %endif %changelog +* Mon Feb 11 2019 Michal Schorm - 3:10.3.12-10 +- Disable the requirement of mysql-selinux, until its bug is solved for good; #1665643 + * Fri Feb 01 2019 Fedora Release Engineering - 3:10.3.12-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild From cbeee534b248fe368f30814f886e00a2c03650d1 Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Sat, 23 Feb 2019 10:57:40 +0100 Subject: [PATCH 17/49] conditionally depend on selinux-policy-targeted again Related: rhbz#1665643 Version: 10.3.12-11 --- mariadb.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mariadb.spec b/mariadb.spec index ceaf8da..adb6222 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -16,7 +16,7 @@ %global force_run_testsuite 0 # Aditional SELinux rules -%global require_mysql_selinux 0 +%global require_mysql_selinux 1 # In f20+ use unversioned docdirs, otherwise the old versioned one %global _pkgdocdirname %{pkg_name}%{!?_pkgdocdir:-%{version}} @@ -159,7 +159,7 @@ Name: mariadb Version: 10.3.12 -Release: 10%{?with_debug:.debug}%{?dist} +Release: 11%{?with_debug:.debug}%{?dist} Epoch: 3 Summary: A very fast and robust SQL database server @@ -1601,6 +1601,9 @@ fi %endif %changelog +* Sat Feb 23 2019 Pavel Raiskup - 10.3.12-11 +- conditionally depend on selinux-policy-targeted again (rhbz#1665643) + * Mon Feb 11 2019 Michal Schorm - 3:10.3.12-10 - Disable the requirement of mysql-selinux, until its bug is solved for good; #1665643 From 943502fb6d2f17f263f94b72c5a7e48fb627b5b9 Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Wed, 20 Mar 2019 18:07:41 +0100 Subject: [PATCH 18/49] Add patch for server pkgconfig file location --- mariadb-pcdir.patch | 20 ++++++++++++++++++++ mariadb.spec | 20 ++++++++++++-------- 2 files changed, 32 insertions(+), 8 deletions(-) create mode 100644 mariadb-pcdir.patch diff --git a/mariadb-pcdir.patch b/mariadb-pcdir.patch new file mode 100644 index 0000000..d9a8a78 --- /dev/null +++ b/mariadb-pcdir.patch @@ -0,0 +1,20 @@ +Use PCDIR CMake option, if configured + +Upstream install the server pkgconfig file into arch-independent directory +Reported to upstream as: https://jira.mariadb.org/browse/MDEV-14340 + +--- mariadb-10.3.12/support-files/CMakeLists.txt 2019-03-20 15:25:53.423283135 +0100 ++++ mariadb-10.3.12/support-files/CMakeLists.txt_patched 2019-03-20 15:38:56.372819958 +0100 +@@ -82,7 +82,12 @@ IF(UNIX) + + CONFIGURE_FILE(mariadb.pc.in ${CMAKE_CURRENT_BINARY_DIR}/mariadb.pc @ONLY) + CONFIGURE_FILE(rpm/server.cnf ${CMAKE_CURRENT_BINARY_DIR}/rpm/server.cnf @ONLY) ++IF(INSTALL_PCDIR) ++ INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/mariadb.pc DESTINATION ${INSTALL_PCDIR} COMPONENT Development) ++ELSE() + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/mariadb.pc DESTINATION ${INSTALL_SHAREDIR}/pkgconfig COMPONENT Development) ++ENDIF() ++ + + INSTALL(FILES mysql.m4 DESTINATION ${INSTALL_SHAREDIR}/aclocal COMPONENT Development) + diff --git a/mariadb.spec b/mariadb.spec index adb6222..7e7dab4 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -85,6 +85,7 @@ %bcond_without test %bcond_without galera %bcond_without backup +# Upstream no longer maintain and pack the bench subpackage %if 0%{?fedora} %bcond_without bench %else @@ -159,7 +160,7 @@ Name: mariadb Version: 10.3.12 -Release: 11%{?with_debug:.debug}%{?dist} +Release: 12%{?with_debug:.debug}%{?dist} Epoch: 3 Summary: A very fast and robust SQL database server @@ -192,9 +193,9 @@ Source71: LICENSE.clustercheck # https://jira.mariadb.org/browse/MDEV-12646 Source72: mariadb-server-galera.te -# Patch1: Make the myrocks_hotbackup script python3 compatible +# Patch1: Make the myrocks_hotbackup script python3 compatible Patch1: %{pkgnamepatch}-myrocks-hotbackup.patch -# Patch2: Make the python interpretter be configurable +# Patch2: Make the python interpretter be configurable Patch2: %{pkgnamepatch}-pythonver.patch # Patch4: Red Hat distributions specific logrotate fix # it would be big unexpected change, if we start shipping it now. Better wait for MariaDB 10.2 @@ -205,6 +206,8 @@ Patch7: %{pkgnamepatch}-scripts.patch Patch9: %{pkgnamepatch}-ownsetup.patch # Patch10: Fix cipher name in the SSL Cipher name test Patch10: %{pkgnamepatch}-ssl-cipher-tests.patch +# Patch11: Use PCDIR CMake option, if configured +Patch11: %{pkgnamepatch}-pcdir.patch BuildRequires: cmake gcc-c++ BuildRequires: multilib-rpm-config @@ -712,6 +715,7 @@ find . -name "*.jar" -type f -exec rm --verbose -f {} \; %patch7 -p1 %patch9 -p1 %patch10 -p1 +%patch11 -p1 # workaround for upstream bug #56342 #rm mysql-test/t/ssl_8k_key-master.opt @@ -888,13 +892,10 @@ install -p -m 0755 scripts/mysql_config_multilib %{buildroot}%{_bindir}/mysql_co ln -s mysql_config.1 %{buildroot}%{_mandir}/man1/mysql_config-%{__isa_bits}.1 fi -# Upstream install this into arch-independent directory -# Reported to upstream as: https://jira.mariadb.org/browse/MDEV-14340 -# TODO: check, if it changes location inside that file depending on values passed to Cmake -mkdir -p %{buildroot}/%{_libdir}/pkgconfig -mv %{buildroot}/%{_datadir}/pkgconfig/*.pc %{buildroot}/%{_libdir}/pkgconfig +%if %{without clibrary} # Client part should be included in package 'mariadb-connector-c' rm %{buildroot}%{_libdir}/pkgconfig/libmariadb.pc +%endif # install INFO_SRC, INFO_BIN into libdir (upstream thinks these are doc files, # but that's pretty wacko --- see also %%{name}-file-contents.patch) @@ -1601,6 +1602,9 @@ fi %endif %changelog +* Wed Mar 20 2019 Michal Schorm - 10.3.12-12 +- Add patch for server pkgconfig file location + * Sat Feb 23 2019 Pavel Raiskup - 10.3.12-11 - conditionally depend on selinux-policy-targeted again (rhbz#1665643) From fe4891c5b8e6e5f0ce35328e3fa7b9e6efbb2644 Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Thu, 21 Mar 2019 11:38:58 +0100 Subject: [PATCH 19/49] Add patch for mysqld_safe --dry-run --- mariadb-mysqld_safe.patch | 17 +++++++++++++++++ mariadb.spec | 8 +++++++- 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 mariadb-mysqld_safe.patch diff --git a/mariadb-mysqld_safe.patch b/mariadb-mysqld_safe.patch new file mode 100644 index 0000000..cda0d3e --- /dev/null +++ b/mariadb-mysqld_safe.patch @@ -0,0 +1,17 @@ +Fix for: +/usr/bin/mysqld_safe: line 933: return: can only `return' from a function or sourced script + +Upstream PR: +https://github.com/MariaDB/server/pull/1238 + +--- mariadb-10.3.12/scripts/mysqld_safe.sh 2019-01-04 16:28:49.000000000 +0100 ++++ mariadb-10.3.12/scripts/mysqld_safe.sh_patched 2019-03-21 11:34:59.499309336 +0100 +@@ -929,7 +929,7 @@ do + cmd="$cmd "`shell_quote_string "$i"` + done + cmd="$cmd $args" +-[ $dry_run -eq 1 ] && return ++[ $dry_run -eq 1 ] && exit + + # Avoid 'nohup: ignoring input' warning + test -n "$NOHUP_NICENESS" && cmd="$cmd < /dev/null" diff --git a/mariadb.spec b/mariadb.spec index 7e7dab4..4742258 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -160,7 +160,7 @@ Name: mariadb Version: 10.3.12 -Release: 12%{?with_debug:.debug}%{?dist} +Release: 13%{?with_debug:.debug}%{?dist} Epoch: 3 Summary: A very fast and robust SQL database server @@ -208,6 +208,8 @@ Patch9: %{pkgnamepatch}-ownsetup.patch Patch10: %{pkgnamepatch}-ssl-cipher-tests.patch # Patch11: Use PCDIR CMake option, if configured Patch11: %{pkgnamepatch}-pcdir.patch +# Patch12: Fix mysqld_safe --dry-run +Patch12: %{pkgnamepatch}-mysqld_safe.patch BuildRequires: cmake gcc-c++ BuildRequires: multilib-rpm-config @@ -716,6 +718,7 @@ find . -name "*.jar" -type f -exec rm --verbose -f {} \; %patch9 -p1 %patch10 -p1 %patch11 -p1 +%patch12 -p1 # workaround for upstream bug #56342 #rm mysql-test/t/ssl_8k_key-master.opt @@ -1602,6 +1605,9 @@ fi %endif %changelog +* Thu Mar 21 2019 Michal Schorm - 10.3.12-13 +- Add patch for mysqld_safe --dry-run + * Wed Mar 20 2019 Michal Schorm - 10.3.12-12 - Add patch for server pkgconfig file location From 43e63f83dbd563e721416cdb44d799687d813aa7 Mon Sep 17 00:00:00 2001 From: Carl George Date: Fri, 3 May 2019 22:32:37 -0500 Subject: [PATCH 20/49] Use logrotateddir macro in one more spot --- mariadb.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mariadb.spec b/mariadb.spec index 4742258..f8cc08d 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -1008,7 +1008,7 @@ touch %{buildroot}%{_sysconfdir}/sysconfig/clustercheck install -p -m 0755 scripts/clustercheck %{buildroot}%{_bindir}/clustercheck # remove duplicate logrotate script -rm %{buildroot}%{_sysconfdir}/logrotate.d/mysql +rm %{buildroot}%{logrotateddir}/mysql # Remove AppArmor files rm -r %{buildroot}%{_datadir}/%{pkg_name}/policy/apparmor From df9d3ff3d85676b16d0d8e7baef8c99f0ef3e635 Mon Sep 17 00:00:00 2001 From: Carl George Date: Sat, 4 May 2019 04:46:30 +0000 Subject: [PATCH 21/49] Move mysqld_safe_helper back to server subpackage mysqld_safe is a script that calls the mysqld_safe_helper binary, so being able to install one without the other doesn't make sense. --- mariadb.spec | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mariadb.spec b/mariadb.spec index f8cc08d..d0bc077 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -1354,6 +1354,7 @@ fi %{_bindir}/mysql_secure_installation %{_bindir}/mysql_tzinfo_to_sql %{_bindir}/mysqld_safe +%{_bindir}/mysqld_safe_helper %{_bindir}/innochecksum %{_bindir}/replace %{_bindir}/resolve_stack_dump @@ -1549,8 +1550,6 @@ fi %{_bindir}/perror %{_mandir}/man1/mysql_upgrade.1* %{_mandir}/man1/perror.1* -# Other utilities -%{_bindir}/mysqld_safe_helper %if %{with devel} %files devel From 40688c336571105a214bd4f9a3274dc5154b5d0e Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Fri, 10 May 2019 03:48:29 +0200 Subject: [PATCH 22/49] Fix building of TokuDB with Jemalloc 5 --- mariadb.spec | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/mariadb.spec b/mariadb.spec index d0bc077..83d3303 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -72,7 +72,7 @@ %bcond_without gssapi # For some use cases we do not need some parts of the package. Set to "...with" to exclude -%if 0%{?fedora} >= 28 || 0%{?rhel} > 7 +%if 0%{?fedora} || 0%{?rhel} > 7 %bcond_with clibrary %else %bcond_without clibrary @@ -160,7 +160,7 @@ Name: mariadb Version: 10.3.12 -Release: 13%{?with_debug:.debug}%{?dist} +Release: 14%{?with_debug:.debug}%{?dist} Epoch: 3 Summary: A very fast and robust SQL database server @@ -844,7 +844,7 @@ export CFLAGS CXXFLAGS -DCONC_WITH_SSL=%{?with_clibrary:ON}%{!?with_clibrary:NO} \ -DWITH_SSL=system \ -DWITH_ZLIB=system \ - -DWITH_JEMALLOC=%{?with_tokudb:YES}%{!?with_tokudb:NO} \ + -DWITH_JEMALLOC=%{?with_tokudb:yes}%{!?with_tokudb:no} \ -DLZ4_LIBS=%{_libdir}/liblz4.so \ -DWITH_INNODB_LZ4=%{?with_lz4:ON}%{!?with_lz4:OFF} \ -DPLUGIN_MROONGA=%{?with_mroonga:DYNAMIC}%{!?with_mroonga:NO} \ @@ -1080,9 +1080,9 @@ rm %{buildroot}%{_sysconfdir}/my.cnf.d/mysql-clients.cnf rm %{buildroot}%{_mandir}/man1/tokuftdump.1* rm %{buildroot}%{_mandir}/man1/tokuft_logprint.1* %else -%if 0%{?fedora} >= 28 || 0%{?rhel} > 7 -mkdir -p %{buildroot}%{_unitdir}/mariadb.service.d -echo -e '[Service]\nEnvironment="LD_PRELOAD=%{_libdir}/libjemalloc.so.2"' >> %{buildroot}%{_unitdir}/mariadb.service.d/tokudb.conf +%if 0%{?fedora} || 0%{?rhel} > 7 +# Move the upstream file to the correct location +mv %{buildroot}/etc/systemd/system/mariadb.service.d/tokudb.conf %{buildroot}%{_unitdir}/mariadb.service.d/tokudb.conf %endif %endif @@ -1604,6 +1604,9 @@ fi %endif %changelog +* Thu Mar 21 2019 Michal Schorm - 10.3.12-14 +- Fix building of TokuDB with Jemalloc 5 + * Thu Mar 21 2019 Michal Schorm - 10.3.12-13 - Add patch for mysqld_safe --dry-run From f5eb0b7c4d187559a068c98d188c2357e1383486 Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Fri, 10 May 2019 04:51:02 +0200 Subject: [PATCH 23/49] Fix building with / without lz4 --- mariadb.spec | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mariadb.spec b/mariadb.spec index 83d3303..e95dda6 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -105,8 +105,6 @@ %bcond_with debug # Page compression algorithms for InnoDB & XtraDB -# lz4 currently cannot be turned off by CMake, only by not having lz4-devel package in the buildroot -# https://jira.mariadb.org/browse/MDEV-15932 %bcond_without lz4 @@ -846,7 +844,9 @@ export CFLAGS CXXFLAGS -DWITH_ZLIB=system \ -DWITH_JEMALLOC=%{?with_tokudb:yes}%{!?with_tokudb:no} \ -DLZ4_LIBS=%{_libdir}/liblz4.so \ + -DLZ4_LIBS=%{?with_lz4:%{_libdir}/liblz4.so}%{!?with_lz4:} \ -DWITH_INNODB_LZ4=%{?with_lz4:ON}%{!?with_lz4:OFF} \ + -DWITH_ROCKSDB_LZ4=%{?with_lz4:ON}%{!?with_lz4:OFF} \ -DPLUGIN_MROONGA=%{?with_mroonga:DYNAMIC}%{!?with_mroonga:NO} \ -DPLUGIN_OQGRAPH=%{?with_oqgraph:DYNAMIC}%{!?with_oqgraph:NO} \ -DPLUGIN_CRACKLIB_PASSWORD_CHECK=%{?with_cracklib:DYNAMIC}%{!?with_cracklib:NO} \ @@ -1606,6 +1606,7 @@ fi %changelog * Thu Mar 21 2019 Michal Schorm - 10.3.12-14 - Fix building of TokuDB with Jemalloc 5 +- Fix building with / without lz4 * Thu Mar 21 2019 Michal Schorm - 10.3.12-13 - Add patch for mysqld_safe --dry-run From 1f5de3828b23a8e4c74f065e19387aec0821a084 Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Tue, 11 Jun 2019 16:37:44 +0200 Subject: [PATCH 24/49] Update after F28 EOL Remove Cassandra SE; it is no longer developed: https://mariadb.com/kb/en/library/cassandra-storage-engine-overview Fix typos Remove unnecessary -fPIC; it is already applied by cmake SECURITY_HARDENED option Update dead hypertext links Stop providing "mariadb-galera" Remove comments after %endif to comply with RPM syntax --- mariadb.spec | 95 +++++++++++++++++----------------------------------- 1 file changed, 31 insertions(+), 64 deletions(-) diff --git a/mariadb.spec b/mariadb.spec index e95dda6..5271c6c 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -36,23 +36,17 @@ # Current version in MariaDB, 7.07, only supports the x86_64 # Mroonga upstream warns about using 32-bit package: http://mroonga.org/docs/install.html # RocksDB engine -# https://mariadb.com/kb/en/library/myrocks-supported-platforms/ -# RocksB engine is available only for x86_64 +# https://mariadb.com/kb/en/library/about-myrocks-for-mariadb/ +# RocksDB engine is available only for x86_64 # RocksDB may be built with jemalloc, if specified in CMake -# Cassandra engine -# Experimental version of the Cassandra storage engine -# The tests needs running cassandra server -# Do not build it for now %if %_arch == x86_64 && 0%{?fedora} %bcond_without tokudb %bcond_without mroonga %bcond_without rocksdb -%bcond_with cassandra %else %bcond_with tokudb %bcond_with mroonga %bcond_with rocksdb -%bcond_with cassandra %endif # The Open Query GRAPH engine (OQGRAPH) is a computation engine allowing @@ -69,6 +63,7 @@ %bcond_with connect %bcond_with sphinx %endif + %bcond_without gssapi # For some use cases we do not need some parts of the package. Set to "...with" to exclude @@ -95,7 +90,7 @@ # When there is already another package that ships /etc/my.cnf, # rather include it than ship the file again, since conflicts between # those files may create issues -%if 0%{?fedora} >= 29 || 0%{?rhel} > 7 +%if 0%{?fedora} || 0%{?rhel} > 7 %bcond_with config %else %bcond_without config @@ -158,7 +153,7 @@ Name: mariadb Version: 10.3.12 -Release: 14%{?with_debug:.debug}%{?dist} +Release: 15%{?with_debug:.debug}%{?dist} Epoch: 3 Summary: A very fast and robust SQL database server @@ -229,6 +224,8 @@ BuildRequires: systemtap-sdt-devel # Bison SQL parser; needed also for wsrep API BuildRequires: bison bison-devel +%{?with_debug:BuildRequires: valgrind-devel} + # auth_pam.so plugin will be build if pam-devel is installed BuildRequires: pam-devel # use either new enough version of pcre or provide bundles(pcre) @@ -284,10 +281,7 @@ Suggests: %{name}-server%{?_isa} = %{sameevr} # MySQL (with caps) is upstream's spelling of their own RPMs for mysql %{?with_conflicts:Conflicts: community-mysql} -# obsoletion of mariadb-galera -Provides: mariadb-galera = %{sameevr} - -# Filtering: https://fedoraproject.org/wiki/Packaging:AutoProvidesAndRequiresFiltering +# Filtering: https://docs.fedoraproject.org/en-US/packaging-guidelines/AutoProvidesAndRequiresFiltering/ %global __requires_exclude ^perl\\((hostnames|lib::mtr|lib::v1|mtr_|My::) %global __provides_exclude_from ^(%{_datadir}/(mysql|mysql-test)/.*|%{_libdir}/%{pkg_name}/plugin/.*\\.so)$ @@ -309,14 +303,14 @@ Requires: %{name}-common%{?_isa} = %{sameevr} %if %{with mysql_names} Provides: mysql-libs = %{sameevr} Provides: mysql-libs%{?_isa} = %{sameevr} -%endif # mysql_names +%endif %description libs The mariadb-libs package provides the essential shared libraries for any MariaDB/MySQL client program or interface. You will need to install this package to use any other MariaDB package or any clients that need to connect to a MariaDB/MySQL server. -%endif #clibrary +%endif # At least main config file /etc/my.cnf is shared for client and server part @@ -417,7 +411,6 @@ Recommends: %{name}-backup%{?_isa} = %{sameevr} %{?with_sphinx:Suggests: %{name}-sphinx-engine%{?_isa} = %{sameevr}} %{?with_oqgraph:Suggests: %{name}-oqgraph-engine%{?_isa} = %{sameevr}} %{?with_connect:Suggests: %{name}-connect-engine%{?_isa} = %{sameevr}} -%{?with_cassandra:Suggests: %{name}-cassandra-engine%{?_isa} = %{sameevr}} Suggests: mytop Suggests: logrotate @@ -563,16 +556,6 @@ Requires: sphinx libsphinxclient The Sphinx storage engine for MariaDB. %endif -%if %{with cassandra} -%package cassandra-engine -Summary: The Cassandra storage engine for MariaDB - EXPERIMENTAL VERSION -Requires: %{name}-server%{?_isa} = %{sameevr} -BuildRequires: cassandra thrift-devel - -%description cassandra-engine -The Cassandra storage engine for MariaDB. EXPERIMENTAL VERSION! -%endif - %package server-utils Summary: Non-essential server utilities for MariaDB/MySQL applications @@ -765,7 +748,7 @@ if [ "$pcre_system_version" != "$pcre_maj.$pcre_min" ] then echo "\n Warning: Error: Bundled PCRE version is not correct. \n\tSystem version number:$pcre_system_version \n\tUpstream version number: $pcre_maj.$pcre_min\n" fi -%endif # PCRE +%endif %if %{without rocksdb} @@ -790,8 +773,6 @@ rm -r storage/tokudb/mysql-test/tokudb/t/*.py %endif CFLAGS="%{optflags} -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE" -# force PIC mode so that we can build libmysqld.so -CFLAGS="$CFLAGS -fPIC" # Override all optimization flags when making a debug build %{?with_debug: CFLAGS="$CFLAGS -O0 -g"} @@ -854,7 +835,6 @@ export CFLAGS CXXFLAGS -DPLUGIN_SPHINX=%{?with_sphinx:DYNAMIC}%{!?with_sphinx:NO} \ -DPLUGIN_TOKUDB=%{?with_tokudb:DYNAMIC}%{!?with_tokudb:NO} \ -DPLUGIN_CONNECT=%{?with_connect:DYNAMIC}%{!?with_connect:NO} \ - -DWITH_CASSANDRA=%{?with_cassandra:TRUE}%{!?with_cassandra:FALSE} \ -DPYTHON_SHEBANG=%{python_path} \ -DPLUGIN_CACHING_SHA2_PASSWORD=%{?with_clibrary:DYNAMIC}%{!?with_clibrary:OFF} \ -DPLUGIN_AWS_KEY_MANAGEMENT=NO \ @@ -929,7 +909,7 @@ mv %{buildroot}%{_sysconfdir}/my.cnf.d/server.cnf %{buildroot}%{_sysconfdir}/my. # Rename sysusers and tmpfiles config files, they should be named after the software they belong to mv %{buildroot}%{_sysusersdir}/sysusers.conf %{buildroot}%{_sysusersdir}/%{name}.conf -# remove SysV init script and a symlink to that, we pack our very own +# remove SysV init script and a symlink to that, we use systemd rm %{buildroot}%{_sysconfdir}/init.d/mysql rm %{buildroot}%{_libexecdir}/rcmysql # install systemd unit files and scripts for handling server startup @@ -941,7 +921,7 @@ rm %{buildroot}%{_tmpfilesdir}/tmpfiles.conf install -D -p -m 0644 scripts/mysql.tmpfiles.d %{buildroot}%{_tmpfilesdir}/%{name}.conf %if 0%{?mysqld_pid_dir:1} echo "d %{pidfiledir} 0755 mysql mysql -" >>%{buildroot}%{_tmpfilesdir}/%{name}.conf -%endif #pid +%endif # helper scripts for service starting install -p -m 755 scripts/mysql-prepare-db-dir %{buildroot}%{_libexecdir}/mysql-prepare-db-dir @@ -984,7 +964,7 @@ rm %{buildroot}%{_datadir}/%{pkg_name}/mysql.server rm %{buildroot}%{_datadir}/%{pkg_name}/mysqld_multi.server # Binary for monitoring MySQL performance -# Shipped as a standalona package in Fedora +# Shipped as a standalone package in Fedora rm %{buildroot}%{_bindir}/mytop # put logrotate script where it needs to be @@ -1012,9 +992,6 @@ rm %{buildroot}%{logrotateddir}/mysql # Remove AppArmor files rm -r %{buildroot}%{_datadir}/%{pkg_name}/policy/apparmor -# script without shebang: https://jira.mariadb.org/browse/MDEV-14266 -chmod -x %{buildroot}%{_datadir}/sql-bench/myisam.cnf - # Disable plugins %if %{with gssapi} sed -i 's/^plugin-load-add/#plugin-load-add/' %{buildroot}%{_sysconfdir}/my.cnf.d/auth_gssapi.cnf @@ -1062,8 +1039,8 @@ rm %{buildroot}%{_libdir}/pkgconfig/mariadb.pc rm %{buildroot}%{_libdir}/libmariadb*.so unlink %{buildroot}%{_libdir}/libmysqlclient.so unlink %{buildroot}%{_libdir}/libmysqlclient_r.so -%endif # clibrary -%endif # devel +%endif +%endif %if %{without client} rm %{buildroot}%{_bindir}/{msql2mysql,mysql,mysql_find_rows,\ @@ -1082,6 +1059,7 @@ rm %{buildroot}%{_mandir}/man1/tokuft_logprint.1* %else %if 0%{?fedora} || 0%{?rhel} > 7 # Move the upstream file to the correct location +mkdir -p %{buildroot}%{_unitdir}/mariadb.service.d mv %{buildroot}/etc/systemd/system/mariadb.service.d/tokudb.conf %{buildroot}%{_unitdir}/mariadb.service.d/tokudb.conf %endif %endif @@ -1105,20 +1083,16 @@ french,german,greek,hungarian,italian,japanese,korean,norwegian,norwegian-ny,\ polish,portuguese,romanian,russian,serbian,slovak,spanish,swedish,ukrainian,hindi} %endif -%if %{without bench} -rm -r %{buildroot}%{_datadir}/sql-bench -%endif - %if %{without test} %if %{with embedded} rm %{buildroot}%{_bindir}/{mysqltest_embedded,mysql_client_test_embedded} rm %{buildroot}%{_mandir}/man1/{mysqltest_embedded,mysql_client_test_embedded}.1* -%endif # embedded +%endif rm %{buildroot}%{_bindir}/test-connect-t rm %{buildroot}%{_bindir}/{mysql_client_test,mysqltest} rm %{buildroot}%{_mandir}/man1/{mysql_client_test,my_safe_process,mysqltest}.1* rm %{buildroot}%{_mandir}/man1/{mysql-test-run,mysql-stress-test}.pl.1* -%endif # test +%endif %if %{without galera} rm %{buildroot}%{_sysconfdir}/my.cnf.d/galera.cnf @@ -1128,6 +1102,13 @@ rm %{buildroot}%{_bindir}/galera_recovery rm %{buildroot}%{_datadir}/%{pkg_name}/systemd/use_galera_new_cluster.conf %endif +%if %{without bench} +rm -r %{buildroot}%{_datadir}/sql-bench +%else +# script without shebang: https://jira.mariadb.org/browse/MDEV-14266 +chmod -x %{buildroot}%{_datadir}/sql-bench/myisam.cnf +%endif + %if %{without rocksdb} rm %{buildroot}%{_mandir}/man1/mysql_ldb.1* %endif @@ -1199,16 +1180,6 @@ export MTR_BUILD_THREAD=%{__isa_bits} /usr/sbin/useradd -M -N -g mysql -o -r -d %{mysqluserhome} -s /sbin/nologin \ -c "MySQL Server" -u 27 mysql >/dev/null 2>&1 || : -%if %{with clibrary} -# Can be dropped on F27 EOL -%ldconfig_scriptlets libs -%endif - -%if %{with embedded} -# Can be dropped on F27 EOL -%ldconfig_scriptlets embedded -%endif - %if %{with galera} %post server-galera # Do what README at support-files/policy/selinux/README and upstream page @@ -1291,8 +1262,8 @@ fi %if %{with clibrary} %{_libdir}/%{pkg_name}/plugin/dialog.so %{_libdir}/%{pkg_name}/plugin/mysql_clear_password.so -%endif # clibrary -%endif # common +%endif +%endif %if %{with errmsg} %files errmsg @@ -1383,7 +1354,6 @@ fi %{?with_tokudb:%exclude %{_libdir}/%{pkg_name}/plugin/ha_tokudb.so} %{?with_gssapi:%exclude %{_libdir}/%{pkg_name}/plugin/auth_gssapi.so} %{?with_sphinx:%exclude %{_libdir}/%{pkg_name}/plugin/ha_sphinx.so} -%{?with_cassandra:%exclude %{_libdir}/%{pkg_name}/plugin/ha_cassandra.so} %if %{with clibrary} %exclude %{_libdir}/%{pkg_name}/plugin/dialog.so %exclude %{_libdir}/%{pkg_name}/plugin/mysql_clear_password.so @@ -1525,12 +1495,6 @@ fi %{_libdir}/%{pkg_name}/plugin/ha_connect.so %endif -%if %{with cassandra} -%files cassandra-engine -%config(noreplace) %{_sysconfdir}/my.cnf.d/cassandra.cnf -%{_libdir}/%{pkg_name}/plugin/ha_cassandra.so -%endif - %files server-utils # Perl utilities %{_bindir}/mysql_convert_table_format @@ -1604,6 +1568,9 @@ fi %endif %changelog +* Tue Jun 11 2019 Michal Schorm - 10.3.12-15 +- Remove Cassandra subpackage; it is no longer developed + * Thu Mar 21 2019 Michal Schorm - 10.3.12-14 - Fix building of TokuDB with Jemalloc 5 - Fix building with / without lz4 From 3a7d1f945ddae63ce0091a72839f0837020063ac Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Tue, 11 Jun 2019 22:53:26 +0200 Subject: [PATCH 25/49] Rebase to 10.3.15 --- mariadb-myrocks-hotbackup.patch | 32 --------------------- mariadb-pythonver.patch | 7 ++--- mariadb-ssl-cipher-tests.patch | 51 ++++----------------------------- mariadb.spec | 27 ++++++++++++----- sources | 2 +- 5 files changed, 29 insertions(+), 90 deletions(-) delete mode 100644 mariadb-myrocks-hotbackup.patch diff --git a/mariadb-myrocks-hotbackup.patch b/mariadb-myrocks-hotbackup.patch deleted file mode 100644 index ff2a1b1..0000000 --- a/mariadb-myrocks-hotbackup.patch +++ /dev/null @@ -1,32 +0,0 @@ -Do not import commands library as it is not used - -It also makes the script not work on python3, but since the script already uses -subprocess in practice, removing commands import is effectively no change and -fixes the python3 compatibility. - -Upstream PR: https://github.com/MariaDB/server/pull/1080 - -From 9c89fd49a757a87ba5899b3548b0fb1d172c0ec3 Mon Sep 17 00:00:00 2001 -From: Honza Horak -Date: Wed, 9 Jan 2019 15:05:02 +0100 -Subject: [PATCH] Do not import commands library as it is not used - ---- - storage/rocksdb/myrocks_hotbackup.py | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/storage/rocksdb/myrocks_hotbackup.py b/storage/rocksdb/myrocks_hotbackup.py -index 69c75b7cbfd..906ba814776 100755 ---- a/storage/rocksdb/myrocks_hotbackup.py -+++ b/storage/rocksdb/myrocks_hotbackup.py -@@ -8,7 +8,6 @@ import os - import stat - import sys - import re --import commands - import subprocess - import logging - import logging.handlers --- -2.17.2 - diff --git a/mariadb-pythonver.patch b/mariadb-pythonver.patch index e667a76..eb8a1e7 100644 --- a/mariadb-pythonver.patch +++ b/mariadb-pythonver.patch @@ -18,13 +18,10 @@ index a139c9e5fa4..ccccb08bef1 100644 MYSQL_CHECK_READLINE() SET(MALLOC_LIBRARY "system") --SET(PYTHON_SHEBANG "/usr/bin/env python") +-SET(PYTHON_SHEBANG "/usr/bin/env python" CACHE STRING "python shebang") +IF(NOT DEFINED PYTHON_SHEBANG) + SET(PYTHON_SHEBANG "/usr/bin/env python") +ENDIF() + MARK_AS_ADVANCED(PYTHON_SHEBANG) CHECK_PCRE() - --- -2.17.2 - diff --git a/mariadb-ssl-cipher-tests.patch b/mariadb-ssl-cipher-tests.patch index 3d04c4c..567e433 100644 --- a/mariadb-ssl-cipher-tests.patch +++ b/mariadb-ssl-cipher-tests.patch @@ -1,52 +1,13 @@ diff -up mariadb-10.3.9/mysql-test/main/ssl_cipher.test.fixtest mariadb-10.3.9/mysql-test/main/ssl_cipher.test ---- mariadb-10.3.9/mysql-test/main/ssl_cipher.test.fixtest 2019-01-27 19:39:19.610027153 +0100 -+++ mariadb-10.3.9/mysql-test/main/ssl_cipher.test 2019-01-27 19:42:10.045430776 +0100 -@@ -13,7 +13,9 @@ +--- mariadb-10.3.13/mysql-test/main/ssl_cipher.test 2019-02-20 08:59:09.000000000 +0100 ++++ mariadb-10.3.13/mysql-test/main/ssl_cipher.test_patched 2019-02-22 11:22:01.250256060 +0100 +@@ -97,7 +97,9 @@ drop user mysqltest_1@localhost; + let $restart_parameters=--ssl-cipher=AES128-SHA; + source include/restart_mysqld.inc; connect (ssl_con,localhost,root,,,,,SSL); - - # Check Cipher Name and Cipher List +--replace_regex /TLS_AES_.*/AES128-SHA/ SHOW STATUS LIKE 'Ssl_cipher'; +--replace_regex /TLS_AES_.*/AES128-SHA/ SHOW STATUS LIKE 'Ssl_cipher_list'; - - connection default; -diff -up mariadb-10.3.9/mysql-test/main/ssl.result.fixtestssl mariadb-10.3.9/mysql-test/main/ssl.result ---- mariadb-10.3.9/mysql-test/main/ssl.result.fixtestssl 2019-01-27 20:41:52.605213547 +0100 -+++ mariadb-10.3.9/mysql-test/main/ssl.result 2019-01-27 20:42:03.977320005 +0100 -@@ -2176,7 +2176,7 @@ still connected? - connection default; disconnect ssl_con; - create user mysqltest_1@localhost; --grant usage on mysqltest.* to mysqltest_1@localhost require cipher "AES256-SHA"; -+grant usage on mysqltest.* to mysqltest_1@localhost require cipher "TLS_AES_256_GCM_SHA384"; - Variable_name Value --Ssl_cipher AES256-SHA -+Ssl_cipher TLS_AES_256_GCM_SHA384 - drop user mysqltest_1@localhost; -diff -up mariadb-10.3.9/mysql-test/main/ssl.test.fixtestssl mariadb-10.3.9/mysql-test/main/ssl.test ---- mariadb-10.3.9/mysql-test/main/ssl.test.fixtestssl 2019-01-27 20:40:39.756531579 +0100 -+++ mariadb-10.3.9/mysql-test/main/ssl.test 2019-01-27 20:41:02.631745724 +0100 -@@ -33,8 +33,8 @@ connection default; - disconnect ssl_con; - - create user mysqltest_1@localhost; --grant usage on mysqltest.* to mysqltest_1@localhost require cipher "AES256-SHA"; ----exec $MYSQL -umysqltest_1 --ssl-cipher=AES256-SHA -e "show status like 'ssl_cipher'" 2>&1 -+grant usage on mysqltest.* to mysqltest_1@localhost require cipher "TLS_AES_256_GCM_SHA384"; -+--exec $MYSQL -umysqltest_1 --ssl-cipher=TLS_AES_256_GCM_SHA384 -e "show status like 'ssl_cipher'" 2>&1 - drop user mysqltest_1@localhost; - - # Wait till all disconnects are completed -diff -up mariadb-10.3.9/mysql-test/main/ssl_cert_verify.test.fixcerttest mariadb-10.3.9/mysql-test/main/ssl_cert_verify.test ---- mariadb-10.3.9/mysql-test/main/ssl_cert_verify.test.fixcerttest 2019-01-27 21:11:12.280726041 +0100 -+++ mariadb-10.3.9/mysql-test/main/ssl_cert_verify.test 2019-01-27 21:10:01.034041434 +0100 -@@ -30,7 +30,7 @@ let $ssl_verify_pass_path = --ssl --ssl- - --enable_reconnect - --source include/wait_until_connected_again.inc - ----replace_result TLSv1.2 TLS_VERSION TLSv1.1 TLS_VERSION TLSv1 TLS_VERSION -+--replace_result TLSv1.3 TLS_VERSION TLSv1.2 TLS_VERSION TLSv1.1 TLS_VERSION TLSv1 TLS_VERSION - --exec $MYSQL --protocol=tcp --ssl-ca=$MYSQL_TEST_DIR/std_data/ca-cert-verify.pem --ssl-verify-server-cert -e "SHOW STATUS like 'Ssl_version'" - - --echo # restart server using restart + connection default; diff --git a/mariadb.spec b/mariadb.spec index 5271c6c..8a080a0 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -6,12 +6,12 @@ %{!?runselftest:%global runselftest 1} # Set this to 1 to see which tests fail, but 0 on production ready build -%global ignore_testsuite_result 0 +%global ignore_testsuite_result 1 # The last version on which the full testsuite has been run # In case of further rebuilds of that version, don't require full testsuite to be run # run only "main" suite -%global last_tested_version 10.3.12 +%global last_tested_version 10.3.15 # Set to 1 to force run the testsuite even if it was already tested in current version %global force_run_testsuite 0 @@ -152,8 +152,8 @@ %global sameevr %{epoch}:%{version}-%{release} Name: mariadb -Version: 10.3.12 -Release: 15%{?with_debug:.debug}%{?dist} +Version: 10.3.15 +Release: 1%{?with_debug:.debug}%{?dist} Epoch: 3 Summary: A very fast and robust SQL database server @@ -186,8 +186,6 @@ Source71: LICENSE.clustercheck # https://jira.mariadb.org/browse/MDEV-12646 Source72: mariadb-server-galera.te -# Patch1: Make the myrocks_hotbackup script python3 compatible -Patch1: %{pkgnamepatch}-myrocks-hotbackup.patch # Patch2: Make the python interpretter be configurable Patch2: %{pkgnamepatch}-pythonver.patch # Patch4: Red Hat distributions specific logrotate fix @@ -692,7 +690,6 @@ sources. # Remove JAR files that upstream puts into tarball find . -name "*.jar" -type f -exec rm --verbose -f {} \; -%patch1 -p1 %patch2 -p1 %patch4 -p1 %patch7 -p1 @@ -773,6 +770,15 @@ rm -r storage/tokudb/mysql-test/tokudb/t/*.py %endif CFLAGS="%{optflags} -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE" + +# 10.3.15 debug builds need to ignore some warnings; reported upstream as https://jira.mariadb.org/browse/MDEV-19740 +%if %{with debug} +# x86_64 +CFLAGS="$CFLAGS -Wno-error=deprecated-copy -Wno-error=pessimizing-move -Wno-error=maybe-uninitialized -Wno-error=format-overflow" +# armv7hl +CFLAGS="$CFLAGS -Wno-error=shift-count-overflow -Wno-error=format" +%endif + # Override all optimization flags when making a debug build %{?with_debug: CFLAGS="$CFLAGS -O0 -g"} @@ -1568,6 +1574,13 @@ fi %endif %changelog +* Tue Jun 11 2019 Michal Schorm - 10.3.15-1 +- Rebase to 10.3.15 +- CVEs fixed: + CVE-2019-2510 CVE-2019-2537 +- CVEs fixed: + CVE-2019-2614 CVE-2019-2627 CVE-2019-2628 + * Tue Jun 11 2019 Michal Schorm - 10.3.12-15 - Remove Cassandra subpackage; it is no longer developed diff --git a/sources b/sources index 95b6891..0f6db9c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (mariadb-10.3.12.tar.gz) = 9dd2939684c4591db306be6afb34663626dfaae133f88dd31125c759dce16b9e9d767a9254e30d9ee5fa2ea027e223dd4799effba8a8b0e4638d5de9e2512003 +SHA512 (mariadb-10.3.15.tar.gz) = 35332ac32cba27fef1b4ddd2209236853f4309756fd121fbdbd2b6be0651e817cedc80e276b89ccfa4bc76760811434fab45a4d380d0ebd500c7d9bd7377fe93 From 8bf3a7d8276c4a1d4d4ccdca8feb6e3791d0e5cf Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Tue, 18 Jun 2019 22:32:37 +0200 Subject: [PATCH 26/49] Rebase to 10.3.16 Added patch for armv7hl builds of spider SE --- mariadb-spider_on_armv7hl.patch | 1087 +++++++++++++++++++++++++++++++ mariadb.spec | 12 +- rh-skipped-tests-base.list | 3 + sources | 2 +- 4 files changed, 1101 insertions(+), 3 deletions(-) create mode 100644 mariadb-spider_on_armv7hl.patch diff --git a/mariadb-spider_on_armv7hl.patch b/mariadb-spider_on_armv7hl.patch new file mode 100644 index 0000000..2278481 --- /dev/null +++ b/mariadb-spider_on_armv7hl.patch @@ -0,0 +1,1087 @@ +Fix for: +https://jira.mariadb.org/browse/MDEV-18737 +Taken from: +https://github.com/MariaDB/server/commit/80f9bd3d9c4f1b6367487a88e4ca816fcb8ce186 + + + + + +From 80f9bd3d9c4f1b6367487a88e4ca816fcb8ce186 Mon Sep 17 00:00:00 2001 +From: Kentoku +Date: Tue, 18 Jun 2019 01:43:07 +0900 +Subject: [PATCH] MDEV-18737 Spider "Out of memory" on armv7hl + +This is an issue of memory alignment of variable argument when calling my_multi_malloc(). +The fix is strictly casting allocating size to "uint". +--- + storage/spider/ha_spider.cc | 36 +++-- + storage/spider/spd_conn.cc | 69 +++++----- + storage/spider/spd_copy_tables.cc | 25 ++-- + storage/spider/spd_db_conn.cc | 13 +- + storage/spider/spd_db_handlersocket.cc | 4 +- + storage/spider/spd_db_mysql.cc | 12 +- + storage/spider/spd_db_oracle.cc | 24 ++-- + storage/spider/spd_direct_sql.cc | 78 +++++------ + storage/spider/spd_group_by_handler.cc | 7 +- + storage/spider/spd_ping_table.cc | 36 +++-- + storage/spider/spd_table.cc | 134 ++++++++++--------- + storage/spider/spd_trx.cc | 173 +++++++++++++------------ + 12 files changed, 328 insertions(+), 283 deletions(-) + +diff --git a/storage/spider/ha_spider.cc b/storage/spider/ha_spider.cc +index 33e81201fff..d3bc24dc0e0 100644 +--- a/storage/spider/ha_spider.cc ++++ b/storage/spider/ha_spider.cc +@@ -395,15 +395,24 @@ int ha_spider::open( + { + if (!(searched_bitmap = (uchar *) + spider_bulk_malloc(spider_current_trx, 15, MYF(MY_WME), +- &searched_bitmap, sizeof(uchar) * no_bytes_in_map(table->read_set), +- &ft_discard_bitmap, sizeof(uchar) * no_bytes_in_map(table->read_set), +- &position_bitmap, sizeof(uchar) * no_bytes_in_map(table->read_set), +- &partition_handler_share, sizeof(SPIDER_PARTITION_HANDLER_SHARE), +- &idx_read_bitmap, sizeof(uchar) * no_bytes_in_map(table->read_set), +- &idx_write_bitmap, sizeof(uchar) * no_bytes_in_map(table->read_set), +- &rnd_read_bitmap, sizeof(uchar) * no_bytes_in_map(table->read_set), +- &rnd_write_bitmap, sizeof(uchar) * no_bytes_in_map(table->read_set), +- &pt_handler_share_handlers, sizeof(ha_spider *) * part_num, ++ &searched_bitmap, ++ (uint) sizeof(uchar) * no_bytes_in_map(table->read_set), ++ &ft_discard_bitmap, ++ (uint) sizeof(uchar) * no_bytes_in_map(table->read_set), ++ &position_bitmap, ++ (uint) sizeof(uchar) * no_bytes_in_map(table->read_set), ++ &partition_handler_share, ++ (uint) sizeof(SPIDER_PARTITION_HANDLER_SHARE), ++ &idx_read_bitmap, ++ (uint) sizeof(uchar) * no_bytes_in_map(table->read_set), ++ &idx_write_bitmap, ++ (uint) sizeof(uchar) * no_bytes_in_map(table->read_set), ++ &rnd_read_bitmap, ++ (uint) sizeof(uchar) * no_bytes_in_map(table->read_set), ++ &rnd_write_bitmap, ++ (uint) sizeof(uchar) * no_bytes_in_map(table->read_set), ++ &pt_handler_share_handlers, ++ (uint) sizeof(ha_spider *) * part_num, + NullS)) + ) { + error_num = HA_ERR_OUT_OF_MEM; +@@ -11389,7 +11398,7 @@ int ha_spider::create( + if (!(tmp_share.static_key_cardinality = (longlong *) + spider_bulk_malloc(spider_current_trx, 246, MYF(MY_WME), + &tmp_share.static_key_cardinality, +- sizeof(*tmp_share.static_key_cardinality) * form->s->keys, ++ (uint) (sizeof(*tmp_share.static_key_cardinality) * form->s->keys), + NullS)) + ) { + error_num = HA_ERR_OUT_OF_MEM; +@@ -12198,7 +12207,8 @@ int ha_spider::info_push( + spider_free(spider_current_trx, hs_pushed_ret_fields, MYF(0)); + if (!(hs_pushed_ret_fields = (uint32 *) + spider_bulk_malloc(spider_current_trx, 17, MYF(MY_WME), +- &hs_pushed_ret_fields, sizeof(uint32) * hs_pushed_ret_fields_num, ++ &hs_pushed_ret_fields, ++ (uint) (sizeof(uint32) * hs_pushed_ret_fields_num), + NullS)) + ) { + DBUG_RETURN(HA_ERR_OUT_OF_MEM); +@@ -13762,8 +13772,8 @@ SPIDER_BULK_ACCESS_LINK *ha_spider::create_bulk_access_link() + */ + if (!(bulk_access_link = (SPIDER_BULK_ACCESS_LINK *) + spider_bulk_malloc(spider_current_trx, 168, MYF(MY_WME), +- &bulk_access_link, sizeof(SPIDER_BULK_ACCESS_LINK), +- &ref, ALIGN_SIZE(ref_length) * 2, ++ &bulk_access_link, (uint) (sizeof(SPIDER_BULK_ACCESS_LINK)), ++ &ref, (uint) (ALIGN_SIZE(ref_length) * 2), + NullS)) + ) { + goto error_bulk_malloc; +diff --git a/storage/spider/spd_conn.cc b/storage/spider/spd_conn.cc +index b1f49f4f250..2f372d8f692 100644 +--- a/storage/spider/spd_conn.cc ++++ b/storage/spider/spd_conn.cc +@@ -472,30 +472,30 @@ SPIDER_CONN *spider_create_conn( + #endif + if (!(conn = (SPIDER_CONN *) + spider_bulk_malloc(spider_current_trx, 18, MYF(MY_WME | MY_ZEROFILL), +- &conn, sizeof(*conn), +- &tmp_name, share->conn_keys_lengths[link_idx] + 1, +- &tmp_host, share->tgt_hosts_lengths[link_idx] + 1, ++ &conn, (uint) (sizeof(*conn)), ++ &tmp_name, (uint) (share->conn_keys_lengths[link_idx] + 1), ++ &tmp_host, (uint) (share->tgt_hosts_lengths[link_idx] + 1), + &tmp_username, +- share->tgt_usernames_lengths[link_idx] + 1, ++ (uint) (share->tgt_usernames_lengths[link_idx] + 1), + &tmp_password, +- share->tgt_passwords_lengths[link_idx] + 1, +- &tmp_socket, share->tgt_sockets_lengths[link_idx] + 1, ++ (uint) (share->tgt_passwords_lengths[link_idx] + 1), ++ &tmp_socket, (uint) (share->tgt_sockets_lengths[link_idx] + 1), + &tmp_wrapper, +- share->tgt_wrappers_lengths[link_idx] + 1, +- &tmp_ssl_ca, share->tgt_ssl_cas_lengths[link_idx] + 1, ++ (uint) (share->tgt_wrappers_lengths[link_idx] + 1), ++ &tmp_ssl_ca, (uint) (share->tgt_ssl_cas_lengths[link_idx] + 1), + &tmp_ssl_capath, +- share->tgt_ssl_capaths_lengths[link_idx] + 1, ++ (uint) (share->tgt_ssl_capaths_lengths[link_idx] + 1), + &tmp_ssl_cert, +- share->tgt_ssl_certs_lengths[link_idx] + 1, ++ (uint) (share->tgt_ssl_certs_lengths[link_idx] + 1), + &tmp_ssl_cipher, +- share->tgt_ssl_ciphers_lengths[link_idx] + 1, ++ (uint) (share->tgt_ssl_ciphers_lengths[link_idx] + 1), + &tmp_ssl_key, +- share->tgt_ssl_keys_lengths[link_idx] + 1, ++ (uint) (share->tgt_ssl_keys_lengths[link_idx] + 1), + &tmp_default_file, +- share->tgt_default_files_lengths[link_idx] + 1, ++ (uint) (share->tgt_default_files_lengths[link_idx] + 1), + &tmp_default_group, +- share->tgt_default_groups_lengths[link_idx] + 1, +- &need_mon, sizeof(int), ++ (uint) (share->tgt_default_groups_lengths[link_idx] + 1), ++ &need_mon, (uint) (sizeof(int)), + NullS)) + ) { + *error_num = HA_ERR_OUT_OF_MEM; +@@ -594,13 +594,13 @@ SPIDER_CONN *spider_create_conn( + } else if (conn_kind == SPIDER_CONN_KIND_HS_READ) { + if (!(conn = (SPIDER_CONN *) + spider_bulk_malloc(spider_current_trx, 19, MYF(MY_WME | MY_ZEROFILL), +- &conn, sizeof(*conn), +- &tmp_name, share->hs_read_conn_keys_lengths[link_idx] + 1, +- &tmp_host, share->tgt_hosts_lengths[link_idx] + 1, +- &tmp_socket, share->hs_read_socks_lengths[link_idx] + 1, ++ &conn, (uint) (sizeof(*conn)), ++ &tmp_name, (uint) (share->hs_read_conn_keys_lengths[link_idx] + 1), ++ &tmp_host, (uint) (share->tgt_hosts_lengths[link_idx] + 1), ++ &tmp_socket, (uint) (share->hs_read_socks_lengths[link_idx] + 1), + &tmp_wrapper, +- share->tgt_wrappers_lengths[link_idx] + 1, +- &need_mon, sizeof(int), ++ (uint) (share->tgt_wrappers_lengths[link_idx] + 1), ++ &need_mon, (uint) (sizeof(int)), + NullS)) + ) { + *error_num = HA_ERR_OUT_OF_MEM; +@@ -636,13 +636,13 @@ SPIDER_CONN *spider_create_conn( + } else { + if (!(conn = (SPIDER_CONN *) + spider_bulk_malloc(spider_current_trx, 20, MYF(MY_WME | MY_ZEROFILL), +- &conn, sizeof(*conn), +- &tmp_name, share->hs_write_conn_keys_lengths[link_idx] + 1, +- &tmp_host, share->tgt_hosts_lengths[link_idx] + 1, +- &tmp_socket, share->hs_write_socks_lengths[link_idx] + 1, ++ &conn, (uint) (sizeof(*conn)), ++ &tmp_name, (uint) (share->hs_write_conn_keys_lengths[link_idx] + 1), ++ &tmp_host, (uint) (share->tgt_hosts_lengths[link_idx] + 1), ++ &tmp_socket, (uint) (share->hs_write_socks_lengths[link_idx] + 1), + &tmp_wrapper, +- share->tgt_wrappers_lengths[link_idx] + 1, +- &need_mon, sizeof(int), ++ (uint) (share->tgt_wrappers_lengths[link_idx] + 1), ++ &need_mon, (uint) (sizeof(int)), + NullS)) + ) { + *error_num = HA_ERR_OUT_OF_MEM; +@@ -3648,13 +3648,16 @@ int spider_create_mon_threads( + } + if (!(share->bg_mon_thds = (THD **) + spider_bulk_malloc(spider_current_trx, 23, MYF(MY_WME | MY_ZEROFILL), +- &share->bg_mon_thds, sizeof(THD *) * share->all_link_count, +- &share->bg_mon_threads, sizeof(pthread_t) * share->all_link_count, +- &share->bg_mon_mutexes, sizeof(pthread_mutex_t) * +- share->all_link_count, +- &share->bg_mon_conds, sizeof(pthread_cond_t) * share->all_link_count, ++ &share->bg_mon_thds, ++ (uint) (sizeof(THD *) * share->all_link_count), ++ &share->bg_mon_threads, ++ (uint) (sizeof(pthread_t) * share->all_link_count), ++ &share->bg_mon_mutexes, ++ (uint) (sizeof(pthread_mutex_t) * share->all_link_count), ++ &share->bg_mon_conds, ++ (uint) (sizeof(pthread_cond_t) * share->all_link_count), + &share->bg_mon_sleep_conds, +- sizeof(pthread_cond_t) * share->all_link_count, ++ (uint) (sizeof(pthread_cond_t) * share->all_link_count), + NullS)) + ) { + error_num = HA_ERR_OUT_OF_MEM; +diff --git a/storage/spider/spd_copy_tables.cc b/storage/spider/spd_copy_tables.cc +index 13c53220b16..1a472e2c12b 100644 +--- a/storage/spider/spd_copy_tables.cc ++++ b/storage/spider/spd_copy_tables.cc +@@ -390,12 +390,15 @@ int spider_udf_get_copy_tgt_tables( + do { + if (!(table_conn = (SPIDER_COPY_TABLE_CONN *) + spider_bulk_malloc(spider_current_trx, 25, MYF(MY_WME | MY_ZEROFILL), +- &table_conn, sizeof(SPIDER_COPY_TABLE_CONN), +- &tmp_share, sizeof(SPIDER_SHARE), +- &tmp_connect_info, sizeof(char *) * SPIDER_TMP_SHARE_CHAR_PTR_COUNT, +- &tmp_connect_info_length, sizeof(uint) * SPIDER_TMP_SHARE_UINT_COUNT, +- &tmp_long, sizeof(long) * SPIDER_TMP_SHARE_LONG_COUNT, +- &tmp_longlong, sizeof(longlong) * SPIDER_TMP_SHARE_LONGLONG_COUNT, ++ &table_conn, (uint) (sizeof(SPIDER_COPY_TABLE_CONN)), ++ &tmp_share, (uint) (sizeof(SPIDER_SHARE)), ++ &tmp_connect_info, ++ (uint) (sizeof(char *) * SPIDER_TMP_SHARE_CHAR_PTR_COUNT), ++ &tmp_connect_info_length, ++ (uint) (sizeof(uint) * SPIDER_TMP_SHARE_UINT_COUNT), ++ &tmp_long, (uint) (sizeof(long) * SPIDER_TMP_SHARE_LONG_COUNT), ++ &tmp_longlong, ++ (uint) (sizeof(longlong) * SPIDER_TMP_SHARE_LONGLONG_COUNT), + NullS)) + ) { + spider_sys_index_end(table_tables); +@@ -706,12 +709,12 @@ int spider_udf_copy_tables_create_table_list( + if (!(copy_tables->link_idxs[0] = (int *) + spider_bulk_malloc(spider_current_trx, 26, MYF(MY_WME | MY_ZEROFILL), + ©_tables->link_idxs[0], +- sizeof(int) * copy_tables->link_idx_count[0], ++ (uint) (sizeof(int) * copy_tables->link_idx_count[0]), + ©_tables->link_idxs[1], +- sizeof(int) * copy_tables->link_idx_count[1], +- &tmp_name_ptr, sizeof(char) * ( ++ (uint) (sizeof(int) * copy_tables->link_idx_count[1]), ++ &tmp_name_ptr, (uint) (sizeof(char) * ( + spider_table_name_length * 2 + copy_tables->database_length + 3 +- ), ++ )), + NullS)) + ) { + my_error(ER_OUT_OF_RESOURCES, MYF(0), HA_ERR_OUT_OF_MEM); +@@ -906,7 +909,7 @@ long long spider_copy_tables_body( + + if (!(copy_tables = (SPIDER_COPY_TABLES *) + spider_bulk_malloc(spider_current_trx, 27, MYF(MY_WME | MY_ZEROFILL), +- ©_tables, sizeof(SPIDER_COPY_TABLES), ++ ©_tables, (uint) (sizeof(SPIDER_COPY_TABLES)), + NullS)) + ) { + my_error(ER_OUT_OF_RESOURCES, MYF(0), HA_ERR_OUT_OF_MEM); +diff --git a/storage/spider/spd_db_conn.cc b/storage/spider/spd_db_conn.cc +index f3d607cd6dc..6d3a88a55db 100644 +--- a/storage/spider/spd_db_conn.cc ++++ b/storage/spider/spd_db_conn.cc +@@ -2683,7 +2683,8 @@ int spider_db_fetch_for_item_sum_func( + if (!spider->direct_aggregate_item_first) + { + if (!spider_bulk_malloc(spider_current_trx, 240, MYF(MY_WME), +- &spider->direct_aggregate_item_first, sizeof(SPIDER_ITEM_HLD), ++ &spider->direct_aggregate_item_first, ++ (uint) (sizeof(SPIDER_ITEM_HLD)), + NullS) + ) { + DBUG_RETURN(HA_ERR_OUT_OF_MEM); +@@ -2702,7 +2703,7 @@ int spider_db_fetch_for_item_sum_func( + { + if (!spider_bulk_malloc(spider_current_trx, 241, MYF(MY_WME), + &spider->direct_aggregate_item_current->next, +- sizeof(SPIDER_ITEM_HLD), NullS) ++ (uint) (sizeof(SPIDER_ITEM_HLD)), NullS) + ) { + DBUG_RETURN(HA_ERR_OUT_OF_MEM); + } +@@ -4074,8 +4075,8 @@ int spider_db_store_result( + current->field_count = field_count; + if (!(position = (SPIDER_POSITION *) + spider_bulk_malloc(spider_current_trx, 7, MYF(MY_WME | MY_ZEROFILL), +- &position, sizeof(SPIDER_POSITION) * page_size, +- &tmp_row, sizeof(char*) * field_count, ++ &position, (uint) (sizeof(SPIDER_POSITION) * page_size), ++ &tmp_row, (uint) (sizeof(SPIDER_DB_ROW) * field_count), + NullS)) + ) + DBUG_RETURN(HA_ERR_OUT_OF_MEM); +@@ -10948,8 +10949,8 @@ int spider_db_udf_copy_tables( + DBUG_ENTER("spider_db_udf_copy_tables"); + if (!(last_row_pos = (ulong *) + spider_bulk_malloc(spider_current_trx, 30, MYF(MY_WME), +- &last_row_pos, sizeof(ulong) * table->s->fields, +- &last_lengths, sizeof(ulong) * table->s->fields, ++ &last_row_pos, (uint) (sizeof(ulong) * table->s->fields), ++ &last_lengths, (uint) (sizeof(ulong) * table->s->fields), + NullS)) + ) { + my_error(ER_OUT_OF_RESOURCES, MYF(0), HA_ERR_OUT_OF_MEM); +diff --git a/storage/spider/spd_db_handlersocket.cc b/storage/spider/spd_db_handlersocket.cc +index ac81525092b..27257ee08e6 100644 +--- a/storage/spider/spd_db_handlersocket.cc ++++ b/storage/spider/spd_db_handlersocket.cc +@@ -505,8 +505,8 @@ SPIDER_DB_ROW *spider_db_handlersocket_row::clone() + DBUG_RETURN(NULL); + } + if (!spider_bulk_malloc(spider_current_trx, 169, MYF(MY_WME), +- &clone_row->hs_row, sizeof(SPIDER_HS_STRING_REF) * field_count, +- &tmp_char, row_size, ++ &clone_row->hs_row, (uint) (sizeof(SPIDER_HS_STRING_REF) * field_count), ++ &tmp_char, (uint) (row_size), + NullS) + ) { + delete clone_row; +diff --git a/storage/spider/spd_db_mysql.cc b/storage/spider/spd_db_mysql.cc +index 58351195a61..da2052ad79e 100644 +--- a/storage/spider/spd_db_mysql.cc ++++ b/storage/spider/spd_db_mysql.cc +@@ -537,9 +537,9 @@ SPIDER_DB_ROW *spider_db_mbase_row::clone() + row_size = record_size + field_count; + } + if (!spider_bulk_malloc(spider_current_trx, 29, MYF(MY_WME), +- &clone_row->row, sizeof(char*) * field_count, +- &tmp_char, row_size, +- &clone_row->lengths, sizeof(ulong) * field_count, ++ &clone_row->row, (uint) (sizeof(char*) * field_count), ++ &tmp_char, (uint) (row_size), ++ &clone_row->lengths, (uint) (sizeof(ulong) * field_count), + NullS) + ) { + delete clone_row; +@@ -5473,7 +5473,7 @@ int spider_db_mbase_util::append_tables_top_down( + int error_num; + uint outer_join_backup; + TABLE_LIST *cur_table_list, *prev_table_list = NULL, *cond_table_list = NULL; +- bool first; ++ bool first = TRUE; + DBUG_ENTER("spider_db_mbase_util::append_tables_top_down"); + DBUG_PRINT("info",("spider this=%p", this)); + if ( +@@ -13786,7 +13786,7 @@ int spider_mbase_handler::init_union_table_name_pos() + if (!union_table_name_pos_first) + { + if (!spider_bulk_malloc(spider_current_trx, 236, MYF(MY_WME), +- &union_table_name_pos_first, sizeof(SPIDER_INT_HLD), ++ &union_table_name_pos_first, (uint) (sizeof(SPIDER_INT_HLD)), + NullS) + ) { + DBUG_RETURN(HA_ERR_OUT_OF_MEM); +@@ -13807,7 +13807,7 @@ int spider_mbase_handler::set_union_table_name_pos() + if (!union_table_name_pos_current->next) + { + if (!spider_bulk_malloc(spider_current_trx, 237, MYF(MY_WME), +- &union_table_name_pos_current->next, sizeof(SPIDER_INT_HLD), ++ &union_table_name_pos_current->next, (uint) (sizeof(SPIDER_INT_HLD)), + NullS) + ) { + DBUG_RETURN(HA_ERR_OUT_OF_MEM); +diff --git a/storage/spider/spd_db_oracle.cc b/storage/spider/spd_db_oracle.cc +index 773c6b90ed9..0c74415f6b2 100644 +--- a/storage/spider/spd_db_oracle.cc ++++ b/storage/spider/spd_db_oracle.cc +@@ -588,16 +588,16 @@ int spider_db_oracle_row::init() + if ( + !(ind = (sb2 *) + spider_bulk_malloc(spider_current_trx, 161, MYF(MY_WME | MY_ZEROFILL), +- &ind, sizeof(sb2) * field_count, +- &rlen, sizeof(ub2) * field_count, +- &coltp, sizeof(ub2) * field_count, +- &colsz, sizeof(ub2) * field_count, +- &row_size, sizeof(ulong) * field_count, +- &val, sizeof(char *) * field_count, +- &tmp_val, MAX_FIELD_WIDTH * field_count, +- &defnp, sizeof(OCIDefine *) * field_count, +- &lobhp, sizeof(OCILobLocator *) * field_count, +- &colhp, sizeof(OCIParam *) * field_count, ++ &ind, (uint) (sizeof(sb2) * field_count), ++ &rlen, (uint) (sizeof(ub2) * field_count), ++ &coltp, (uint) (sizeof(ub2) * field_count), ++ &colsz, (uint) (sizeof(ub2) * field_count), ++ &row_size, (uint) (sizeof(ulong) * field_count), ++ &val, (uint) (sizeof(char *) * field_count), ++ &tmp_val, (uint) (MAX_FIELD_WIDTH * field_count), ++ &defnp, (uint) (sizeof(OCIDefine *) * field_count), ++ &lobhp, (uint) (sizeof(OCILobLocator *) * field_count), ++ &colhp, (uint) (sizeof(OCIParam *) * field_count), + NullS) + ) || + !(val_str = new spider_string[field_count]) +@@ -12519,7 +12519,7 @@ int spider_oracle_handler::init_union_table_name_pos() + if (!union_table_name_pos_first) + { + if (!spider_bulk_malloc(spider_current_trx, 238, MYF(MY_WME), +- &union_table_name_pos_first, sizeof(SPIDER_INT_HLD), ++ &union_table_name_pos_first, (uint) (sizeof(SPIDER_INT_HLD)), + NullS) + ) { + DBUG_RETURN(HA_ERR_OUT_OF_MEM); +@@ -12540,7 +12540,7 @@ int spider_oracle_handler::set_union_table_name_pos() + if (!union_table_name_pos_current->next) + { + if (!spider_bulk_malloc(spider_current_trx, 239, MYF(MY_WME), +- &union_table_name_pos_current->next, sizeof(SPIDER_INT_HLD), ++ &union_table_name_pos_current->next, (uint) (sizeof(SPIDER_INT_HLD)), + NullS) + ) { + DBUG_RETURN(HA_ERR_OUT_OF_MEM); +diff --git a/storage/spider/spd_direct_sql.cc b/storage/spider/spd_direct_sql.cc +index 7237d0877a7..7bf0b91a4a7 100644 +--- a/storage/spider/spd_direct_sql.cc ++++ b/storage/spider/spd_direct_sql.cc +@@ -1,4 +1,5 @@ +-/* Copyright (C) 2009-2018 Kentoku Shiba ++/* Copyright (C) 2009-2019 Kentoku Shiba ++ Copyright (C) 2019 MariaDB corp + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by +@@ -117,31 +118,32 @@ int spider_udf_direct_sql_create_table_list( + #if MYSQL_VERSION_ID < 50500 + if (!(direct_sql->db_names = (char**) + spider_bulk_malloc(spider_current_trx, 31, MYF(MY_WME | MY_ZEROFILL), +- &direct_sql->db_names, sizeof(char*) * table_count, +- &direct_sql->table_names, sizeof(char*) * table_count, +- &direct_sql->tables, sizeof(TABLE*) * table_count, +- &tmp_name_ptr, sizeof(char) * ( ++ &direct_sql->db_names, (uint) (sizeof(char*) * table_count), ++ &direct_sql->table_names, (uint) (sizeof(char*) * table_count), ++ &direct_sql->tables, (uint) (sizeof(TABLE*) * table_count), ++ &tmp_name_ptr, (uint) (sizeof(char) * ( + table_name_list_length + + thd->db_length * table_count + + 2 * table_count +- ), +- &direct_sql->iop, sizeof(int) * table_count, ++ )), ++ &direct_sql->iop, (uint) (sizeof(int) * table_count), + NullS)) + ) + #else + if (!(direct_sql->db_names = (char**) + spider_bulk_malloc(spider_current_trx, 31, MYF(MY_WME | MY_ZEROFILL), +- &direct_sql->db_names, sizeof(char*) * table_count, +- &direct_sql->table_names, sizeof(char*) * table_count, +- &direct_sql->tables, sizeof(TABLE*) * table_count, +- &tmp_name_ptr, sizeof(char) * ( ++ &direct_sql->db_names, (uint) (sizeof(char*) * table_count), ++ &direct_sql->table_names, (uint) (sizeof(char*) * table_count), ++ &direct_sql->tables, (uint) (sizeof(TABLE*) * table_count), ++ &tmp_name_ptr, (uint) (sizeof(char) * ( + table_name_list_length + + SPIDER_THD_db_length(thd) * table_count + + 2 * table_count +- ), +- &direct_sql->iop, sizeof(int) * table_count, +- &direct_sql->table_list, sizeof(TABLE_LIST) * table_count, +- &direct_sql->real_table_bitmap, sizeof(uchar) * ((table_count + 7) / 8), ++ )), ++ &direct_sql->iop, (uint) (sizeof(int) * table_count), ++ &direct_sql->table_list, (uint) (sizeof(TABLE_LIST) * table_count), ++ &direct_sql->real_table_bitmap, ++ (uint) (sizeof(uchar) * ((table_count + 7) / 8)), + NullS)) + ) + #endif +@@ -412,23 +414,23 @@ SPIDER_CONN *spider_udf_direct_sql_create_conn( + #endif + if (!(conn = (SPIDER_CONN *) + spider_bulk_malloc(spider_current_trx, 32, MYF(MY_WME | MY_ZEROFILL), +- &conn, sizeof(*conn), +- &tmp_name, direct_sql->conn_key_length + 1, +- &tmp_host, direct_sql->tgt_host_length + 1, +- &tmp_username, direct_sql->tgt_username_length + 1, +- &tmp_password, direct_sql->tgt_password_length + 1, +- &tmp_socket, direct_sql->tgt_socket_length + 1, +- &tmp_wrapper, direct_sql->tgt_wrapper_length + 1, +- &tmp_ssl_ca, direct_sql->tgt_ssl_ca_length + 1, +- &tmp_ssl_capath, direct_sql->tgt_ssl_capath_length + 1, +- &tmp_ssl_cert, direct_sql->tgt_ssl_cert_length + 1, +- &tmp_ssl_cipher, direct_sql->tgt_ssl_cipher_length + 1, +- &tmp_ssl_key, direct_sql->tgt_ssl_key_length + 1, ++ &conn, (uint) (sizeof(*conn)), ++ &tmp_name, (uint) (direct_sql->conn_key_length + 1), ++ &tmp_host, (uint) (direct_sql->tgt_host_length + 1), ++ &tmp_username, (uint) (direct_sql->tgt_username_length + 1), ++ &tmp_password, (uint) (direct_sql->tgt_password_length + 1), ++ &tmp_socket, (uint) (direct_sql->tgt_socket_length + 1), ++ &tmp_wrapper, (uint) (direct_sql->tgt_wrapper_length + 1), ++ &tmp_ssl_ca, (uint) (direct_sql->tgt_ssl_ca_length + 1), ++ &tmp_ssl_capath, (uint) (direct_sql->tgt_ssl_capath_length + 1), ++ &tmp_ssl_cert, (uint) (direct_sql->tgt_ssl_cert_length + 1), ++ &tmp_ssl_cipher, (uint) (direct_sql->tgt_ssl_cipher_length + 1), ++ &tmp_ssl_key, (uint) (direct_sql->tgt_ssl_key_length + 1), + &tmp_default_file, +- direct_sql->tgt_default_file_length + 1, ++ (uint) (direct_sql->tgt_default_file_length + 1), + &tmp_default_group, +- direct_sql->tgt_default_group_length + 1, +- &need_mon, sizeof(int), ++ (uint) (direct_sql->tgt_default_group_length + 1), ++ &need_mon, (uint) (sizeof(int)), + NullS)) + ) { + *error_num = HA_ERR_OUT_OF_MEM; +@@ -439,12 +441,12 @@ SPIDER_CONN *spider_udf_direct_sql_create_conn( + } else { + if (!(conn = (SPIDER_CONN *) + spider_bulk_malloc(spider_current_trx, 33, MYF(MY_WME | MY_ZEROFILL), +- &conn, sizeof(*conn), +- &tmp_name, direct_sql->conn_key_length + 1, +- &tmp_host, direct_sql->tgt_host_length + 1, +- &tmp_socket, direct_sql->tgt_socket_length + 1, +- &tmp_wrapper, direct_sql->tgt_wrapper_length + 1, +- &need_mon, sizeof(int), ++ &conn, (uint) (sizeof(*conn)), ++ &tmp_name, (uint) (direct_sql->conn_key_length + 1), ++ &tmp_host, (uint) (direct_sql->tgt_host_length + 1), ++ &tmp_socket, (uint) (direct_sql->tgt_socket_length + 1), ++ &tmp_wrapper, (uint) (direct_sql->tgt_wrapper_length + 1), ++ &need_mon, (uint) (sizeof(int)), + NullS)) + ) { + *error_num = HA_ERR_OUT_OF_MEM; +@@ -1602,8 +1604,8 @@ long long spider_direct_sql_body( + SPIDER_BACKUP_DASTATUS; + if (!(direct_sql = (SPIDER_DIRECT_SQL *) + spider_bulk_malloc(spider_current_trx, 34, MYF(MY_WME | MY_ZEROFILL), +- &direct_sql, sizeof(SPIDER_DIRECT_SQL), +- &sql, sizeof(char) * args->lengths[0], ++ &direct_sql, (uint) (sizeof(SPIDER_DIRECT_SQL)), ++ &sql, (uint) (sizeof(char) * args->lengths[0]), + NullS)) + ) { + error_num = HA_ERR_OUT_OF_MEM; +diff --git a/storage/spider/spd_group_by_handler.cc b/storage/spider/spd_group_by_handler.cc +index 3b57092c4ce..51cfca23106 100644 +--- a/storage/spider/spd_group_by_handler.cc ++++ b/storage/spider/spd_group_by_handler.cc +@@ -1,4 +1,5 @@ +-/* Copyright (C) 2008-2018 Kentoku Shiba ++/* Copyright (C) 2008-2019 Kentoku Shiba ++ Copyright (C) 2019 MariaDB corp + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by +@@ -637,9 +638,9 @@ SPIDER_CONN_HOLDER *spider_fields::create_conn_holder( + DBUG_PRINT("info",("spider this=%p", this)); + return_conn_holder = (SPIDER_CONN_HOLDER *) + spider_bulk_malloc(spider_current_trx, 252, MYF(MY_WME | MY_ZEROFILL), +- &return_conn_holder, sizeof(SPIDER_CONN_HOLDER), ++ &return_conn_holder, (uint) (sizeof(SPIDER_CONN_HOLDER)), + &table_link_idx_holder, +- table_count * sizeof(SPIDER_TABLE_LINK_IDX_HOLDER), ++ (uint) (table_count * sizeof(SPIDER_TABLE_LINK_IDX_HOLDER)), + NullS + ); + if (!return_conn_holder) +diff --git a/storage/spider/spd_ping_table.cc b/storage/spider/spd_ping_table.cc +index 431d46063c3..60e36fc24fb 100644 +--- a/storage/spider/spd_ping_table.cc ++++ b/storage/spider/spd_ping_table.cc +@@ -1,4 +1,5 @@ +-/* Copyright (C) 2009-2018 Kentoku Shiba ++/* Copyright (C) 2009-2019 Kentoku Shiba ++ Copyright (C) 2019 MariaDB corp + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by +@@ -367,12 +368,15 @@ int spider_get_ping_table_mon( + do { + if (!(table_mon = (SPIDER_TABLE_MON *) + spider_bulk_malloc(spider_current_trx, 35, MYF(MY_WME | MY_ZEROFILL), +- &table_mon, sizeof(SPIDER_TABLE_MON), +- &tmp_share, sizeof(SPIDER_SHARE), +- &tmp_connect_info, sizeof(char *) * SPIDER_TMP_SHARE_CHAR_PTR_COUNT, +- &tmp_connect_info_length, sizeof(uint) * SPIDER_TMP_SHARE_UINT_COUNT, +- &tmp_long, sizeof(long) * SPIDER_TMP_SHARE_LONG_COUNT, +- &tmp_longlong, sizeof(longlong) * SPIDER_TMP_SHARE_LONGLONG_COUNT, ++ &table_mon, (uint) (sizeof(SPIDER_TABLE_MON)), ++ &tmp_share, (uint) (sizeof(SPIDER_SHARE)), ++ &tmp_connect_info, ++ (uint) (sizeof(char *) * SPIDER_TMP_SHARE_CHAR_PTR_COUNT), ++ &tmp_connect_info_length, ++ (uint) (sizeof(uint) * SPIDER_TMP_SHARE_UINT_COUNT), ++ &tmp_long, (uint) (sizeof(long) * SPIDER_TMP_SHARE_LONG_COUNT), ++ &tmp_longlong, ++ (uint) (sizeof(longlong) * SPIDER_TMP_SHARE_LONGLONG_COUNT), + NullS)) + ) { + spider_sys_index_end(table_link_mon); +@@ -491,13 +495,17 @@ SPIDER_TABLE_MON_LIST *spider_get_ping_table_tgt( + SPD_INIT_ALLOC_ROOT(&mem_root, 4096, 0, MYF(MY_WME)); + if (!(table_mon_list = (SPIDER_TABLE_MON_LIST *) + spider_bulk_malloc(spider_current_trx, 36, MYF(MY_WME | MY_ZEROFILL), +- &table_mon_list, sizeof(SPIDER_TABLE_MON_LIST), +- &tmp_share, sizeof(SPIDER_SHARE), +- &tmp_connect_info, sizeof(char *) * SPIDER_TMP_SHARE_CHAR_PTR_COUNT, +- &tmp_connect_info_length, sizeof(uint) * SPIDER_TMP_SHARE_UINT_COUNT, +- &tmp_long, sizeof(long) * SPIDER_TMP_SHARE_LONG_COUNT, +- &tmp_longlong, sizeof(longlong) * SPIDER_TMP_SHARE_LONGLONG_COUNT, +- &key_str, str->length() + 1, ++ &table_mon_list, (uint) (sizeof(SPIDER_TABLE_MON_LIST)), ++ &tmp_share, (uint) (sizeof(SPIDER_SHARE)), ++ &tmp_connect_info, ++ (uint) (sizeof(char *) * SPIDER_TMP_SHARE_CHAR_PTR_COUNT), ++ &tmp_connect_info_length, ++ (uint) (sizeof(uint) * SPIDER_TMP_SHARE_UINT_COUNT), ++ &tmp_long, ++ (uint) (sizeof(long) * SPIDER_TMP_SHARE_LONG_COUNT), ++ &tmp_longlong, ++ (uint) (sizeof(longlong) * SPIDER_TMP_SHARE_LONGLONG_COUNT), ++ &key_str, (uint) (str->length() + 1), + NullS)) + ) { + my_error(HA_ERR_OUT_OF_MEM, MYF(0)); +diff --git a/storage/spider/spd_table.cc b/storage/spider/spd_table.cc +index 723beb0775e..fe628f55d16 100644 +--- a/storage/spider/spd_table.cc ++++ b/storage/spider/spd_table.cc +@@ -1211,8 +1211,8 @@ int spider_create_string_list( + + if (!(*string_list = (char**) + spider_bulk_malloc(spider_current_trx, 37, MYF(MY_WME | MY_ZEROFILL), +- string_list, sizeof(char*) * (*list_length), +- string_length_list, sizeof(int) * (*list_length), ++ string_list, (uint) (sizeof(char*) * (*list_length)), ++ string_length_list, (uint) (sizeof(int) * (*list_length)), + NullS)) + ) { + my_error(ER_OUT_OF_RESOURCES, MYF(0), HA_ERR_OUT_OF_MEM); +@@ -1330,7 +1330,7 @@ int spider_create_long_list( + + if (!(*long_list = (long*) + spider_bulk_malloc(spider_current_trx, 38, MYF(MY_WME | MY_ZEROFILL), +- long_list, sizeof(long) * (*list_length), ++ long_list, (uint) (sizeof(long) * (*list_length)), + NullS)) + ) { + my_error(ER_OUT_OF_RESOURCES, MYF(0), HA_ERR_OUT_OF_MEM); +@@ -1414,7 +1414,7 @@ int spider_create_longlong_list( + + if (!(*longlong_list = (longlong *) + spider_bulk_malloc(spider_current_trx, 39, MYF(MY_WME | MY_ZEROFILL), +- longlong_list, sizeof(longlong) * (*list_length), ++ longlong_list, (uint) (sizeof(longlong) * (*list_length)), + NullS)) + ) { + my_error(ER_OUT_OF_RESOURCES, MYF(0), HA_ERR_OUT_OF_MEM); +@@ -1485,8 +1485,8 @@ int spider_increase_string_list( + + if (!(tmp_str_list = (char**) + spider_bulk_malloc(spider_current_trx, 40, MYF(MY_WME | MY_ZEROFILL), +- &tmp_str_list, sizeof(char*) * link_count, +- &tmp_length_list, sizeof(uint) * link_count, ++ &tmp_str_list, (uint) (sizeof(char*) * link_count), ++ &tmp_length_list, (uint) (sizeof(uint) * link_count), + NullS)) + ) { + my_error(ER_OUT_OF_RESOURCES, MYF(0), HA_ERR_OUT_OF_MEM); +@@ -1548,8 +1548,8 @@ int spider_increase_null_string_list( + + if (!(tmp_str_list = (char**) + spider_bulk_malloc(spider_current_trx, 247, MYF(MY_WME | MY_ZEROFILL), +- &tmp_str_list, sizeof(char*) * link_count, +- &tmp_length_list, sizeof(uint) * link_count, ++ &tmp_str_list, (uint) (sizeof(char*) * link_count), ++ &tmp_length_list, (uint) (sizeof(uint) * link_count), + NullS)) + ) { + my_error(ER_OUT_OF_RESOURCES, MYF(0), HA_ERR_OUT_OF_MEM); +@@ -1606,7 +1606,7 @@ int spider_increase_long_list( + + if (!(tmp_long_list = (long*) + spider_bulk_malloc(spider_current_trx, 41, MYF(MY_WME | MY_ZEROFILL), +- &tmp_long_list, sizeof(long) * link_count, ++ &tmp_long_list, (uint) (sizeof(long) * link_count), + NullS)) + ) { + my_error(ER_OUT_OF_RESOURCES, MYF(0), HA_ERR_OUT_OF_MEM); +@@ -1651,7 +1651,7 @@ int spider_increase_longlong_list( + + if (!(tmp_longlong_list = (longlong*) + spider_bulk_malloc(spider_current_trx, 42, MYF(MY_WME | MY_ZEROFILL), +- &tmp_longlong_list, sizeof(longlong) * link_count, ++ &tmp_longlong_list, (uint) (sizeof(longlong) * link_count), + NullS)) + ) { + my_error(ER_OUT_OF_RESOURCES, MYF(0), HA_ERR_OUT_OF_MEM); +@@ -2974,17 +2974,17 @@ int spider_parse_connect_info( + if (!(share_alter->tmp_server_names = (char **) + spider_bulk_malloc(spider_current_trx, 43, MYF(MY_WME | MY_ZEROFILL), + &share_alter->tmp_server_names, +- sizeof(char *) * 16 * share->all_link_count, ++ (uint) (sizeof(char *) * 16 * share->all_link_count), + &share_alter->tmp_server_names_lengths, +- sizeof(uint *) * 16 * share->all_link_count, ++ (uint) (sizeof(uint *) * 16 * share->all_link_count), + &share_alter->tmp_tgt_ports, +- sizeof(long) * share->all_link_count, ++ (uint) (sizeof(long) * share->all_link_count), + &share_alter->tmp_tgt_ssl_vscs, +- sizeof(long) * share->all_link_count, ++ (uint) (sizeof(long) * share->all_link_count), + &share_alter->tmp_monitoring_binlog_pos_at_failing, +- sizeof(long) * share->all_link_count, ++ (uint) (sizeof(long) * share->all_link_count), + &share_alter->tmp_link_statuses, +- sizeof(long) * share->all_link_count, ++ (uint) (sizeof(long) * share->all_link_count), + NullS)) + ) { + error_num = HA_ERR_OUT_OF_MEM; +@@ -4388,13 +4388,17 @@ SPIDER_SHARE *spider_create_share( + bitmap_size = spider_bitmap_size(table_share->fields); + if (!(share = (SPIDER_SHARE *) + spider_bulk_malloc(spider_current_trx, 46, MYF(MY_WME | MY_ZEROFILL), +- &share, sizeof(*share), +- &tmp_name, length + 1, +- &tmp_static_key_cardinality, sizeof(*tmp_static_key_cardinality) * table_share->keys, +- &tmp_cardinality, sizeof(*tmp_cardinality) * table_share->fields, +- &tmp_cardinality_upd, sizeof(*tmp_cardinality_upd) * bitmap_size, +- &tmp_table_mon_mutex_bitmap, sizeof(*tmp_table_mon_mutex_bitmap) * +- ((spider_param_udf_table_mon_mutex_count() + 7) / 8), ++ &share, (uint) (sizeof(*share)), ++ &tmp_name, (uint) (length + 1), ++ &tmp_static_key_cardinality, ++ (uint) (sizeof(*tmp_static_key_cardinality) * table_share->keys), ++ &tmp_cardinality, ++ (uint) (sizeof(*tmp_cardinality) * table_share->fields), ++ &tmp_cardinality_upd, ++ (uint) (sizeof(*tmp_cardinality_upd) * bitmap_size), ++ &tmp_table_mon_mutex_bitmap, ++ (uint) (sizeof(*tmp_table_mon_mutex_bitmap) * ++ ((spider_param_udf_table_mon_mutex_count() + 7) / 8)), + NullS)) + ) { + *error_num = HA_ERR_OUT_OF_MEM; +@@ -5921,8 +5925,8 @@ SPIDER_LGTM_TBLHND_SHARE *spider_get_lgtm_tblhnd_share( + DBUG_PRINT("info",("spider create new lgtm tblhnd share")); + if (!(lgtm_tblhnd_share = (SPIDER_LGTM_TBLHND_SHARE *) + spider_bulk_malloc(spider_current_trx, 244, MYF(MY_WME | MY_ZEROFILL), +- &lgtm_tblhnd_share, sizeof(*lgtm_tblhnd_share), +- &tmp_name, table_name_length + 1, ++ &lgtm_tblhnd_share, (uint) (sizeof(*lgtm_tblhnd_share)), ++ &tmp_name, (uint) (table_name_length + 1), + NullS)) + ) { + *error_num = HA_ERR_OUT_OF_MEM; +@@ -6031,9 +6035,10 @@ SPIDER_PARTITION_SHARE *spider_get_pt_share( + DBUG_PRINT("info",("spider create new pt share")); + if (!(partition_share = (SPIDER_PARTITION_SHARE *) + spider_bulk_malloc(spider_current_trx, 51, MYF(MY_WME | MY_ZEROFILL), +- &partition_share, sizeof(*partition_share), +- &tmp_name, table_share->path.length + 1, +- &tmp_cardinality, sizeof(*tmp_cardinality) * table_share->fields, ++ &partition_share, (uint) (sizeof(*partition_share)), ++ &tmp_name, (uint) (table_share->path.length + 1), ++ &tmp_cardinality, ++ (uint) (sizeof(*tmp_cardinality) * table_share->fields), + NullS)) + ) { + *error_num = HA_ERR_OUT_OF_MEM; +@@ -6379,15 +6384,18 @@ int spider_open_all_tables( + + if (!(share = (SPIDER_SHARE *) + spider_bulk_malloc(spider_current_trx, 52, MYF(MY_WME | MY_ZEROFILL), +- &share, sizeof(*share), +- &connect_info, sizeof(char *) * SPIDER_TMP_SHARE_CHAR_PTR_COUNT, +- &connect_info_length, sizeof(uint) * SPIDER_TMP_SHARE_UINT_COUNT, +- &long_info, sizeof(long) * SPIDER_TMP_SHARE_LONG_COUNT, +- &longlong_info, sizeof(longlong) * SPIDER_TMP_SHARE_LONGLONG_COUNT, +- &conns, sizeof(SPIDER_CONN *), +- &need_mon, sizeof(int), +- &spider->conn_link_idx, sizeof(uint), +- &spider->conn_can_fo, sizeof(uchar), ++ &share, (uint) (sizeof(*share)), ++ &connect_info, ++ (uint) (sizeof(char *) * SPIDER_TMP_SHARE_CHAR_PTR_COUNT), ++ &connect_info_length, ++ (uint) (sizeof(uint) * SPIDER_TMP_SHARE_UINT_COUNT), ++ &long_info, (uint) (sizeof(long) * SPIDER_TMP_SHARE_LONG_COUNT), ++ &longlong_info, ++ (uint) (sizeof(longlong) * SPIDER_TMP_SHARE_LONGLONG_COUNT), ++ &conns, (uint) (sizeof(SPIDER_CONN *)), ++ &need_mon, (uint) (sizeof(int)), ++ &spider->conn_link_idx, (uint) (sizeof(uint)), ++ &spider->conn_can_fo, (uint) (sizeof(uchar)), + NullS)) + ) { + delete spider; +@@ -7194,12 +7202,12 @@ int spider_db_init( + + if (!(spider_udf_table_mon_mutexes = (pthread_mutex_t *) + spider_bulk_malloc(NULL, 53, MYF(MY_WME | MY_ZEROFILL), +- &spider_udf_table_mon_mutexes, sizeof(pthread_mutex_t) * +- spider_param_udf_table_mon_mutex_count(), +- &spider_udf_table_mon_conds, sizeof(pthread_cond_t) * +- spider_param_udf_table_mon_mutex_count(), +- &spider_udf_table_mon_list_hash, sizeof(HASH) * +- spider_param_udf_table_mon_mutex_count(), ++ &spider_udf_table_mon_mutexes, (uint) (sizeof(pthread_mutex_t) * ++ spider_param_udf_table_mon_mutex_count()), ++ &spider_udf_table_mon_conds, (uint) (sizeof(pthread_cond_t) * ++ spider_param_udf_table_mon_mutex_count()), ++ &spider_udf_table_mon_list_hash, (uint) (sizeof(HASH) * ++ spider_param_udf_table_mon_mutex_count()), + NullS)) + ) + goto error_alloc_mon_mutxes; +@@ -7248,10 +7256,10 @@ int spider_db_init( + #ifndef WITHOUT_SPIDER_BG_SEARCH + if (!(spider_table_sts_threads = (SPIDER_THREAD *) + spider_bulk_malloc(NULL, 256, MYF(MY_WME | MY_ZEROFILL), +- &spider_table_sts_threads, sizeof(SPIDER_THREAD) * +- spider_param_table_sts_thread_count(), +- &spider_table_crd_threads, sizeof(SPIDER_THREAD) * +- spider_param_table_crd_thread_count(), ++ &spider_table_sts_threads, (uint) (sizeof(SPIDER_THREAD) * ++ spider_param_table_sts_thread_count()), ++ &spider_table_crd_threads, (uint) (sizeof(SPIDER_THREAD) * ++ spider_param_table_crd_thread_count()), + NullS)) + ) + goto error_alloc_mon_mutxes; +@@ -7947,8 +7955,8 @@ SPIDER_INIT_ERROR_TABLE *spider_get_init_error_table( + } + if (!(spider_init_error_table = (SPIDER_INIT_ERROR_TABLE *) + spider_bulk_malloc(spider_current_trx, 54, MYF(MY_WME | MY_ZEROFILL), +- &spider_init_error_table, sizeof(*spider_init_error_table), +- &tmp_name, share->table_name_length + 1, ++ &spider_init_error_table, (uint) (sizeof(*spider_init_error_table)), ++ &tmp_name, (uint) (share->table_name_length + 1), + NullS)) + ) { + pthread_mutex_unlock(&spider_init_error_tbl_mutex); +@@ -9624,25 +9632,25 @@ int spider_create_spider_object_for_share( + #if defined(HS_HAS_SQLCOM) && defined(HAVE_HANDLERSOCKET) + if (!(need_mons = (int *) + spider_bulk_malloc(spider_current_trx, 255, MYF(MY_WME | MY_ZEROFILL), +- &need_mons, (sizeof(int) * share->link_count), +- &conns, (sizeof(SPIDER_CONN *) * share->link_count), +- &conn_link_idx, (sizeof(uint) * share->link_count), +- &conn_can_fo, (sizeof(uchar) * share->link_bitmap_size), +- &conn_keys, (sizeof(char *) * share->link_count), +- &hs_r_conn_keys, (sizeof(char *) * share->link_count), +- &hs_w_conn_keys, (sizeof(char *) * share->link_count), +- &dbton_hdl, (sizeof(spider_db_handler *) * SPIDER_DBTON_SIZE), ++ &need_mons, (uint) (sizeof(int) * share->link_count), ++ &conns, (uint) (sizeof(SPIDER_CONN *) * share->link_count), ++ &conn_link_idx, (uint) (sizeof(uint) * share->link_count), ++ &conn_can_fo, (uint) (sizeof(uchar) * share->link_bitmap_size), ++ &conn_keys, (uint) (sizeof(char *) * share->link_count), ++ &hs_r_conn_keys, (uint) (sizeof(char *) * share->link_count), ++ &hs_w_conn_keys, (uint) (sizeof(char *) * share->link_count), ++ &dbton_hdl, (uint) (sizeof(spider_db_handler *) * SPIDER_DBTON_SIZE), + NullS)) + ) + #else + if (!(need_mons = (int *) + spider_bulk_malloc(spider_current_trx, 255, MYF(MY_WME | MY_ZEROFILL), +- &need_mons, (sizeof(int) * share->link_count), +- &conns, (sizeof(SPIDER_CONN *) * share->link_count), +- &conn_link_idx, (sizeof(uint) * share->link_count), +- &conn_can_fo, (sizeof(uchar) * share->link_bitmap_size), +- &conn_keys, (sizeof(char *) * share->link_count), +- &dbton_hdl, (sizeof(spider_db_handler *) * SPIDER_DBTON_SIZE), ++ &need_mons, (uint) (sizeof(int) * share->link_count), ++ &conns, (uint) (sizeof(SPIDER_CONN *) * share->link_count), ++ &conn_link_idx, (uint) (sizeof(uint) * share->link_count), ++ &conn_can_fo, (uint) (sizeof(uchar) * share->link_bitmap_size), ++ &conn_keys, (uint) (sizeof(char *) * share->link_count), ++ &dbton_hdl, (uint) (sizeof(spider_db_handler *) * SPIDER_DBTON_SIZE), + NullS)) + ) + #endif +diff --git a/storage/spider/spd_trx.cc b/storage/spider/spd_trx.cc +index 485c61fc60b..b1b31a6db2e 100644 +--- a/storage/spider/spd_trx.cc ++++ b/storage/spider/spd_trx.cc +@@ -549,81 +549,90 @@ int spider_create_trx_alter_table( + + if (!(alter_table = (SPIDER_ALTER_TABLE *) + spider_bulk_malloc(spider_current_trx, 55, MYF(MY_WME | MY_ZEROFILL), +- &alter_table, sizeof(*alter_table), +- &tmp_name, sizeof(char) * (share->table_name_length + 1), +- +- &tmp_server_names, sizeof(char *) * share->all_link_count, +- &tmp_tgt_table_names, sizeof(char *) * share->all_link_count, +- &tmp_tgt_dbs, sizeof(char *) * share->all_link_count, +- &tmp_tgt_hosts, sizeof(char *) * share->all_link_count, +- &tmp_tgt_usernames, sizeof(char *) * share->all_link_count, +- &tmp_tgt_passwords, sizeof(char *) * share->all_link_count, +- &tmp_tgt_sockets, sizeof(char *) * share->all_link_count, +- &tmp_tgt_wrappers, sizeof(char *) * share->all_link_count, +- &tmp_tgt_ssl_cas, sizeof(char *) * share->all_link_count, +- &tmp_tgt_ssl_capaths, sizeof(char *) * share->all_link_count, +- &tmp_tgt_ssl_certs, sizeof(char *) * share->all_link_count, +- &tmp_tgt_ssl_ciphers, sizeof(char *) * share->all_link_count, +- &tmp_tgt_ssl_keys, sizeof(char *) * share->all_link_count, +- &tmp_tgt_default_files, sizeof(char *) * share->all_link_count, +- &tmp_tgt_default_groups, sizeof(char *) * share->all_link_count, +- &tmp_static_link_ids, sizeof(char *) * share->all_link_count, +- +- &tmp_server_names_lengths, sizeof(uint) * share->all_link_count, +- &tmp_tgt_table_names_lengths, sizeof(uint) * share->all_link_count, +- &tmp_tgt_dbs_lengths, sizeof(uint) * share->all_link_count, +- &tmp_tgt_hosts_lengths, sizeof(uint) * share->all_link_count, +- &tmp_tgt_usernames_lengths, sizeof(uint) * share->all_link_count, +- &tmp_tgt_passwords_lengths, sizeof(uint) * share->all_link_count, +- &tmp_tgt_sockets_lengths, sizeof(uint) * share->all_link_count, +- &tmp_tgt_wrappers_lengths, sizeof(uint) * share->all_link_count, +- &tmp_tgt_ssl_cas_lengths, sizeof(uint) * share->all_link_count, +- &tmp_tgt_ssl_capaths_lengths, sizeof(uint) * share->all_link_count, +- &tmp_tgt_ssl_certs_lengths, sizeof(uint) * share->all_link_count, +- &tmp_tgt_ssl_ciphers_lengths, sizeof(uint) * share->all_link_count, +- &tmp_tgt_ssl_keys_lengths, sizeof(uint) * share->all_link_count, +- &tmp_tgt_default_files_lengths, sizeof(uint) * share->all_link_count, +- &tmp_tgt_default_groups_lengths, sizeof(uint) * share->all_link_count, +- &tmp_static_link_ids_lengths, sizeof(uint) * share->all_link_count, +- +- &tmp_tgt_ports, sizeof(long) * share->all_link_count, +- &tmp_tgt_ssl_vscs, sizeof(long) * share->all_link_count, ++ &alter_table, (uint) (sizeof(*alter_table)), ++ &tmp_name, (uint) (sizeof(char) * (share->table_name_length + 1)), ++ ++ &tmp_server_names, (uint) (sizeof(char *) * share->all_link_count), ++ &tmp_tgt_table_names, (uint) (sizeof(char *) * share->all_link_count), ++ &tmp_tgt_dbs, (uint) (sizeof(char *) * share->all_link_count), ++ &tmp_tgt_hosts, (uint) (sizeof(char *) * share->all_link_count), ++ &tmp_tgt_usernames, (uint) (sizeof(char *) * share->all_link_count), ++ &tmp_tgt_passwords, (uint) (sizeof(char *) * share->all_link_count), ++ &tmp_tgt_sockets, (uint) (sizeof(char *) * share->all_link_count), ++ &tmp_tgt_wrappers, (uint) (sizeof(char *) * share->all_link_count), ++ &tmp_tgt_ssl_cas, (uint) (sizeof(char *) * share->all_link_count), ++ &tmp_tgt_ssl_capaths, (uint) (sizeof(char *) * share->all_link_count), ++ &tmp_tgt_ssl_certs, (uint) (sizeof(char *) * share->all_link_count), ++ &tmp_tgt_ssl_ciphers, (uint) (sizeof(char *) * share->all_link_count), ++ &tmp_tgt_ssl_keys, (uint) (sizeof(char *) * share->all_link_count), ++ &tmp_tgt_default_files, (uint) (sizeof(char *) * share->all_link_count), ++ &tmp_tgt_default_groups, (uint) (sizeof(char *) * share->all_link_count), ++ &tmp_static_link_ids, (uint) (sizeof(char *) * share->all_link_count), ++ ++ &tmp_server_names_lengths, (uint) (sizeof(uint) * share->all_link_count), ++ &tmp_tgt_table_names_lengths, ++ (uint) (sizeof(uint) * share->all_link_count), ++ &tmp_tgt_dbs_lengths, (uint) (sizeof(uint) * share->all_link_count), ++ &tmp_tgt_hosts_lengths, (uint) (sizeof(uint) * share->all_link_count), ++ &tmp_tgt_usernames_lengths, ++ (uint) (sizeof(uint) * share->all_link_count), ++ &tmp_tgt_passwords_lengths, ++ (uint) (sizeof(uint) * share->all_link_count), ++ &tmp_tgt_sockets_lengths, (uint) (sizeof(uint) * share->all_link_count), ++ &tmp_tgt_wrappers_lengths, (uint) (sizeof(uint) * share->all_link_count), ++ &tmp_tgt_ssl_cas_lengths, (uint) (sizeof(uint) * share->all_link_count), ++ &tmp_tgt_ssl_capaths_lengths, ++ (uint) (sizeof(uint) * share->all_link_count), ++ &tmp_tgt_ssl_certs_lengths, ++ (uint) (sizeof(uint) * share->all_link_count), ++ &tmp_tgt_ssl_ciphers_lengths, ++ (uint) (sizeof(uint) * share->all_link_count), ++ &tmp_tgt_ssl_keys_lengths, (uint) (sizeof(uint) * share->all_link_count), ++ &tmp_tgt_default_files_lengths, ++ (uint) (sizeof(uint) * share->all_link_count), ++ &tmp_tgt_default_groups_lengths, ++ (uint) (sizeof(uint) * share->all_link_count), ++ &tmp_static_link_ids_lengths, ++ (uint) (sizeof(uint) * share->all_link_count), ++ ++ &tmp_tgt_ports, (uint) (sizeof(long) * share->all_link_count), ++ &tmp_tgt_ssl_vscs, (uint) (sizeof(long) * share->all_link_count), + &tmp_monitoring_binlog_pos_at_failing, +- sizeof(long) * share->all_link_count, +- &tmp_link_statuses, sizeof(long) * share->all_link_count, +- +- &tmp_server_names_char, sizeof(char) * +- (share_alter->tmp_server_names_charlen + 1), +- &tmp_tgt_table_names_char, sizeof(char) * +- (share_alter->tmp_tgt_table_names_charlen + 1), +- &tmp_tgt_dbs_char, sizeof(char) * +- (share_alter->tmp_tgt_dbs_charlen + 1), +- &tmp_tgt_hosts_char, sizeof(char) * +- (share_alter->tmp_tgt_hosts_charlen + 1), +- &tmp_tgt_usernames_char, sizeof(char) * +- (share_alter->tmp_tgt_usernames_charlen + 1), +- &tmp_tgt_passwords_char, sizeof(char) * +- (share_alter->tmp_tgt_passwords_charlen + 1), +- &tmp_tgt_sockets_char, sizeof(char) * +- (share_alter->tmp_tgt_sockets_charlen + 1), +- &tmp_tgt_wrappers_char, sizeof(char) * +- (share_alter->tmp_tgt_wrappers_charlen + 1), +- &tmp_tgt_ssl_cas_char, sizeof(char) * +- (share_alter->tmp_tgt_ssl_cas_charlen + 1), +- &tmp_tgt_ssl_capaths_char, sizeof(char) * +- (share_alter->tmp_tgt_ssl_capaths_charlen + 1), +- &tmp_tgt_ssl_certs_char, sizeof(char) * +- (share_alter->tmp_tgt_ssl_certs_charlen + 1), +- &tmp_tgt_ssl_ciphers_char, sizeof(char) * +- (share_alter->tmp_tgt_ssl_ciphers_charlen + 1), +- &tmp_tgt_ssl_keys_char, sizeof(char) * +- (share_alter->tmp_tgt_ssl_keys_charlen + 1), +- &tmp_tgt_default_files_char, sizeof(char) * +- (share_alter->tmp_tgt_default_files_charlen + 1), +- &tmp_tgt_default_groups_char, sizeof(char) * +- (share_alter->tmp_tgt_default_groups_charlen + 1), +- &tmp_static_link_ids_char, sizeof(char) * +- (share_alter->tmp_static_link_ids_charlen + 1), ++ (uint) (sizeof(long) * share->all_link_count), ++ &tmp_link_statuses, (uint) (sizeof(long) * share->all_link_count), ++ ++ &tmp_server_names_char, (uint) (sizeof(char) * ++ (share_alter->tmp_server_names_charlen + 1)), ++ &tmp_tgt_table_names_char, (uint) (sizeof(char) * ++ (share_alter->tmp_tgt_table_names_charlen + 1)), ++ &tmp_tgt_dbs_char, (uint) (sizeof(char) * ++ (share_alter->tmp_tgt_dbs_charlen + 1)), ++ &tmp_tgt_hosts_char, (uint) (sizeof(char) * ++ (share_alter->tmp_tgt_hosts_charlen + 1)), ++ &tmp_tgt_usernames_char, (uint) (sizeof(char) * ++ (share_alter->tmp_tgt_usernames_charlen + 1)), ++ &tmp_tgt_passwords_char, (uint) (sizeof(char) * ++ (share_alter->tmp_tgt_passwords_charlen + 1)), ++ &tmp_tgt_sockets_char, (uint) (sizeof(char) * ++ (share_alter->tmp_tgt_sockets_charlen + 1)), ++ &tmp_tgt_wrappers_char, (uint) (sizeof(char) * ++ (share_alter->tmp_tgt_wrappers_charlen + 1)), ++ &tmp_tgt_ssl_cas_char, (uint) (sizeof(char) * ++ (share_alter->tmp_tgt_ssl_cas_charlen + 1)), ++ &tmp_tgt_ssl_capaths_char, (uint) (sizeof(char) * ++ (share_alter->tmp_tgt_ssl_capaths_charlen + 1)), ++ &tmp_tgt_ssl_certs_char, (uint) (sizeof(char) * ++ (share_alter->tmp_tgt_ssl_certs_charlen + 1)), ++ &tmp_tgt_ssl_ciphers_char, (uint) (sizeof(char) * ++ (share_alter->tmp_tgt_ssl_ciphers_charlen + 1)), ++ &tmp_tgt_ssl_keys_char, (uint) (sizeof(char) * ++ (share_alter->tmp_tgt_ssl_keys_charlen + 1)), ++ &tmp_tgt_default_files_char, (uint) (sizeof(char) * ++ (share_alter->tmp_tgt_default_files_charlen + 1)), ++ &tmp_tgt_default_groups_char, (uint) (sizeof(char) * ++ (share_alter->tmp_tgt_default_groups_charlen + 1)), ++ &tmp_static_link_ids_char, (uint) (sizeof(char) * ++ (share_alter->tmp_static_link_ids_charlen + 1)), + NullS)) + ) { + error_num = HA_ERR_OUT_OF_MEM; +@@ -1201,10 +1210,10 @@ SPIDER_TRX *spider_get_trx( + DBUG_PRINT("info",("spider create new trx")); + if (!(trx = (SPIDER_TRX *) + spider_bulk_malloc(NULL, 56, MYF(MY_WME | MY_ZEROFILL), +- &trx, sizeof(*trx), +- &tmp_share, sizeof(SPIDER_SHARE), +- &udf_table_mutexes, sizeof(pthread_mutex_t) * +- spider_param_udf_table_lock_mutex_count(), ++ &trx, (uint) (sizeof(*trx)), ++ &tmp_share, (uint) (sizeof(SPIDER_SHARE)), ++ &udf_table_mutexes, (uint) (sizeof(pthread_mutex_t) * ++ spider_param_udf_table_lock_mutex_count()), + NullS)) + ) + goto error_alloc_trx; +@@ -4203,10 +4212,10 @@ int spider_create_trx_ha( + { + if (!(trx_ha = (SPIDER_TRX_HA *) + spider_bulk_malloc(spider_current_trx, 58, MYF(MY_WME), +- &trx_ha, sizeof(SPIDER_TRX_HA), +- &tmp_name, sizeof(char *) * (share->table_name_length + 1), +- &conn_link_idx, sizeof(uint) * share->link_count, +- &conn_can_fo, sizeof(uchar) * share->link_bitmap_size, ++ &trx_ha, (uint) (sizeof(SPIDER_TRX_HA)), ++ &tmp_name, (uint) (sizeof(char *) * (share->table_name_length + 1)), ++ &conn_link_idx, (uint) (sizeof(uint) * share->link_count), ++ &conn_can_fo, (uint) (sizeof(uchar) * share->link_bitmap_size), + NullS)) + ) { + DBUG_RETURN(HA_ERR_OUT_OF_MEM); +-- +2.17.2 + diff --git a/mariadb.spec b/mariadb.spec index 8a080a0..bbed684 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -11,7 +11,7 @@ # The last version on which the full testsuite has been run # In case of further rebuilds of that version, don't require full testsuite to be run # run only "main" suite -%global last_tested_version 10.3.15 +%global last_tested_version 10.3.16 # Set to 1 to force run the testsuite even if it was already tested in current version %global force_run_testsuite 0 @@ -152,7 +152,7 @@ %global sameevr %{epoch}:%{version}-%{release} Name: mariadb -Version: 10.3.15 +Version: 10.3.16 Release: 1%{?with_debug:.debug}%{?dist} Epoch: 3 @@ -201,6 +201,9 @@ Patch10: %{pkgnamepatch}-ssl-cipher-tests.patch Patch11: %{pkgnamepatch}-pcdir.patch # Patch12: Fix mysqld_safe --dry-run Patch12: %{pkgnamepatch}-mysqld_safe.patch +# Patch13: Fix Spider code on armv7hl; https://jira.mariadb.org/browse/MDEV-18737 +Patch13: %{pkgnamepatch}-spider_on_armv7hl.patch + BuildRequires: cmake gcc-c++ BuildRequires: multilib-rpm-config @@ -697,6 +700,7 @@ find . -name "*.jar" -type f -exec rm --verbose -f {} \; %patch10 -p1 %patch11 -p1 %patch12 -p1 +%patch13 -p1 # workaround for upstream bug #56342 #rm mysql-test/t/ssl_8k_key-master.opt @@ -1574,6 +1578,10 @@ fi %endif %changelog +* Tue Jun 18 2019 Michal Schorm - 10.3.16-1 +- Rebase to 10.3.16 +- Added patch for armv7hl builds of spider SE + * Tue Jun 11 2019 Michal Schorm - 10.3.15-1 - Rebase to 10.3.15 - CVEs fixed: diff --git a/rh-skipped-tests-base.list b/rh-skipped-tests-base.list index e41440b..cc1d628 100644 --- a/rh-skipped-tests-base.list +++ b/rh-skipped-tests-base.list @@ -51,3 +51,6 @@ parts.partition_alter4_innodb : # Fails from 10.3.9 encryption.innodb-redo-badkey : + +# Fails from 10.3.16 +main.mysql : diff --git a/sources b/sources index 0f6db9c..0b9ac17 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (mariadb-10.3.15.tar.gz) = 35332ac32cba27fef1b4ddd2209236853f4309756fd121fbdbd2b6be0651e817cedc80e276b89ccfa4bc76760811434fab45a4d380d0ebd500c7d9bd7377fe93 +SHA512 (mariadb-10.3.16.tar.gz) = b22a8c8fa0265f88962432ade71c3f0ec554f7d38042def832cfcb50f3aa1dd77a715c76706ffeae679b95438529b06e98b73b7e219f9c645980802027ec022f From b0584894e408e62a543931d799ed2321feb91b30 Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Sat, 20 Jul 2019 01:03:08 +0200 Subject: [PATCH 27/49] Update build macros --- mariadb.spec | 14 ++++++++------ rh-skipped-tests-base.list | 1 + 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/mariadb.spec b/mariadb.spec index bbed684..ec815f3 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -762,6 +762,7 @@ rm -r storage/tokudb/mysql-test/tokudb/t/*.py %build +%{set_build_flags} # fail quickly and obviously if user tries to build as root %if %runselftest @@ -773,7 +774,7 @@ rm -r storage/tokudb/mysql-test/tokudb/t/*.py fi %endif -CFLAGS="%{optflags} -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE" +CFLAGS="$CFLAGS -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE" # 10.3.15 debug builds need to ignore some warnings; reported upstream as https://jira.mariadb.org/browse/MDEV-19740 %if %{with debug} @@ -787,7 +788,8 @@ CFLAGS="$CFLAGS -Wno-error=shift-count-overflow -Wno-error=format" %{?with_debug: CFLAGS="$CFLAGS -O0 -g"} CXXFLAGS="$CFLAGS" -export CFLAGS CXXFLAGS +CPPFLAGS="$CFLAGS" +export CFLAGS CXXFLAGS CPPFLAGS # The INSTALL_xxx macros have to be specified relative to CMAKE_INSTALL_PREFIX @@ -856,7 +858,7 @@ export CFLAGS CXXFLAGS # cmake ./ -LAH for List Advanced Help cmake ./ -L -make %{?_smp_mflags} VERBOSE=1 +%make_build VERBOSE=1 # build selinux policy @@ -866,7 +868,7 @@ make -f /usr/share/selinux/devel/Makefile %{name}-server-galera.pp %endif %install -make DESTDIR=%{buildroot} install +%make_install # multilib header support #1625157 for header in mysql/server/my_config.h mysql/server/private/config.h; do @@ -1180,8 +1182,8 @@ export MTR_BUILD_THREAD=%{__isa_bits} fi ) -%endif # if dry run -%endif # with test +%endif +%endif diff --git a/rh-skipped-tests-base.list b/rh-skipped-tests-base.list index cc1d628..23b776e 100644 --- a/rh-skipped-tests-base.list +++ b/rh-skipped-tests-base.list @@ -54,3 +54,4 @@ encryption.innodb-redo-badkey : # Fails from 10.3.16 main.mysql : +main.func_math : From 4035a62c624d6359f314109bf80640f4996dd2c8 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 25 Jul 2019 15:53:07 +0000 Subject: [PATCH 28/49] - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- mariadb.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mariadb.spec b/mariadb.spec index ec815f3..caac1d0 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -153,7 +153,7 @@ Name: mariadb Version: 10.3.16 -Release: 1%{?with_debug:.debug}%{?dist} +Release: 2%{?with_debug:.debug}%{?dist} Epoch: 3 Summary: A very fast and robust SQL database server @@ -1580,6 +1580,9 @@ fi %endif %changelog +* Thu Jul 25 2019 Fedora Release Engineering - 3:10.3.16-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + * Tue Jun 18 2019 Michal Schorm - 10.3.16-1 - Rebase to 10.3.16 - Added patch for armv7hl builds of spider SE From 0f8030126101a3d1e52edac5dabcbf1c0301df45 Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Thu, 1 Aug 2019 20:42:47 +0200 Subject: [PATCH 29/49] Rebase to 10.3.17 --- mariadb.spec | 13 ++++++---- rh-skipped-tests-arm.list | 51 +++++++++++++++----------------------- rh-skipped-tests-base.list | 37 +++++++-------------------- rh-skipped-tests-ppc.list | 23 ++--------------- rh-skipped-tests-s390.list | 13 ++++------ sources | 2 +- 6 files changed, 45 insertions(+), 94 deletions(-) diff --git a/mariadb.spec b/mariadb.spec index caac1d0..ca76b20 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -6,12 +6,12 @@ %{!?runselftest:%global runselftest 1} # Set this to 1 to see which tests fail, but 0 on production ready build -%global ignore_testsuite_result 1 +%global ignore_testsuite_result 0 # The last version on which the full testsuite has been run # In case of further rebuilds of that version, don't require full testsuite to be run # run only "main" suite -%global last_tested_version 10.3.16 +%global last_tested_version 10.3.17 # Set to 1 to force run the testsuite even if it was already tested in current version %global force_run_testsuite 0 @@ -110,7 +110,7 @@ %bcond_without unbundled_pcre %else %bcond_with unbundled_pcre -%global pcre_bundled_version 8.42 +%global pcre_bundled_version 8.43 %endif # Use main python interpretter version @@ -152,8 +152,8 @@ %global sameevr %{epoch}:%{version}-%{release} Name: mariadb -Version: 10.3.16 -Release: 2%{?with_debug:.debug}%{?dist} +Version: 10.3.17 +Release: 1%{?with_debug:.debug}%{?dist} Epoch: 3 Summary: A very fast and robust SQL database server @@ -1580,6 +1580,9 @@ fi %endif %changelog +* Thu Aug 01 2019 Michal Schorm - 10.3.17-1 +- Rebase to 10.3.17 + * Thu Jul 25 2019 Fedora Release Engineering - 3:10.3.16-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild diff --git a/rh-skipped-tests-arm.list b/rh-skipped-tests-arm.list index b05d1a8..e235e76 100644 --- a/rh-skipped-tests-arm.list +++ b/rh-skipped-tests-arm.list @@ -1,37 +1,26 @@ # Fails since 10.3.8, only on armv7hl versioning.auto_increment : -versioning.commit_id : -versioning.delete : -versioning.foreign : -versioning.insert : -versioning.insert2 : -versioning.select2 : -versioning.update : +versioning.commit_id : +versioning.delete : +versioning.foreign : +versioning.insert : +versioning.insert2 : +versioning.select2 : +versioning.update : +# Fails since 10.3.9, only on armv7hl +versioning.alter : +versioning.replace : +versioning.select : +versioning.truncate : +versioning.trx_id : +# Fails since 10.3.17, only on armv7hl +versioning.online : +versioning.partition : +versioning.replace : -# Fails since 10.3.8, on both armv7hl and aarch64 -mariabackup.system_versioning : - -# Fails since 10.3.9, on both armv7hl and aarch64 -disks.disks : -encryption.create_or_replace : -federated.federatedx_versioning : # Fails since 10.3.9, only on armv7hl -versioning.alter : -versioning.replace : -versioning.select : -versioning.truncate : -versioning.trx_id : +federated.federatedx_versioning : -# Fails since 10.3.9, only on aarch64 -innodb_gis.kill_server : -innodb_gis.rtree_search : -innodb.innodb_defrag_concurrent : -parts.partition_alter1_1_2_innodb : -parts.partition_alter1_2_innodb : -parts.partition_alter2_1_1_innodb : -parts.partition_alter2_1_2_innodb : -parts.partition_alter2_2_1_innodb : -parts.partition_alter2_2_2_innodb : -parts.partition_basic_innodb : -parts.part_supported_sql_func_innodb : +# Fails from 10.3.17 only on armv7hl +mariabackup.system_versioning : \ No newline at end of file diff --git a/rh-skipped-tests-base.list b/rh-skipped-tests-base.list index 23b776e..8f26151 100644 --- a/rh-skipped-tests-base.list +++ b/rh-skipped-tests-base.list @@ -1,10 +1,9 @@ # The SSL test are failing correctly. Fro more explanation, see: # https://jira.mariadb.org/browse/MDEV-8404?focusedCommentId=84275&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-84275 main.ssl_7937 : #1399847 -main.ssl_crl_clients : #1399847 main.ssl_8k_key : +main.ssl_crl : #1399847 -# perfschema.nesting : #1399847 perfschema.socket_summary_by_instance_func : #1399847 perfschema.socket_summary_by_event_name_func : @@ -23,35 +22,17 @@ sys_vars.slave_parallel_threads_basic : # Fails since 10.1.12 innodb.innodb_defrag_binlog : -# on x86_64 after 10.2.12 and 10.2.13 after some unidentified change in Rawhide buildroot -mroonga/storage.index_multiple_column_range_all_used_less_than : -mroonga/storage.index_multiple_column_range_all_used_less_than_or_equal : -mroonga/storage.index_multiple_column_range_partially_used_have_prefix_less_than : -mroonga/storage.index_multiple_column_range_partially_used_have_prefix_less_than_or_equal : -mroonga/storage.index_multiple_column_range_partially_used_no_prefix_less_than : -mroonga/storage.index_multiple_column_range_partially_used_no_prefix_less_than_or_equal : -mroonga/storage.optimization_order_limit_optimized_datetime_less_than : -mroonga/storage.optimization_order_limit_optimized_datetime_less_than_or_equal : - # Fails everywhere since 10.2.15 main.userstat : # Fails on x86_64 since 10.2.15 -rocksdb.bulk_load_errors : -rocksdb.index_merge_rocksdb : -rocksdb.index_merge_rocksdb2 : -rocksdb.read_only_tx : -rocksdb_rpl.mdev12179 : -rocksdb.shutdown : -rocksdb.2pc_group_commit : +rocksdb.bulk_load : +rocksdb.bulk_load_rev_cf : +rocksdb.bulk_load_rev_cf_and_data : +rocksdb.bulk_load_rev_data : -# Fails on ppc and arm since 10.2.15 -innodb_gis.rtree_compress2 : -parts.partition_alter4_innodb : +# Fails everywhere from 10.3.16 +main.mysql : -# Fails from 10.3.9 -encryption.innodb-redo-badkey : - -# Fails from 10.3.16 -main.mysql : -main.func_math : +# Fails everywhere from 10.3.17 +versioning.update-big : diff --git a/rh-skipped-tests-ppc.list b/rh-skipped-tests-ppc.list index dd5050c..53e80b8 100644 --- a/rh-skipped-tests-ppc.list +++ b/rh-skipped-tests-ppc.list @@ -1,21 +1,2 @@ -# 10.2.12 & 10.2.13 after some uninedtified Rawhide (and the forked f28) buildroot change -# failed: 1045: Access denied for user '.....'@'localhost' (using password: YES) -innodb.temporary_table_optimization : - -main.derived_cond_pushdown : -main.ps : - -# From 10.3.9 on ppc64le -encryption.create_or_replace : -main.select : -main.select_jcl6 : -main.select_pkeycache : -main.sp : -main.type_float : -main.type_newdecimal : -main.type_ranges : - -# 10.3.10 -parts.partition_alter1_2_innodb : -parts.partition_alter1_1_2_innodb : -innodb.innodb_defrag_concurrent : +# Fails from 10.3.17 +innodb.innodb_buffer_pool_resize : diff --git a/rh-skipped-tests-s390.list b/rh-skipped-tests-s390.list index 00a20ae..2d82f8a 100644 --- a/rh-skipped-tests-s390.list +++ b/rh-skipped-tests-s390.list @@ -1,9 +1,6 @@ # Fails since 10.2.15 -disks.disks : - -# Fails since 10.3.9 -binlog.binlog_flush_binlogs_delete_domain : -handler.heap : -handler.interface : -innodb_fts.innodb_fts_misc : -rpl.rpl_gtid_delete_domain : +disks.disks : +# Fails since 10.3.17 +disks.disks_notemysql-test-run : +innodb.innodb_defrag_binlog : +innodb.trx_id_future : \ No newline at end of file diff --git a/sources b/sources index 0b9ac17..3829214 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (mariadb-10.3.16.tar.gz) = b22a8c8fa0265f88962432ade71c3f0ec554f7d38042def832cfcb50f3aa1dd77a715c76706ffeae679b95438529b06e98b73b7e219f9c645980802027ec022f +SHA512 (mariadb-10.3.17.tar.gz) = 6fba995d8c284a12f19ee5635f5d69d8fa89fc314f512cd1764b2c4593933baf71a472ddce630463debd3bfbafa1cf5afee3f40d3c4062242f58cea16259561e From 83045a588331b95a1e8febf33139767a26e10958 Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Fri, 6 Sep 2019 04:31:21 +0200 Subject: [PATCH 30/49] Fix the debug build --- mariadb-debug_build.patch | 28 ++++++++++++++++++++++++++++ mariadb.spec | 16 +++++++--------- 2 files changed, 35 insertions(+), 9 deletions(-) create mode 100644 mariadb-debug_build.patch diff --git a/mariadb-debug_build.patch b/mariadb-debug_build.patch new file mode 100644 index 0000000..e3cfc69 --- /dev/null +++ b/mariadb-debug_build.patch @@ -0,0 +1,28 @@ +Remove the '-Werror' GCC compilation flag, so the debug build compilation won't crash on random warnings. + +'-Werror' is not your friend: +https://embeddedartistry.com/blog/2017/5/3/-werror-is-not-your-friend + +--- mariadb-10.3.17/cmake/maintainer.cmake 2019-07-28 02:18:30.000000000 +0200 ++++ mariadb-10.3.17/cmake/maintainer.cmake_patched 2019-09-03 13:41:49.082088685 +0200 +@@ -33,7 +33,6 @@ SET(MY_WARNING_FLAGS + -Wnon-virtual-dtor + -Wvla + -Wwrite-strings +- -Werror + ) + + IF(CMAKE_COMPILER_IS_GNUCC AND CMAKE_C_COMPILER_VERSION VERSION_LESS "6.0.0") +--- mariadb-10.3.17/storage/tokudb/PerconaFT/cmake_modules/TokuSetupCompiler.cmake 2019-07-28 02:18:32.000000000 +0200 ++++ mariadb-10.3.17/storage/tokudb/PerconaFT/cmake_modules/TokuSetupCompiler.cmake_patched 2019-09-03 13:53:51.813324055 +0200 +@@ -163,8 +163,8 @@ if (NOT CMAKE_CXX_COMPILER_ID STREQUAL C + endif () + + ## always want these in debug builds +-set(CMAKE_C_FLAGS_DEBUG "-Wall -Werror ${CMAKE_C_FLAGS_DEBUG}") +-set(CMAKE_CXX_FLAGS_DEBUG "-Wall -Werror ${CMAKE_CXX_FLAGS_DEBUG}") ++set(CMAKE_C_FLAGS_DEBUG "-Wall ${CMAKE_C_FLAGS_DEBUG}") ++set(CMAKE_CXX_FLAGS_DEBUG "-Wall ${CMAKE_CXX_FLAGS_DEBUG}") + + # pick language dialect + set(CMAKE_C_FLAGS "-std=c99 ${CMAKE_C_FLAGS}") diff --git a/mariadb.spec b/mariadb.spec index ca76b20..08bef16 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -153,7 +153,7 @@ Name: mariadb Version: 10.3.17 -Release: 1%{?with_debug:.debug}%{?dist} +Release: 2%{?with_debug:.debug}%{?dist} Epoch: 3 Summary: A very fast and robust SQL database server @@ -203,6 +203,8 @@ Patch11: %{pkgnamepatch}-pcdir.patch Patch12: %{pkgnamepatch}-mysqld_safe.patch # Patch13: Fix Spider code on armv7hl; https://jira.mariadb.org/browse/MDEV-18737 Patch13: %{pkgnamepatch}-spider_on_armv7hl.patch +# Patch14: Remove the '-Werror' flag so the debug build won't crash on random warnings +Patch14: %{pkgnamepatch}-debug_build.patch BuildRequires: cmake gcc-c++ @@ -701,6 +703,7 @@ find . -name "*.jar" -type f -exec rm --verbose -f {} \; %patch11 -p1 %patch12 -p1 %patch13 -p1 +%patch14 -p1 # workaround for upstream bug #56342 #rm mysql-test/t/ssl_8k_key-master.opt @@ -776,14 +779,6 @@ rm -r storage/tokudb/mysql-test/tokudb/t/*.py CFLAGS="$CFLAGS -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE" -# 10.3.15 debug builds need to ignore some warnings; reported upstream as https://jira.mariadb.org/browse/MDEV-19740 -%if %{with debug} -# x86_64 -CFLAGS="$CFLAGS -Wno-error=deprecated-copy -Wno-error=pessimizing-move -Wno-error=maybe-uninitialized -Wno-error=format-overflow" -# armv7hl -CFLAGS="$CFLAGS -Wno-error=shift-count-overflow -Wno-error=format" -%endif - # Override all optimization flags when making a debug build %{?with_debug: CFLAGS="$CFLAGS -O0 -g"} @@ -1580,6 +1575,9 @@ fi %endif %changelog +* Fri Sep 06 2019 Michal Schorm - 10.3.17-2 +- Fix the debug build + * Thu Aug 01 2019 Michal Schorm - 10.3.17-1 - Rebase to 10.3.17 From 59f05ba2ef0bea9be8f235e6f09e69d6a4dc6d2d Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Wed, 11 Sep 2019 13:00:52 +0200 Subject: [PATCH 31/49] Disable building of the ed25519 client plugin. From now on it will be shipped by 'mariadb-connector-c' package --- mariadb.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mariadb.spec b/mariadb.spec index 08bef16..c784e1f 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -153,7 +153,7 @@ Name: mariadb Version: 10.3.17 -Release: 2%{?with_debug:.debug}%{?dist} +Release: 3%{?with_debug:.debug}%{?dist} Epoch: 3 Summary: A very fast and robust SQL database server @@ -842,6 +842,7 @@ export CFLAGS CXXFLAGS CPPFLAGS -DPLUGIN_SPHINX=%{?with_sphinx:DYNAMIC}%{!?with_sphinx:NO} \ -DPLUGIN_TOKUDB=%{?with_tokudb:DYNAMIC}%{!?with_tokudb:NO} \ -DPLUGIN_CONNECT=%{?with_connect:DYNAMIC}%{!?with_connect:NO} \ + -DPLUGIN_CLIENT_ED25519=OFF \ -DPYTHON_SHEBANG=%{python_path} \ -DPLUGIN_CACHING_SHA2_PASSWORD=%{?with_clibrary:DYNAMIC}%{!?with_clibrary:OFF} \ -DPLUGIN_AWS_KEY_MANAGEMENT=NO \ @@ -1575,6 +1576,10 @@ fi %endif %changelog +* Wed Sep 11 2019 Michal Schorm - 10.3.17-3 +- Disable building of the ed25519 client plugin. + From now on it will be shipped by 'mariadb-connector-c' package + * Fri Sep 06 2019 Michal Schorm - 10.3.17-2 - Fix the debug build From c870dc4d2c77596ee3b72b5ce9a5047109518684 Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Tue, 17 Sep 2019 14:00:40 +0200 Subject: [PATCH 32/49] Extend the testsuite execution plan --- mariadb.spec | 7 +++++-- rh-skipped-tests-base.list | 3 +++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/mariadb.spec b/mariadb.spec index c784e1f..192ca5f 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -1149,7 +1149,7 @@ export MTR_BUILD_THREAD=%{__isa_bits} set -ex cd mysql-test - export common_testsuite_arguments=" --parallel=auto --force --retry=1 --suite-timeout=900 --testcase-timeout=30 --mysqld=--binlog-format=mixed --force-restart --shutdown-timeout=60 --max-test-fail=5 " + export common_testsuite_arguments=" --parallel=auto --force --retry=2 --suite-timeout=900 --testcase-timeout=30 --mysqld=--binlog-format=mixed --force-restart --shutdown-timeout=60 --max-test-fail=5 " # If full testsuite has already been run on this version and we don't explicitly want the full testsuite to be run if [[ "%{last_tested_version}" == "%{version}" ]] && [[ %{force_run_testsuite} -eq 0 ]] @@ -1170,7 +1170,7 @@ export MTR_BUILD_THREAD=%{__isa_bits} --skip-test-list=unstable-tests %endif # Second run for the SPIDER suites that fail with SCA (ssl self signed certificate) - perl ./mysql-test-run.pl $common_testsuite_arguments --skip-ssl --big-test --mem --suite=spider,spider/bg \ + perl ./mysql-test-run.pl $common_testsuite_arguments --skip-ssl --big-test --mem --suite=spider,spider/bg,spider/bugfix,spider/handler \ %if %{ignore_testsuite_result} --max-test-fail=999 || : %endif @@ -1178,6 +1178,9 @@ export MTR_BUILD_THREAD=%{__isa_bits} fi ) +# NOTE: the Spider SE has 2 more hidden testsuites "oracle" and "oracle2". +# however, all of the tests fail with: "failed: 12521: Can't use wrapper 'oracle' for SQL connection" + %endif %endif diff --git a/rh-skipped-tests-base.list b/rh-skipped-tests-base.list index 8f26151..eb84580 100644 --- a/rh-skipped-tests-base.list +++ b/rh-skipped-tests-base.list @@ -36,3 +36,6 @@ main.mysql : # Fails everywhere from 10.3.17 versioning.update-big : + +# Expected to fail, the plugin is not build with server, but 'mariadb-connector-c' instead +plugins.auth_ed25519 : \ No newline at end of file From f7802f9b05122ed91777a8c74c85603bea4c37ac Mon Sep 17 00:00:00 2001 From: Carl George Date: Thu, 31 Oct 2019 15:47:00 -0500 Subject: [PATCH 33/49] Rebase to 10.3.18 --- mariadb-spider_on_armv7hl.patch | 113 +++++++++++++++----------------- mariadb.spec | 7 +- sources | 2 +- 3 files changed, 58 insertions(+), 64 deletions(-) diff --git a/mariadb-spider_on_armv7hl.patch b/mariadb-spider_on_armv7hl.patch index 2278481..e4e6694 100644 --- a/mariadb-spider_on_armv7hl.patch +++ b/mariadb-spider_on_armv7hl.patch @@ -1,16 +1,16 @@ Fix for: https://jira.mariadb.org/browse/MDEV-18737 Taken from: -https://github.com/MariaDB/server/commit/80f9bd3d9c4f1b6367487a88e4ca816fcb8ce186 +https://github.com/MariaDB/server/commit/ddce85907611e0533d6226de7f53e751cf173f6a -From 80f9bd3d9c4f1b6367487a88e4ca816fcb8ce186 Mon Sep 17 00:00:00 2001 -From: Kentoku -Date: Tue, 18 Jun 2019 01:43:07 +0900 -Subject: [PATCH] MDEV-18737 Spider "Out of memory" on armv7hl +From 3faf5d4c1c3274a20a92cb3eb7eb2de6140894d6 Mon Sep 17 00:00:00 2001 +From: Kentoku SHIBA +Date: Thu, 25 Jul 2019 22:52:45 +0900 +Subject: [PATCH] MDEV-18737 Spider "Out of memory" on armv7hl (#1363) This is an issue of memory alignment of variable argument when calling my_multi_malloc(). The fix is strictly casting allocating size to "uint". @@ -20,20 +20,20 @@ The fix is strictly casting allocating size to "uint". storage/spider/spd_copy_tables.cc | 25 ++-- storage/spider/spd_db_conn.cc | 13 +- storage/spider/spd_db_handlersocket.cc | 4 +- - storage/spider/spd_db_mysql.cc | 12 +- + storage/spider/spd_db_mysql.cc | 10 +- storage/spider/spd_db_oracle.cc | 24 ++-- storage/spider/spd_direct_sql.cc | 78 +++++------ storage/spider/spd_group_by_handler.cc | 7 +- storage/spider/spd_ping_table.cc | 36 +++-- storage/spider/spd_table.cc | 134 ++++++++++--------- storage/spider/spd_trx.cc | 173 +++++++++++++------------ - 12 files changed, 328 insertions(+), 283 deletions(-) + 12 files changed, 327 insertions(+), 282 deletions(-) diff --git a/storage/spider/ha_spider.cc b/storage/spider/ha_spider.cc -index 33e81201fff..d3bc24dc0e0 100644 +index 967d2c6e5de..e04f0c8ef55 100644 --- a/storage/spider/ha_spider.cc +++ b/storage/spider/ha_spider.cc -@@ -395,15 +395,24 @@ int ha_spider::open( +@@ -394,15 +394,24 @@ int ha_spider::open( { if (!(searched_bitmap = (uchar *) spider_bulk_malloc(spider_current_trx, 15, MYF(MY_WME), @@ -67,7 +67,7 @@ index 33e81201fff..d3bc24dc0e0 100644 NullS)) ) { error_num = HA_ERR_OUT_OF_MEM; -@@ -11389,7 +11398,7 @@ int ha_spider::create( +@@ -11317,7 +11326,7 @@ int ha_spider::create( if (!(tmp_share.static_key_cardinality = (longlong *) spider_bulk_malloc(spider_current_trx, 246, MYF(MY_WME), &tmp_share.static_key_cardinality, @@ -76,7 +76,7 @@ index 33e81201fff..d3bc24dc0e0 100644 NullS)) ) { error_num = HA_ERR_OUT_OF_MEM; -@@ -12198,7 +12207,8 @@ int ha_spider::info_push( +@@ -12126,7 +12135,8 @@ int ha_spider::info_push( spider_free(spider_current_trx, hs_pushed_ret_fields, MYF(0)); if (!(hs_pushed_ret_fields = (uint32 *) spider_bulk_malloc(spider_current_trx, 17, MYF(MY_WME), @@ -86,7 +86,7 @@ index 33e81201fff..d3bc24dc0e0 100644 NullS)) ) { DBUG_RETURN(HA_ERR_OUT_OF_MEM); -@@ -13762,8 +13772,8 @@ SPIDER_BULK_ACCESS_LINK *ha_spider::create_bulk_access_link() +@@ -13690,8 +13700,8 @@ SPIDER_BULK_ACCESS_LINK *ha_spider::create_bulk_access_link() */ if (!(bulk_access_link = (SPIDER_BULK_ACCESS_LINK *) spider_bulk_malloc(spider_current_trx, 168, MYF(MY_WME), @@ -98,10 +98,10 @@ index 33e81201fff..d3bc24dc0e0 100644 ) { goto error_bulk_malloc; diff --git a/storage/spider/spd_conn.cc b/storage/spider/spd_conn.cc -index b1f49f4f250..2f372d8f692 100644 +index 911c9bc95ac..f8ca9108061 100644 --- a/storage/spider/spd_conn.cc +++ b/storage/spider/spd_conn.cc -@@ -472,30 +472,30 @@ SPIDER_CONN *spider_create_conn( +@@ -470,30 +470,30 @@ SPIDER_CONN *spider_create_conn( #endif if (!(conn = (SPIDER_CONN *) spider_bulk_malloc(spider_current_trx, 18, MYF(MY_WME | MY_ZEROFILL), @@ -147,7 +147,7 @@ index b1f49f4f250..2f372d8f692 100644 NullS)) ) { *error_num = HA_ERR_OUT_OF_MEM; -@@ -594,13 +594,13 @@ SPIDER_CONN *spider_create_conn( +@@ -592,13 +592,13 @@ SPIDER_CONN *spider_create_conn( } else if (conn_kind == SPIDER_CONN_KIND_HS_READ) { if (!(conn = (SPIDER_CONN *) spider_bulk_malloc(spider_current_trx, 19, MYF(MY_WME | MY_ZEROFILL), @@ -167,7 +167,7 @@ index b1f49f4f250..2f372d8f692 100644 NullS)) ) { *error_num = HA_ERR_OUT_OF_MEM; -@@ -636,13 +636,13 @@ SPIDER_CONN *spider_create_conn( +@@ -634,13 +634,13 @@ SPIDER_CONN *spider_create_conn( } else { if (!(conn = (SPIDER_CONN *) spider_bulk_malloc(spider_current_trx, 20, MYF(MY_WME | MY_ZEROFILL), @@ -187,7 +187,7 @@ index b1f49f4f250..2f372d8f692 100644 NullS)) ) { *error_num = HA_ERR_OUT_OF_MEM; -@@ -3648,13 +3648,16 @@ int spider_create_mon_threads( +@@ -3634,13 +3634,16 @@ int spider_create_mon_threads( } if (!(share->bg_mon_thds = (THD **) spider_bulk_malloc(spider_current_trx, 23, MYF(MY_WME | MY_ZEROFILL), @@ -263,10 +263,10 @@ index 13c53220b16..1a472e2c12b 100644 ) { my_error(ER_OUT_OF_RESOURCES, MYF(0), HA_ERR_OUT_OF_MEM); diff --git a/storage/spider/spd_db_conn.cc b/storage/spider/spd_db_conn.cc -index f3d607cd6dc..6d3a88a55db 100644 +index cc4599ce0b3..f7178293b05 100644 --- a/storage/spider/spd_db_conn.cc +++ b/storage/spider/spd_db_conn.cc -@@ -2683,7 +2683,8 @@ int spider_db_fetch_for_item_sum_func( +@@ -2643,7 +2643,8 @@ int spider_db_fetch_for_item_sum_func( if (!spider->direct_aggregate_item_first) { if (!spider_bulk_malloc(spider_current_trx, 240, MYF(MY_WME), @@ -276,7 +276,7 @@ index f3d607cd6dc..6d3a88a55db 100644 NullS) ) { DBUG_RETURN(HA_ERR_OUT_OF_MEM); -@@ -2702,7 +2703,7 @@ int spider_db_fetch_for_item_sum_func( +@@ -2662,7 +2663,7 @@ int spider_db_fetch_for_item_sum_func( { if (!spider_bulk_malloc(spider_current_trx, 241, MYF(MY_WME), &spider->direct_aggregate_item_current->next, @@ -285,7 +285,7 @@ index f3d607cd6dc..6d3a88a55db 100644 ) { DBUG_RETURN(HA_ERR_OUT_OF_MEM); } -@@ -4074,8 +4075,8 @@ int spider_db_store_result( +@@ -4034,8 +4035,8 @@ int spider_db_store_result( current->field_count = field_count; if (!(position = (SPIDER_POSITION *) spider_bulk_malloc(spider_current_trx, 7, MYF(MY_WME | MY_ZEROFILL), @@ -296,7 +296,7 @@ index f3d607cd6dc..6d3a88a55db 100644 NullS)) ) DBUG_RETURN(HA_ERR_OUT_OF_MEM); -@@ -10948,8 +10949,8 @@ int spider_db_udf_copy_tables( +@@ -10814,8 +10815,8 @@ int spider_db_udf_copy_tables( DBUG_ENTER("spider_db_udf_copy_tables"); if (!(last_row_pos = (ulong *) spider_bulk_malloc(spider_current_trx, 30, MYF(MY_WME), @@ -308,7 +308,7 @@ index f3d607cd6dc..6d3a88a55db 100644 ) { my_error(ER_OUT_OF_RESOURCES, MYF(0), HA_ERR_OUT_OF_MEM); diff --git a/storage/spider/spd_db_handlersocket.cc b/storage/spider/spd_db_handlersocket.cc -index ac81525092b..27257ee08e6 100644 +index 1e42838f40a..1e88ad4a59a 100644 --- a/storage/spider/spd_db_handlersocket.cc +++ b/storage/spider/spd_db_handlersocket.cc @@ -505,8 +505,8 @@ SPIDER_DB_ROW *spider_db_handlersocket_row::clone() @@ -323,10 +323,10 @@ index ac81525092b..27257ee08e6 100644 ) { delete clone_row; diff --git a/storage/spider/spd_db_mysql.cc b/storage/spider/spd_db_mysql.cc -index 58351195a61..da2052ad79e 100644 +index 1b62b4a9bd5..947a614f11e 100644 --- a/storage/spider/spd_db_mysql.cc +++ b/storage/spider/spd_db_mysql.cc -@@ -537,9 +537,9 @@ SPIDER_DB_ROW *spider_db_mbase_row::clone() +@@ -523,9 +523,9 @@ SPIDER_DB_ROW *spider_db_mbase_row::clone() row_size = record_size + field_count; } if (!spider_bulk_malloc(spider_current_trx, 29, MYF(MY_WME), @@ -339,16 +339,7 @@ index 58351195a61..da2052ad79e 100644 NullS) ) { delete clone_row; -@@ -5473,7 +5473,7 @@ int spider_db_mbase_util::append_tables_top_down( - int error_num; - uint outer_join_backup; - TABLE_LIST *cur_table_list, *prev_table_list = NULL, *cond_table_list = NULL; -- bool first; -+ bool first = TRUE; - DBUG_ENTER("spider_db_mbase_util::append_tables_top_down"); - DBUG_PRINT("info",("spider this=%p", this)); - if ( -@@ -13786,7 +13786,7 @@ int spider_mbase_handler::init_union_table_name_pos() +@@ -13519,7 +13519,7 @@ int spider_mbase_handler::init_union_table_name_pos() if (!union_table_name_pos_first) { if (!spider_bulk_malloc(spider_current_trx, 236, MYF(MY_WME), @@ -357,7 +348,7 @@ index 58351195a61..da2052ad79e 100644 NullS) ) { DBUG_RETURN(HA_ERR_OUT_OF_MEM); -@@ -13807,7 +13807,7 @@ int spider_mbase_handler::set_union_table_name_pos() +@@ -13540,7 +13540,7 @@ int spider_mbase_handler::set_union_table_name_pos() if (!union_table_name_pos_current->next) { if (!spider_bulk_malloc(spider_current_trx, 237, MYF(MY_WME), @@ -367,7 +358,7 @@ index 58351195a61..da2052ad79e 100644 ) { DBUG_RETURN(HA_ERR_OUT_OF_MEM); diff --git a/storage/spider/spd_db_oracle.cc b/storage/spider/spd_db_oracle.cc -index 773c6b90ed9..0c74415f6b2 100644 +index 08d7d3e083d..d869afc61f4 100644 --- a/storage/spider/spd_db_oracle.cc +++ b/storage/spider/spd_db_oracle.cc @@ -588,16 +588,16 @@ int spider_db_oracle_row::init() @@ -397,7 +388,7 @@ index 773c6b90ed9..0c74415f6b2 100644 NullS) ) || !(val_str = new spider_string[field_count]) -@@ -12519,7 +12519,7 @@ int spider_oracle_handler::init_union_table_name_pos() +@@ -12487,7 +12487,7 @@ int spider_oracle_handler::init_union_table_name_pos() if (!union_table_name_pos_first) { if (!spider_bulk_malloc(spider_current_trx, 238, MYF(MY_WME), @@ -406,7 +397,7 @@ index 773c6b90ed9..0c74415f6b2 100644 NullS) ) { DBUG_RETURN(HA_ERR_OUT_OF_MEM); -@@ -12540,7 +12540,7 @@ int spider_oracle_handler::set_union_table_name_pos() +@@ -12508,7 +12508,7 @@ int spider_oracle_handler::set_union_table_name_pos() if (!union_table_name_pos_current->next) { if (!spider_bulk_malloc(spider_current_trx, 239, MYF(MY_WME), @@ -624,10 +615,10 @@ index 431d46063c3..60e36fc24fb 100644 ) { my_error(HA_ERR_OUT_OF_MEM, MYF(0)); diff --git a/storage/spider/spd_table.cc b/storage/spider/spd_table.cc -index 723beb0775e..fe628f55d16 100644 +index 83c5a37555f..5bae895570d 100644 --- a/storage/spider/spd_table.cc +++ b/storage/spider/spd_table.cc -@@ -1211,8 +1211,8 @@ int spider_create_string_list( +@@ -1209,8 +1209,8 @@ int spider_create_string_list( if (!(*string_list = (char**) spider_bulk_malloc(spider_current_trx, 37, MYF(MY_WME | MY_ZEROFILL), @@ -638,7 +629,7 @@ index 723beb0775e..fe628f55d16 100644 NullS)) ) { my_error(ER_OUT_OF_RESOURCES, MYF(0), HA_ERR_OUT_OF_MEM); -@@ -1330,7 +1330,7 @@ int spider_create_long_list( +@@ -1328,7 +1328,7 @@ int spider_create_long_list( if (!(*long_list = (long*) spider_bulk_malloc(spider_current_trx, 38, MYF(MY_WME | MY_ZEROFILL), @@ -647,7 +638,7 @@ index 723beb0775e..fe628f55d16 100644 NullS)) ) { my_error(ER_OUT_OF_RESOURCES, MYF(0), HA_ERR_OUT_OF_MEM); -@@ -1414,7 +1414,7 @@ int spider_create_longlong_list( +@@ -1412,7 +1412,7 @@ int spider_create_longlong_list( if (!(*longlong_list = (longlong *) spider_bulk_malloc(spider_current_trx, 39, MYF(MY_WME | MY_ZEROFILL), @@ -656,7 +647,7 @@ index 723beb0775e..fe628f55d16 100644 NullS)) ) { my_error(ER_OUT_OF_RESOURCES, MYF(0), HA_ERR_OUT_OF_MEM); -@@ -1485,8 +1485,8 @@ int spider_increase_string_list( +@@ -1483,8 +1483,8 @@ int spider_increase_string_list( if (!(tmp_str_list = (char**) spider_bulk_malloc(spider_current_trx, 40, MYF(MY_WME | MY_ZEROFILL), @@ -667,7 +658,7 @@ index 723beb0775e..fe628f55d16 100644 NullS)) ) { my_error(ER_OUT_OF_RESOURCES, MYF(0), HA_ERR_OUT_OF_MEM); -@@ -1548,8 +1548,8 @@ int spider_increase_null_string_list( +@@ -1546,8 +1546,8 @@ int spider_increase_null_string_list( if (!(tmp_str_list = (char**) spider_bulk_malloc(spider_current_trx, 247, MYF(MY_WME | MY_ZEROFILL), @@ -678,7 +669,7 @@ index 723beb0775e..fe628f55d16 100644 NullS)) ) { my_error(ER_OUT_OF_RESOURCES, MYF(0), HA_ERR_OUT_OF_MEM); -@@ -1606,7 +1606,7 @@ int spider_increase_long_list( +@@ -1604,7 +1604,7 @@ int spider_increase_long_list( if (!(tmp_long_list = (long*) spider_bulk_malloc(spider_current_trx, 41, MYF(MY_WME | MY_ZEROFILL), @@ -687,7 +678,7 @@ index 723beb0775e..fe628f55d16 100644 NullS)) ) { my_error(ER_OUT_OF_RESOURCES, MYF(0), HA_ERR_OUT_OF_MEM); -@@ -1651,7 +1651,7 @@ int spider_increase_longlong_list( +@@ -1649,7 +1649,7 @@ int spider_increase_longlong_list( if (!(tmp_longlong_list = (longlong*) spider_bulk_malloc(spider_current_trx, 42, MYF(MY_WME | MY_ZEROFILL), @@ -696,7 +687,7 @@ index 723beb0775e..fe628f55d16 100644 NullS)) ) { my_error(ER_OUT_OF_RESOURCES, MYF(0), HA_ERR_OUT_OF_MEM); -@@ -2974,17 +2974,17 @@ int spider_parse_connect_info( +@@ -2972,17 +2972,17 @@ int spider_parse_connect_info( if (!(share_alter->tmp_server_names = (char **) spider_bulk_malloc(spider_current_trx, 43, MYF(MY_WME | MY_ZEROFILL), &share_alter->tmp_server_names, @@ -720,7 +711,7 @@ index 723beb0775e..fe628f55d16 100644 NullS)) ) { error_num = HA_ERR_OUT_OF_MEM; -@@ -4388,13 +4388,17 @@ SPIDER_SHARE *spider_create_share( +@@ -4383,13 +4383,17 @@ SPIDER_SHARE *spider_create_share( bitmap_size = spider_bitmap_size(table_share->fields); if (!(share = (SPIDER_SHARE *) spider_bulk_malloc(spider_current_trx, 46, MYF(MY_WME | MY_ZEROFILL), @@ -745,7 +736,7 @@ index 723beb0775e..fe628f55d16 100644 NullS)) ) { *error_num = HA_ERR_OUT_OF_MEM; -@@ -5921,8 +5925,8 @@ SPIDER_LGTM_TBLHND_SHARE *spider_get_lgtm_tblhnd_share( +@@ -5907,8 +5911,8 @@ SPIDER_LGTM_TBLHND_SHARE *spider_get_lgtm_tblhnd_share( DBUG_PRINT("info",("spider create new lgtm tblhnd share")); if (!(lgtm_tblhnd_share = (SPIDER_LGTM_TBLHND_SHARE *) spider_bulk_malloc(spider_current_trx, 244, MYF(MY_WME | MY_ZEROFILL), @@ -756,7 +747,7 @@ index 723beb0775e..fe628f55d16 100644 NullS)) ) { *error_num = HA_ERR_OUT_OF_MEM; -@@ -6031,9 +6035,10 @@ SPIDER_PARTITION_SHARE *spider_get_pt_share( +@@ -6017,9 +6021,10 @@ SPIDER_PARTITION_SHARE *spider_get_pt_share( DBUG_PRINT("info",("spider create new pt share")); if (!(partition_share = (SPIDER_PARTITION_SHARE *) spider_bulk_malloc(spider_current_trx, 51, MYF(MY_WME | MY_ZEROFILL), @@ -770,7 +761,7 @@ index 723beb0775e..fe628f55d16 100644 NullS)) ) { *error_num = HA_ERR_OUT_OF_MEM; -@@ -6379,15 +6384,18 @@ int spider_open_all_tables( +@@ -6395,15 +6400,18 @@ int spider_open_all_tables( if (!(share = (SPIDER_SHARE *) spider_bulk_malloc(spider_current_trx, 52, MYF(MY_WME | MY_ZEROFILL), @@ -798,7 +789,7 @@ index 723beb0775e..fe628f55d16 100644 NullS)) ) { delete spider; -@@ -7194,12 +7202,12 @@ int spider_db_init( +@@ -7204,12 +7212,12 @@ int spider_db_init( if (!(spider_udf_table_mon_mutexes = (pthread_mutex_t *) spider_bulk_malloc(NULL, 53, MYF(MY_WME | MY_ZEROFILL), @@ -817,7 +808,7 @@ index 723beb0775e..fe628f55d16 100644 NullS)) ) goto error_alloc_mon_mutxes; -@@ -7248,10 +7256,10 @@ int spider_db_init( +@@ -7258,10 +7266,10 @@ int spider_db_init( #ifndef WITHOUT_SPIDER_BG_SEARCH if (!(spider_table_sts_threads = (SPIDER_THREAD *) spider_bulk_malloc(NULL, 256, MYF(MY_WME | MY_ZEROFILL), @@ -832,7 +823,7 @@ index 723beb0775e..fe628f55d16 100644 NullS)) ) goto error_alloc_mon_mutxes; -@@ -7947,8 +7955,8 @@ SPIDER_INIT_ERROR_TABLE *spider_get_init_error_table( +@@ -7968,8 +7976,8 @@ SPIDER_INIT_ERROR_TABLE *spider_get_init_error_table( } if (!(spider_init_error_table = (SPIDER_INIT_ERROR_TABLE *) spider_bulk_malloc(spider_current_trx, 54, MYF(MY_WME | MY_ZEROFILL), @@ -843,7 +834,7 @@ index 723beb0775e..fe628f55d16 100644 NullS)) ) { pthread_mutex_unlock(&spider_init_error_tbl_mutex); -@@ -9624,25 +9632,25 @@ int spider_create_spider_object_for_share( +@@ -9551,25 +9559,25 @@ int spider_create_spider_object_for_share( #if defined(HS_HAS_SQLCOM) && defined(HAVE_HANDLERSOCKET) if (!(need_mons = (int *) spider_bulk_malloc(spider_current_trx, 255, MYF(MY_WME | MY_ZEROFILL), @@ -884,10 +875,10 @@ index 723beb0775e..fe628f55d16 100644 ) #endif diff --git a/storage/spider/spd_trx.cc b/storage/spider/spd_trx.cc -index 485c61fc60b..b1b31a6db2e 100644 +index bb9f11793cb..1638533eca1 100644 --- a/storage/spider/spd_trx.cc +++ b/storage/spider/spd_trx.cc -@@ -549,81 +549,90 @@ int spider_create_trx_alter_table( +@@ -548,81 +548,90 @@ int spider_create_trx_alter_table( if (!(alter_table = (SPIDER_ALTER_TABLE *) spider_bulk_malloc(spider_current_trx, 55, MYF(MY_WME | MY_ZEROFILL), @@ -1052,7 +1043,7 @@ index 485c61fc60b..b1b31a6db2e 100644 NullS)) ) { error_num = HA_ERR_OUT_OF_MEM; -@@ -1201,10 +1210,10 @@ SPIDER_TRX *spider_get_trx( +@@ -1200,10 +1209,10 @@ SPIDER_TRX *spider_get_trx( DBUG_PRINT("info",("spider create new trx")); if (!(trx = (SPIDER_TRX *) spider_bulk_malloc(NULL, 56, MYF(MY_WME | MY_ZEROFILL), @@ -1067,7 +1058,7 @@ index 485c61fc60b..b1b31a6db2e 100644 NullS)) ) goto error_alloc_trx; -@@ -4203,10 +4212,10 @@ int spider_create_trx_ha( +@@ -4191,10 +4200,10 @@ int spider_create_trx_ha( { if (!(trx_ha = (SPIDER_TRX_HA *) spider_bulk_malloc(spider_current_trx, 58, MYF(MY_WME), @@ -1083,5 +1074,5 @@ index 485c61fc60b..b1b31a6db2e 100644 ) { DBUG_RETURN(HA_ERR_OUT_OF_MEM); -- -2.17.2 +2.23.0 diff --git a/mariadb.spec b/mariadb.spec index 192ca5f..b5edf2e 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -152,8 +152,8 @@ %global sameevr %{epoch}:%{version}-%{release} Name: mariadb -Version: 10.3.17 -Release: 3%{?with_debug:.debug}%{?dist} +Version: 10.3.18 +Release: 1%{?with_debug:.debug}%{?dist} Epoch: 3 Summary: A very fast and robust SQL database server @@ -1579,6 +1579,9 @@ fi %endif %changelog +* Thu Oct 31 2019 Carl George - 3:10.3.18-1 +- Rebase to 10.3.18 + * Wed Sep 11 2019 Michal Schorm - 10.3.17-3 - Disable building of the ed25519 client plugin. From now on it will be shipped by 'mariadb-connector-c' package diff --git a/sources b/sources index 3829214..0f51d89 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (mariadb-10.3.17.tar.gz) = 6fba995d8c284a12f19ee5635f5d69d8fa89fc314f512cd1764b2c4593933baf71a472ddce630463debd3bfbafa1cf5afee3f40d3c4062242f58cea16259561e +SHA512 (mariadb-10.3.18.tar.gz) = 817253d18f20c74f9ec8030678fd50a28b1726fd59153023a3a5e9b3f79e1f44d79feb24ae9ed72d8c1c04017110c932aba7be0610fb06245590c7f5610db242 From c11af443b215852235beb8c3154b89c84bb7a8a7 Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Wed, 6 Nov 2019 15:15:33 +0100 Subject: [PATCH 34/49] Rebase to 10.3.19 Drop patch for mysqld_safe, fixed by upstream. --- mariadb-logrotate.patch | 20 ++++++++------------ mariadb-mysqld_safe.patch | 17 ----------------- mariadb.spec | 8 ++++---- sources | 2 +- 4 files changed, 13 insertions(+), 34 deletions(-) delete mode 100644 mariadb-mysqld_safe.patch diff --git a/mariadb-logrotate.patch b/mariadb-logrotate.patch index fd58c42..6af9466 100644 --- a/mariadb-logrotate.patch +++ b/mariadb-logrotate.patch @@ -26,16 +26,13 @@ Update 6/2018 beeing able to send the SIGHUP to the process and read the mysqld pid file, which root can. * Submited as PR: https://github.com/MariaDB/server/pull/807 ---- mariadb-10.3.7/support-files/mysql-log-rotate.sh 2018-05-23 22:38:46.000000000 +0200 -+++ mariadb-10.3.7/support-files/mysql-log-rotate.sh_patched 2018-06-27 12:11:23.705719826 +0200 -@@ -1,25 +1,12 @@ - # This logname can be set in /etc/my.cnf - # by setting the variable "err-log" --# in the [safe_mysqld] section as follows: -+# in the [mysqld] section as follows: +--- mariadb-10.3.19/support-files/mysql-log-rotate.sh 2019-11-03 17:03:27.000000000 +0100 ++++ mariadb-10.3.19/support-files/mysql-log-rotate.sh_patched 2019-11-06 15:07:54.205379672 +0100 +@@ -3,23 +3,10 @@ + # in the [mysqld] section as follows: # --# [safe_mysqld] --# err-log=@localstatedir@/mysqld.log + # [mysqld] +-# log-error=@localstatedir@/mysqld.log -# -# If the root user has a password you have to create a -# /root/.my.cnf configuration file with the following @@ -49,15 +46,14 @@ Update 6/2018 -# -# ATTENTION: This /root/.my.cnf should be readable ONLY -# for root ! -+# [mysqld] -+# log_error=@LOG_LOCATION@ ++# log-error=@LOG_LOCATION@ -@localstatedir@/mysqld.log { - # create 600 mysql mysql +@LOG_LOCATION@ { + create 600 mysql mysql notifempty - daily + daily rotate 3 @@ -27,11 +14,9 @@ compress diff --git a/mariadb-mysqld_safe.patch b/mariadb-mysqld_safe.patch deleted file mode 100644 index cda0d3e..0000000 --- a/mariadb-mysqld_safe.patch +++ /dev/null @@ -1,17 +0,0 @@ -Fix for: -/usr/bin/mysqld_safe: line 933: return: can only `return' from a function or sourced script - -Upstream PR: -https://github.com/MariaDB/server/pull/1238 - ---- mariadb-10.3.12/scripts/mysqld_safe.sh 2019-01-04 16:28:49.000000000 +0100 -+++ mariadb-10.3.12/scripts/mysqld_safe.sh_patched 2019-03-21 11:34:59.499309336 +0100 -@@ -929,7 +929,7 @@ do - cmd="$cmd "`shell_quote_string "$i"` - done - cmd="$cmd $args" --[ $dry_run -eq 1 ] && return -+[ $dry_run -eq 1 ] && exit - - # Avoid 'nohup: ignoring input' warning - test -n "$NOHUP_NICENESS" && cmd="$cmd < /dev/null" diff --git a/mariadb.spec b/mariadb.spec index b5edf2e..b801050 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -152,7 +152,7 @@ %global sameevr %{epoch}:%{version}-%{release} Name: mariadb -Version: 10.3.18 +Version: 10.3.19 Release: 1%{?with_debug:.debug}%{?dist} Epoch: 3 @@ -199,8 +199,6 @@ Patch9: %{pkgnamepatch}-ownsetup.patch Patch10: %{pkgnamepatch}-ssl-cipher-tests.patch # Patch11: Use PCDIR CMake option, if configured Patch11: %{pkgnamepatch}-pcdir.patch -# Patch12: Fix mysqld_safe --dry-run -Patch12: %{pkgnamepatch}-mysqld_safe.patch # Patch13: Fix Spider code on armv7hl; https://jira.mariadb.org/browse/MDEV-18737 Patch13: %{pkgnamepatch}-spider_on_armv7hl.patch # Patch14: Remove the '-Werror' flag so the debug build won't crash on random warnings @@ -701,7 +699,6 @@ find . -name "*.jar" -type f -exec rm --verbose -f {} \; %patch9 -p1 %patch10 -p1 %patch11 -p1 -%patch12 -p1 %patch13 -p1 %patch14 -p1 @@ -1579,6 +1576,9 @@ fi %endif %changelog +* Wed Nov 06 2019 Michal Schorm - 10.3.19-1 +- Rebase to 10.3.19 + * Thu Oct 31 2019 Carl George - 3:10.3.18-1 - Rebase to 10.3.18 diff --git a/sources b/sources index 0f51d89..4c53ef3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (mariadb-10.3.18.tar.gz) = 817253d18f20c74f9ec8030678fd50a28b1726fd59153023a3a5e9b3f79e1f44d79feb24ae9ed72d8c1c04017110c932aba7be0610fb06245590c7f5610db242 +SHA512 (mariadb-10.3.19.tar.gz) = ab6e57c4b1d0f00c4ba24818e4461473eee9d281c44d46ec202ee21b7d1af0ea51904c0908d72fa2a0a2acd1cb8b4989e657841820c8d7ceb97e192cdc49e2ee From 663c4792c08cb5d8baaac27fed6ccce81dbd1618 Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Mon, 11 Nov 2019 11:52:05 +0100 Subject: [PATCH 35/49] Rebase to 10.3.20 --- mariadb.spec | 7 +++++-- sources | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/mariadb.spec b/mariadb.spec index b801050..f3edeb5 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -11,7 +11,7 @@ # The last version on which the full testsuite has been run # In case of further rebuilds of that version, don't require full testsuite to be run # run only "main" suite -%global last_tested_version 10.3.17 +%global last_tested_version 10.3.19 # Set to 1 to force run the testsuite even if it was already tested in current version %global force_run_testsuite 0 @@ -152,7 +152,7 @@ %global sameevr %{epoch}:%{version}-%{release} Name: mariadb -Version: 10.3.19 +Version: 10.3.20 Release: 1%{?with_debug:.debug}%{?dist} Epoch: 3 @@ -1576,6 +1576,9 @@ fi %endif %changelog +* Mon Nov 11 2019 Michal Schorm - 10.3.20-1 +- Rebase to 10.3.20 + * Wed Nov 06 2019 Michal Schorm - 10.3.19-1 - Rebase to 10.3.19 diff --git a/sources b/sources index 4c53ef3..2947dcd 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (mariadb-10.3.19.tar.gz) = ab6e57c4b1d0f00c4ba24818e4461473eee9d281c44d46ec202ee21b7d1af0ea51904c0908d72fa2a0a2acd1cb8b4989e657841820c8d7ceb97e192cdc49e2ee +SHA512 (mariadb-10.3.20.tar.gz) = 8080cb6db85c587f39f128e98b00c3e6428bf3e828271a227bb2c61c97683c965802baa6e5f825317f7e2963683c0f81699642853deeca6977faa2b6932044a3 From 19d30aa668b95d5ebd8efd13bf48de2acc136709 Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Tue, 12 Nov 2019 15:53:47 +0100 Subject: [PATCH 36/49] Rebuild on top fo new mariadb-connector-c --- mariadb.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mariadb.spec b/mariadb.spec index f3edeb5..4df7bf5 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -153,7 +153,7 @@ Name: mariadb Version: 10.3.20 -Release: 1%{?with_debug:.debug}%{?dist} +Release: 2%{?with_debug:.debug}%{?dist} Epoch: 3 Summary: A very fast and robust SQL database server @@ -1576,6 +1576,9 @@ fi %endif %changelog +* Tue Nov 12 2019 Michal Schorm - 10.3.20-2 +- Rebuild on top fo new mariadb-connector-c + * Mon Nov 11 2019 Michal Schorm - 10.3.20-1 - Rebase to 10.3.20 From 81e52111e81bbae58a369af000db4a17ba9a0cd8 Mon Sep 17 00:00:00 2001 From: Lukas Javorsky Date: Mon, 18 Nov 2019 14:22:53 +0100 Subject: [PATCH 37/49] Fix conflicting files with groonga package bz#1763287 Change path to groonga's packaged files --- mariadb-groonga.patch | 30 ++++++++++++++++++++++++++++++ mariadb.spec | 20 ++++++++++++++------ 2 files changed, 44 insertions(+), 6 deletions(-) create mode 100644 mariadb-groonga.patch diff --git a/mariadb-groonga.patch b/mariadb-groonga.patch new file mode 100644 index 0000000..3a0e74c --- /dev/null +++ b/mariadb-groonga.patch @@ -0,0 +1,30 @@ +# Fixing conflict with groonga package +# https://bugzilla.redhat.com/show_bug.cgi?id=1763287 + +--- mariadb-10.3.18/storage/mroonga/vendor/groonga/CMakeLists.txt.withoutoption 2019-11-11 14:01:07.762595716 +0100 ++++ mariadb-10.3.18/storage/mroonga/vendor/groonga/CMakeLists.txt 2019-11-11 14:33:05.224012458 +0100 +@@ -86,7 +86,9 @@ + set(INCLUDE_DIR "include") + set(GRN_INCLUDE_DIR "include/groonga") + set(DATA_DIR "share") +-set(GRN_DATA_DIR "${DATA_DIR}/${GRN_PROJECT_NAME}") ++if(NOT DEFINED GRN_DATA_DIR) ++ set(GRN_DATA_DIR "${DATA_DIR}/${GRN_PROJECT_NAME}") ++endif() + set(CONFIG_DIR "etc") + set(GRN_CONFIG_DIR "${CONFIG_DIR}/${GRN_PROJECT_NAME}") + set(GRN_CONFIG_PATH "${CMAKE_INSTALL_PREFIX}/${GRN_CONFIG_DIR}/groonga.conf") + +--- mariadb-10.3.18/storage/mroonga/vendor/groonga/vendor/plugins/groonga-normalizer-mysql/CMakeLists.txt.withoutoption 2019-11-11 14:34:22.661005715 +0100 ++++ mariadb-10.3.18/storage/mroonga/vendor/groonga/vendor/plugins/groonga-normalizer-mysql/CMakeLists.txt 2019-11-11 14:35:59.962244120 +0100 +@@ -16,7 +16,9 @@ + # MA 02110-1335 USA + + cmake_minimum_required(VERSION 2.6) +-set(GROONGA_NORMALIZER_MYSQL_PROJECT_NAME "groonga-normalizer-mysql") ++if (NOT DEFINED GROONGA_NORMALIZER_MYSQL_PROJECT_NAME) ++ set(GROONGA_NORMALIZER_MYSQL_PROJECT_NAME "groonga-normalizer-mysql") ++endif() + project("${GROONGA_NORMALIZER_MYSQL_PROJECT_NAME}") + + if(DEFINED GROONGA_NORMALIZER_MYSQL_EMBED) diff --git a/mariadb.spec b/mariadb.spec index 4df7bf5..7a07987 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -153,7 +153,7 @@ Name: mariadb Version: 10.3.20 -Release: 2%{?with_debug:.debug}%{?dist} +Release: 3%{?with_debug:.debug}%{?dist} Epoch: 3 Summary: A very fast and robust SQL database server @@ -203,7 +203,8 @@ Patch11: %{pkgnamepatch}-pcdir.patch Patch13: %{pkgnamepatch}-spider_on_armv7hl.patch # Patch14: Remove the '-Werror' flag so the debug build won't crash on random warnings Patch14: %{pkgnamepatch}-debug_build.patch - +# Patch15: Add option to edit groonga's and groonga-normalizer-mysql install path +Patch15: %{pkgnamepatch}-groonga.patch BuildRequires: cmake gcc-c++ BuildRequires: multilib-rpm-config @@ -701,6 +702,7 @@ find . -name "*.jar" -type f -exec rm --verbose -f {} \; %patch11 -p1 %patch13 -p1 %patch14 -p1 +%patch15 -p1 # workaround for upstream bug #56342 #rm mysql-test/t/ssl_8k_key-master.opt @@ -816,6 +818,8 @@ export CFLAGS CXXFLAGS CPPFLAGS -DMYSQL_DATADIR="%{dbdatadir}" \ -DMYSQL_UNIX_ADDR="/var/lib/mysql/mysql.sock" \ -DTMPDIR=/var/tmp \ + -DGRN_DATA_DIR=share/%{name}-server/groonga \ + -DGROONGA_NORMALIZER_MYSQL_PROJECT_NAME=%{name}-server/groonga-normalizer-mysql \ -DENABLED_LOCAL_INFILE=ON \ -DENABLE_DTRACE=ON \ -DSECURITY_HARDENED=ON \ @@ -1408,10 +1412,10 @@ fi %{_datadir}/%{pkg_name}/mroonga/uninstall.sql %license %{_datadir}/%{pkg_name}/mroonga/COPYING %license %{_datadir}/%{pkg_name}/mroonga/AUTHORS -%license %{_datadir}/groonga-normalizer-mysql/lgpl-2.0.txt -%license %{_datadir}/groonga/COPYING -%doc %{_datadir}/groonga-normalizer-mysql/README.md -%doc %{_datadir}/groonga/README.md +%license %{_datadir}/%{name}-server/groonga-normalizer-mysql/lgpl-2.0.txt +%license %{_datadir}/%{name}-server/groonga/COPYING +%doc %{_datadir}/%{name}-server/groonga-normalizer-mysql/README.md +%doc %{_datadir}/%{name}-server/groonga/README.md %endif %{_datadir}/%{pkg_name}/wsrep.cnf %{_datadir}/%{pkg_name}/wsrep_notify @@ -1576,6 +1580,10 @@ fi %endif %changelog +* Mon Nov 18 2019 Lukas Javorsky - 10.3.20-3 +- Change path of groonga's packaged files +- Fix bz#1763287 + * Tue Nov 12 2019 Michal Schorm - 10.3.20-2 - Rebuild on top fo new mariadb-connector-c From 8bb54775eac1c13501f866aabf4f149e41f2413f Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Tue, 26 Nov 2019 13:56:16 +0100 Subject: [PATCH 38/49] Bump last tested major version number --- mariadb.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mariadb.spec b/mariadb.spec index 7a07987..c540990 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -11,7 +11,7 @@ # The last version on which the full testsuite has been run # In case of further rebuilds of that version, don't require full testsuite to be run # run only "main" suite -%global last_tested_version 10.3.19 +%global last_tested_version 10.3.20 # Set to 1 to force run the testsuite even if it was already tested in current version %global force_run_testsuite 0 From e777213c88b9041eecbf652a8f16d6c07845dedb Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Fri, 10 Jan 2020 01:53:54 +0100 Subject: [PATCH 39/49] Fix building without gssapi plugin --- mariadb.spec | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/mariadb.spec b/mariadb.spec index c540990..b90c188 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -1022,7 +1022,10 @@ unlink %{buildroot}%{_libdir}/libmysqlclient.so unlink %{buildroot}%{_libdir}/libmysqlclient_r.so unlink %{buildroot}%{_libdir}/libmariadb.so # Client plugins -rm %{buildroot}%{_libdir}/%{pkg_name}/plugin/{dialog.so,mysql_clear_password.so,sha256_password.so,auth_gssapi_client.so} +rm %{buildroot}%{_libdir}/%{pkg_name}/plugin/{dialog.so,mysql_clear_password.so,sha256_password.so} +%if %{with gssapi} +rm %{buildroot}%{_libdir}/%{pkg_name}/plugin/auth_gssapi_client.so +%endif %endif %if %{without clibrary} || %{without devel} @@ -1081,10 +1084,6 @@ rm %{buildroot}%{_sysconfdir}/my.cnf rm -r %{buildroot}%{_datadir}/%{pkg_name}/charsets %endif -%if %{without gssapi} -rm -r %{buildroot}/etc/my.cnf.d/auth_gssapi.cnf -%endif - %if %{without errmsg} rm %{buildroot}%{_datadir}/%{pkg_name}/errmsg-utf8.txt rm -r %{buildroot}%{_datadir}/%{pkg_name}/{english,czech,danish,dutch,estonian,\ From 42251457ba8e232fa353b3292a67214153f99581 Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Fri, 10 Jan 2020 04:24:50 +0100 Subject: [PATCH 40/49] Rebase to 10.3.21 --- mariadb.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/mariadb.spec b/mariadb.spec index b90c188..52af2c4 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -152,7 +152,7 @@ %global sameevr %{epoch}:%{version}-%{release} Name: mariadb -Version: 10.3.20 +Version: 10.3.21 Release: 3%{?with_debug:.debug}%{?dist} Epoch: 3 @@ -474,6 +474,9 @@ standard SQL syntax, and results joined onto other tables. Summary: The CONNECT storage engine for MariaDB Requires: %{name}-server%{?_isa} = %{sameevr} +# As per https://jira.mariadb.org/browse/MDEV-21450 +BuildRequires: libxml2-devel + %description connect-engine The CONNECT storage engine enables MariaDB to access external local or remote data (MED). This is done by defining tables based on different data @@ -1579,6 +1582,9 @@ fi %endif %changelog +* Fri Jan 10 2020 Michal Schorm - 10.3.21-1 +- Rebase to 10.3.21 + * Mon Nov 18 2019 Lukas Javorsky - 10.3.20-3 - Change path of groonga's packaged files - Fix bz#1763287 From 5846cae70af70b639c8555c65a8e9839b22c84c2 Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Fri, 10 Jan 2020 04:33:46 +0100 Subject: [PATCH 41/49] Update sources for the 10.3.21 rebase --- sources | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources b/sources index 2947dcd..168b8df 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (mariadb-10.3.20.tar.gz) = 8080cb6db85c587f39f128e98b00c3e6428bf3e828271a227bb2c61c97683c965802baa6e5f825317f7e2963683c0f81699642853deeca6977faa2b6932044a3 +SHA512 (mariadb-10.3.21.tar.gz) = cf9c33405fca64fa5571d26609388d4f3102447c68bd63e54dea9c35da0ad4350fb922fb75baa41e2a71cf75ccb9b2b9e5f2ac6714c44f8f38065dcae3d5afa6 From 5aff5f09e666b1a9d32f006cf6e7e4790404682d Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Fri, 17 Jan 2020 10:09:06 +0100 Subject: [PATCH 42/49] Rebase to 10.4.11 [INCOMPLETE] --- mariadb.spec | 12 ++++++++---- sources | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/mariadb.spec b/mariadb.spec index 52af2c4..1e38f7b 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -11,7 +11,7 @@ # The last version on which the full testsuite has been run # In case of further rebuilds of that version, don't require full testsuite to be run # run only "main" suite -%global last_tested_version 10.3.20 +%global last_tested_version 10.4.11 # Set to 1 to force run the testsuite even if it was already tested in current version %global force_run_testsuite 0 @@ -152,8 +152,8 @@ %global sameevr %{epoch}:%{version}-%{release} Name: mariadb -Version: 10.3.21 -Release: 3%{?with_debug:.debug}%{?dist} +Version: 10.4.11 +Release: 1%{?with_debug:.debug}%{?dist} Epoch: 3 Summary: A very fast and robust SQL database server @@ -371,7 +371,7 @@ MariaDB packages. Summary: The configuration files and scripts for galera replication Requires: %{name}-common%{?_isa} = %{sameevr} Requires: %{name}-server%{?_isa} = %{sameevr} -Requires: galera >= 25.3.3 +Requires: galera >= 26.4.3 Requires(post): libselinux-utils Requires(post): policycoreutils-python-utils # wsrep requirements @@ -1582,6 +1582,10 @@ fi %endif %changelog +* Fri Jan 17 2020 Michal Schorm - 10.4.11-1 +- Rebase to 10.4.11 + Related: #1756468 + * Fri Jan 10 2020 Michal Schorm - 10.3.21-1 - Rebase to 10.3.21 diff --git a/sources b/sources index 168b8df..dfbf8f0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (mariadb-10.3.21.tar.gz) = cf9c33405fca64fa5571d26609388d4f3102447c68bd63e54dea9c35da0ad4350fb922fb75baa41e2a71cf75ccb9b2b9e5f2ac6714c44f8f38065dcae3d5afa6 +SHA512 (mariadb-10.4.11.tar.gz) = 2a1a8d90e326530b41a8a7d6889325cefcba5914451a48c6a20d5d5cd68004835e76e6ecac628554167a014f9c0b1487c15f37151afd771ea0166a4c40afd7d2 From 6139b95eb5ab5df5f5d5abcfb4e1aefe27df62bd Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Fri, 17 Jan 2020 10:47:52 +0100 Subject: [PATCH 43/49] Rebase 10.4.11 - pack 'mariadb' names symlinks --- mariadb.spec | 158 ++++++++++++++++++++++----------------------------- 1 file changed, 69 insertions(+), 89 deletions(-) diff --git a/mariadb.spec b/mariadb.spec index 1e38f7b..1ab0a7a 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -922,7 +922,6 @@ mv %{buildroot}%{_sysconfdir}/my.cnf.d/server.cnf %{buildroot}%{_sysconfdir}/my. mv %{buildroot}%{_sysusersdir}/sysusers.conf %{buildroot}%{_sysusersdir}/%{name}.conf # remove SysV init script and a symlink to that, we use systemd -rm %{buildroot}%{_sysconfdir}/init.d/mysql rm %{buildroot}%{_libexecdir}/rcmysql # install systemd unit files and scripts for handling server startup install -D -p -m 644 scripts/mysql.service %{buildroot}%{_unitdir}/%{daemon_name}.service @@ -957,8 +956,8 @@ ln -s unstable-tests %{buildroot}%{_datadir}/mysql-test/rh-skipped-tests.list # Client that uses libmysqld embedded server. # Pretty much like normal mysql command line client, but it doesn't require a running mariadb server. -%{?with_embedded:rm %{buildroot}%{_bindir}/mysql_embedded} -rm %{buildroot}%{_mandir}/man1/mysql_embedded.1* +%{?with_embedded:rm %{buildroot}%{_bindir}/{mariadb-,mysql_}embedded} +rm %{buildroot}%{_mandir}/man1/{mysql_,mariadb-}embedded.1* # Static libraries rm %{buildroot}%{_libdir}/*.a # This script creates the MySQL system tables and starts the server. @@ -1014,6 +1013,7 @@ sed -i 's/^plugin-load-add/#plugin-load-add/' %{buildroot}%{_sysconfdir}/my.cnf. %if %{without embedded} rm %{buildroot}%{_mandir}/man1/{mysql_client_test_embedded,mysqltest_embedded}.1* +rm %{buildroot}%{_mandir}/man1/{mariadb-client-test-embedded,mariadb-test-embedded}.1* %endif @@ -1058,13 +1058,15 @@ unlink %{buildroot}%{_libdir}/libmysqlclient_r.so %endif %if %{without client} -rm %{buildroot}%{_bindir}/{msql2mysql,mysql,mysql_find_rows,\ -mysql_plugin,mysql_waitpid,mysqlaccess,mysqladmin,mysqlbinlog,mysqlcheck,\ -mysqldump,mysqlimport,mysqlshow,mysqlslap} -rm %{buildroot}%{_mandir}/man1/{msql2mysql,mysql,mysql_find_rows,\ -mysql_plugin,mysql_waitpid,mysqlaccess,mysqladmin,mysqlbinlog,mysqlcheck,\ -mysqldump,mysqlimport,mysqlshow,mysqlslap}.1* -rm %{buildroot}%{_sysconfdir}/my.cnf.d/mysql-clients.cnf +rm %{buildroot}%{_bindir}/msql2mysql +rm %{buildroot}%{_bindir}/{mysql,mariadb} +rm %{buildroot}%{_bindir}/mysql{access,admin,binlog,check,dump,_find_rows,import,_plugin,show,slap,_waitpid} +rm %{buildroot}%{_bindir}/mariadb-{access,admin,binlog,check,dump,find-rows,import,plugin,show,slap,waitpid} + +rm %{buildroot}%{_mandir}/man1/msql2mysql.1* +rm %{buildroot}%{_mandir}/man1/{mysql,mariadb}.1* +rm %{buildroot}%{_mandir}/man1/mysql{access,admin,binlog,check,dump,_find_rows,import,_plugin,show,slap,_waitpid}.1* +rm %{buildroot}%{_mandir}/man1/mariadb-{access,admin,binlog,check,dump,find-rows,import,plugin,show,slap,waitpid}.1* %endif %if %{without tokudb} @@ -1096,12 +1098,16 @@ polish,portuguese,romanian,russian,serbian,slovak,spanish,swedish,ukrainian,hind %if %{without test} %if %{with embedded} -rm %{buildroot}%{_bindir}/{mysqltest_embedded,mysql_client_test_embedded} -rm %{buildroot}%{_mandir}/man1/{mysqltest_embedded,mysql_client_test_embedded}.1* -%endif +rm %{buildroot}%{_bindir}/{mysql_client_test_embedded,mysqltest_embedded} +rm %{buildroot}%{_bindir}/{mariadb-client-test-embedded,mariadb-test-embedded} +rm %{buildroot}%{_mandir}/man1/{mysql_client_test_embedded,mysqltest_embedded}.1* +rm %{buildroot}%{_mandir}/man1/{mariadb-client-test-embedded,mariadb-test-embedded}.1* +%endif # embedded rm %{buildroot}%{_bindir}/test-connect-t rm %{buildroot}%{_bindir}/{mysql_client_test,mysqltest} -rm %{buildroot}%{_mandir}/man1/{mysql_client_test,my_safe_process,mysqltest}.1* +rm %{buildroot}%{_bindir}/{mariadb-client-test,mariadb-test} +rm %{buildroot}%{_mandir}/man1/{mysql_client_test,mysqltest,my_safe_process}.1* +rm %{buildroot}%{_mandir}/man1/{mariadb-client-test,mariadb-test}.1* rm %{buildroot}%{_mandir}/man1/{mysql-test-run,mysql-stress-test}.pl.1* %endif @@ -1121,7 +1127,7 @@ chmod -x %{buildroot}%{_datadir}/sql-bench/myisam.cnf %endif %if %{without rocksdb} -rm %{buildroot}%{_mandir}/man1/mysql_ldb.1* +rm %{buildroot}%{_mandir}/man1/{mysql_,mariadb-}ldb.1* %endif %check @@ -1225,38 +1231,22 @@ fi %if %{with client} %files %{_bindir}/msql2mysql -%{_bindir}/mysql -%{_bindir}/mysql_find_rows -%{_bindir}/mysql_plugin -%{_bindir}/mysql_waitpid -%{_bindir}/mysqlaccess -%{_bindir}/mysqladmin -%{_bindir}/mysqlbinlog -%{_bindir}/mysqlcheck -%{_bindir}/mysqldump -%{_bindir}/mysqlimport -%{_bindir}/mysqlshow -%{_bindir}/mysqlslap +%{_bindir}/{mysql,mariadb} +%{_bindir}/mysql{access,admin,binlog,check,dump,_find_rows,import,_plugin,show,slap,_waitpid} +%{_bindir}/mariadb-{access,admin,binlog,check,dump,find-rows,import,plugin,show,slap,waitpid} %{_mandir}/man1/msql2mysql.1* -%{_mandir}/man1/mysql.1* -%{_mandir}/man1/mysql_find_rows.1* -%{_mandir}/man1/mysql_plugin.1* -%{_mandir}/man1/mysql_waitpid.1* -%{_mandir}/man1/mysqlaccess.1* -%{_mandir}/man1/mysqladmin.1* -%{_mandir}/man1/mysqlbinlog.1* -%{_mandir}/man1/mysqlcheck.1* -%{_mandir}/man1/mysqldump.1* -%{_mandir}/man1/mysqlimport.1* -%{_mandir}/man1/mysqlshow.1* -%{_mandir}/man1/mysqlslap.1* +%{_mandir}/man1/{mysql,mariadb}.1* +%{_mandir}/man1/mysql{access,admin,binlog,check,dump,_find_rows,import,_plugin,show,slap,_waitpid}.1* +%{_mandir}/man1/mariadb-{access,admin,binlog,check,dump,find-rows,import,plugin,show,slap,waitpid}.1* + %config(noreplace) %{_sysconfdir}/my.cnf.d/mysql-clients.cnf %endif %if %{with clibrary} %files libs -%{_libdir}/libmariadb.so.* +%exclude %{_libdir}/{libmysqlclient.so.18,libmariadb.so,libmysqlclient.so,libmysqlclient_r.so} +%{_libdir}/libmariadb.so* %config(noreplace) %{_sysconfdir}/my.cnf.d/client.cnf %endif @@ -1324,22 +1314,18 @@ fi %files server %doc README.mysql-cnf -%{_bindir}/aria_chk -%{_bindir}/aria_dump_log -%{_bindir}/aria_ftdump -%{_bindir}/aria_pack -%{_bindir}/aria_read_log +%{_bindir}/aria_{chk,dump_log,ftdump,pack,read_log} %{_bindir}/mariadb-service-convert %{_bindir}/myisamchk %{_bindir}/myisam_ftdump %{_bindir}/myisamlog %{_bindir}/myisampack %{_bindir}/my_print_defaults -%{_bindir}/mysql_install_db -%{_bindir}/mysql_secure_installation -%{_bindir}/mysql_tzinfo_to_sql -%{_bindir}/mysqld_safe -%{_bindir}/mysqld_safe_helper + +%{_bindir}/mysql_{install_db,secure_installation,tzinfo_to_sql} +%{_bindir}/mariadb-{install-db,secure-installation,tzinfo-to-sql} +%{_bindir}/{mysqld_,mariadbd-}safe + %{_bindir}/innochecksum %{_bindir}/replace %{_bindir}/resolve_stack_dump @@ -1350,7 +1336,7 @@ fi %config(noreplace) %{_sysconfdir}/my.cnf.d/%{pkg_name}-server.cnf %config(noreplace) %{_sysconfdir}/my.cnf.d/enable_encryption.preset -%{_libexecdir}/mysqld +%{_libexecdir}/{mysqld,mariadbd} %{_libdir}/%{pkg_name}/INFO_SRC %{_libdir}/%{pkg_name}/INFO_BIN @@ -1373,11 +1359,7 @@ fi %exclude %{_libdir}/%{pkg_name}/plugin/mysql_clear_password.so %endif -%{_mandir}/man1/aria_chk.1* -%{_mandir}/man1/aria_dump_log.1* -%{_mandir}/man1/aria_ftdump.1* -%{_mandir}/man1/aria_pack.1* -%{_mandir}/man1/aria_read_log.1* +%{_mandir}/man1/aria_{chk,dump_log,ftdump,pack,read_log}.1* %{_mandir}/man1/galera_new_cluster.1* %{_mandir}/man1/galera_recovery.1* %{_mandir}/man1/mariadb-service-convert.1* @@ -1386,19 +1368,20 @@ fi %{_mandir}/man1/myisampack.1* %{_mandir}/man1/myisam_ftdump.1* %{_mandir}/man1/my_print_defaults.1* -%{_mandir}/man1/mysql.server.1* -%{_mandir}/man1/mysql_install_db.1* -%{_mandir}/man1/mysql_secure_installation.1* -%{_mandir}/man1/mysql_tzinfo_to_sql.1* -%{_mandir}/man1/mysqld_safe.1* -%{_mandir}/man1/mysqld_safe_helper.1* + +%{_mandir}/man1/mysql_{install_db,secure_installation,tzinfo_to_sql}.1* +%{_mandir}/man1/mariadb-{install-db,secure-installation,tzinfo-to-sql}.1* +%{_mandir}/man1/{mysqld_,mariadbd-}safe.1* + %{_mandir}/man1/innochecksum.1* %{_mandir}/man1/replace.1* %{_mandir}/man1/resolveip.1* %{_mandir}/man1/resolve_stack_dump.1* -%{_mandir}/man8/mysqld.8* +%{_mandir}/man8/{mysqld,mariadbd}.8* %{_mandir}/man1/wsrep_*.1* +%{_mandir}/man1/mysql.server.1* + %{_datadir}/%{pkg_name}/fill_help_tables.sql %{_datadir}/%{pkg_name}/install_spider.sql %{_datadir}/%{pkg_name}/maria_add_gis_sp.sql @@ -1459,9 +1442,9 @@ fi %if %{with backup} %files backup -%{_bindir}/mariabackup +%{_bindir}/maria{,db-}backup %{_bindir}/mbstream -%{_mandir}/man1/mariabackup.1* +%{_mandir}/man1/maria{,db-}backup.1* %{_mandir}/man1/mbstream.1* %endif @@ -1469,10 +1452,10 @@ fi %files rocksdb-engine %config(noreplace) %{_sysconfdir}/my.cnf.d/rocksdb.cnf %{_bindir}/myrocks_hotbackup -%{_bindir}/mysql_ldb +%{_bindir}/{mysql_,mariadb-}ldb %{_bindir}/sst_dump %{_libdir}/%{pkg_name}/plugin/ha_rocksdb.so -%{_mandir}/man1/mysql_ldb.1* +%{_mandir}/man1/{mysql_,mariadb-}ldb.1* %endif %if %{with tokudb} @@ -1511,29 +1494,27 @@ fi %files server-utils # Perl utilities -%{_bindir}/mysql_convert_table_format -%{_bindir}/mysql_fix_extensions -%{_bindir}/mysql_setpermission -%{_bindir}/mysqldumpslow -%{_bindir}/mysqld_multi -%{_bindir}/mysqlhotcopy -%{_mandir}/man1/mysql_convert_table_format.1* -%{_mandir}/man1/mysql_fix_extensions.1* -%{_mandir}/man1/mysqldumpslow.1* -%{_mandir}/man1/mysqld_multi.1* -%{_mandir}/man1/mysqlhotcopy.1* -%{_mandir}/man1/mysql_setpermission.1* +%{_bindir}/mysql{_convert_table_format,dumpslow,_fix_extensions,hotcopy,_setpermission} +%{_bindir}/mariadb-{convert-table-format,dumpslow,fix-extensions,hotcopy,setpermission} +%{_bindir}/{mysqld_,mariadbd-}multi + +%{_mandir}/man1/mysql{_convert_table_format,dumpslow,_fix_extensions,hotcopy,_setpermission}.1* +%{_mandir}/man1/mariadb-{convert-table-format,dumpslow,fix-extensions,hotcopy,setpermission}.1* +%{_mandir}/man1/{mysqld_,mariadbd-}multi.1* # Utilities that can be used remotely -%{_bindir}/mysql_upgrade +%{_bindir}/{mysql_,mariadb-}upgrade %{_bindir}/perror -%{_mandir}/man1/mysql_upgrade.1* +%{_mandir}/man1/{mysql_,mariadb-}upgrade.1* %{_mandir}/man1/perror.1* +# Other utilities +%{_bindir}/{mysqld_safe_helper,mariadbd-safe-helper} +%{_mandir}/man1/{mysqld_safe_helper,mariadbd-safe-helper}.1* %if %{with devel} %files devel %{_includedir}/* %{_datadir}/aclocal/mysql.m4 -%{_libdir}/pkgconfig/mariadb.pc +%{_libdir}/pkgconfig/*mariadb.pc %if %{with clibrary} %{_libdir}/{libmysqlclient.so.18,libmariadb.so,libmysqlclient.so,libmysqlclient_r.so} %{_bindir}/mysql_config* @@ -1565,18 +1546,17 @@ fi %files test %if %{with embedded} %{_bindir}/test-connect-t -%{_bindir}/mysql_client_test_embedded -%{_bindir}/mysqltest_embedded -%{_mandir}/man1/mysql_client_test_embedded.1* -%{_mandir}/man1/mysqltest_embedded.1* +%{_bindir}/{mysql_client_test_embedded,mysqltest_embedded} +%{_bindir}/{mariadb-client-test-embedded,mariadb-test-embedded} +%{_mandir}/man1/{mysql_client_test_embedded,mysqltest_embedded}.1* +%{_mandir}/man1/{mariadb-client-test-embedded,mariadb-test-embedded}.1* %endif -%{_bindir}/mysql_client_test +%{_bindir}/{mysql_client_test,mysqltest,mariadb-client-test,mariadb-test} %{_bindir}/my_safe_process -%{_bindir}/mysqltest %attr(-,mysql,mysql) %{_datadir}/mysql-test %{_mandir}/man1/mysql_client_test.1* +%{_mandir}/man1/{mysql_client_test,mysqltest,mariadb-client-test,mariadb-test}.1* %{_mandir}/man1/my_safe_process.1* -%{_mandir}/man1/mysqltest.1* %{_mandir}/man1/mysql-stress-test.pl.1* %{_mandir}/man1/mysql-test-run.pl.1* %endif From ba578ea6c3fb7ae8bb4dcaa06329cf116aa286a2 Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Fri, 17 Jan 2020 10:11:46 +0100 Subject: [PATCH 44/49] Rebase to 10.4.11 - remove the 'bench' subpackage --- mariadb.spec | 42 ++++-------------------------------------- 1 file changed, 4 insertions(+), 38 deletions(-) diff --git a/mariadb.spec b/mariadb.spec index 1ab0a7a..e94cccf 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -80,12 +80,6 @@ %bcond_without test %bcond_without galera %bcond_without backup -# Upstream no longer maintain and pack the bench subpackage -%if 0%{?fedora} -%bcond_without bench -%else -%bcond_with bench -%endif # When there is already another package that ships /etc/my.cnf, # rather include it than ship the file again, since conflicts between @@ -445,6 +439,9 @@ Provides: mysql-compat-server%{?_isa} = %{sameevr} %endif %{?with_conflicts:Conflicts: community-mysql-server} +# Bench subpackage has been deprecated in F32 +Obsoletes: %{name}-bench <= %{sameevr} + %description server MariaDB is a multi-user, multi-threaded SQL database server. It is a client/server implementation consisting of a server daemon (mysqld) @@ -642,24 +639,6 @@ the embedded version of the MariaDB server. %endif -%if %{with bench} -%package bench -Summary: MariaDB benchmark scripts and data -Requires: %{name}%{?_isa} = %{sameevr} -%if %{with mysql_names} -Provides: mysql-bench = %{sameevr} -Provides: mysql-bench%{?_isa} = %{sameevr} -%endif -%{?with_conflicts:Conflicts: community-mysql-bench} - -%description bench -MariaDB is a multi-user, multi-threaded SQL database server. -MariaDB is a community developed branch of MySQL. -This package contains benchmark scripts and data for use when benchmarking -MariaDB. -%endif - - %if %{with test} %package test Summary: The test suite distributed with MariaDB @@ -815,7 +794,6 @@ export CFLAGS CXXFLAGS CPPFLAGS -DINSTALL_PLUGINDIR="%{_lib}/%{pkg_name}/plugin" \ -DINSTALL_SBINDIR=libexec \ -DINSTALL_SCRIPTDIR=bin \ - -DINSTALL_SQLBENCHDIR=share \ -DINSTALL_SUPPORTFILESDIR=share/%{pkg_name} \ -DINSTALL_PCDIR=%{_lib}/pkgconfig \ -DMYSQL_DATADIR="%{dbdatadir}" \ @@ -1119,13 +1097,6 @@ rm %{buildroot}%{_bindir}/galera_recovery rm %{buildroot}%{_datadir}/%{pkg_name}/systemd/use_galera_new_cluster.conf %endif -%if %{without bench} -rm -r %{buildroot}%{_datadir}/sql-bench -%else -# script without shebang: https://jira.mariadb.org/browse/MDEV-14266 -chmod -x %{buildroot}%{_datadir}/sql-bench/myisam.cnf -%endif - %if %{without rocksdb} rm %{buildroot}%{_mandir}/man1/{mysql_,mariadb-}ldb.1* %endif @@ -1536,12 +1507,6 @@ fi %{_libdir}/libmariadbd.so %endif -%if %{with bench} -%files bench -%{_datadir}/sql-bench -%doc %{_datadir}/sql-bench/README -%endif - %if %{with test} %files test %if %{with embedded} @@ -1565,6 +1530,7 @@ fi * Fri Jan 17 2020 Michal Schorm - 10.4.11-1 - Rebase to 10.4.11 Related: #1756468 +- Remove 'bench' subpackage. Upstream no longer maintains it. * Fri Jan 10 2020 Michal Schorm - 10.3.21-1 - Rebase to 10.3.21 From b1bc71c1ac1bde3b48c760775af7c1cd08829c73 Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Fri, 17 Jan 2020 10:29:09 +0100 Subject: [PATCH 45/49] Rebase to 10.4.11 - minor tweaks * Use Valgrind for debug builds * Remove ancient obsoletions * Tweak build flags * Add patch for auth_pam_tool directory --- mariadb-auth_pam_tool_dir.patch | 29 +++++++++++++++++++++ mariadb.spec | 45 +++++++++++++++++++++++++-------- 2 files changed, 64 insertions(+), 10 deletions(-) create mode 100644 mariadb-auth_pam_tool_dir.patch diff --git a/mariadb-auth_pam_tool_dir.patch b/mariadb-auth_pam_tool_dir.patch new file mode 100644 index 0000000..2122190 --- /dev/null +++ b/mariadb-auth_pam_tool_dir.patch @@ -0,0 +1,29 @@ +This scirpt is ran by the systemd service. +In Fedora the service has priviledges dropped to the mysql user. +Thus "chown 0" will always fail + +Never parse 'ls' output! +http://mywiki.wooledge.org/BashFAQ/087 + +--- mariadb-10.4.7/scripts/mysql_install_db.sh 2019-07-30 13:32:16.000000000 +0200 ++++ mariadb-10.4.7/scripts/mysql_install_db.sh_patched 2019-08-22 16:29:28.341484925 +0200 +@@ -490,13 +490,16 @@ then + fi + if test -z "$srcdir" + then +- chown 0 "$pamtooldir/auth_pam_tool_dir/auth_pam_tool" && \ +- chmod 04755 "$pamtooldir/auth_pam_tool_dir/auth_pam_tool" +- if test $? -ne 0 ++ if [ `stat "$pamtooldir/auth_pam_tool_dir/auth_pam_tool" -c %u` -ne 0 ] + then ++ chown 0 "$pamtooldir/auth_pam_tool_dir/auth_pam_tool" && \ ++ chmod 04755 "$pamtooldir/auth_pam_tool_dir/auth_pam_tool" ++ if test $? -ne 0 ++ then + echo "Couldn't set an owner to '$pamtooldir/auth_pam_tool_dir/auth_pam_tool'." + echo " It must be root, the PAM authentication plugin doesn't work otherwise.." + echo ++ fi + fi + fi + args="$args --user=$user" diff --git a/mariadb.spec b/mariadb.spec index e94cccf..4d48d98 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -197,8 +197,10 @@ Patch11: %{pkgnamepatch}-pcdir.patch Patch13: %{pkgnamepatch}-spider_on_armv7hl.patch # Patch14: Remove the '-Werror' flag so the debug build won't crash on random warnings Patch14: %{pkgnamepatch}-debug_build.patch -# Patch15: Add option to edit groonga's and groonga-normalizer-mysql install path +# Patch15: Add option to edit groonga's and groonga-normalizer-mysql install path Patch15: %{pkgnamepatch}-groonga.patch +# Patch16: Workaround for "chown 0" with priviledges dropped to "mysql" user +Patch16: %{pkgnamepatch}-auth_pam_tool_dir.patch BuildRequires: cmake gcc-c++ BuildRequires: multilib-rpm-config @@ -253,6 +255,10 @@ BuildRequires: perl(Symbol) # for running some openssl tests rhbz#1189180 BuildRequires: openssl openssl-devel +%if %{with debug} +BuildRequires: valgrind-devel +%endif + Requires: bash coreutils grep Requires: %{name}-common%{?_isa} = %{sameevr} @@ -335,8 +341,6 @@ package itself. Summary: The shared files required by server and client Requires: %{_sysconfdir}/my.cnf -# obsoletion of mariadb-galera-common -Provides: mariadb-galera-common = %{sameevr} %if %{without clibrary} Obsoletes: %{name}-libs <= %{sameevr} @@ -373,9 +377,6 @@ Requires: lsof # Default wsrep_sst_method Requires: rsync -# obsoletion of mariadb-galera-server -Provides: mariadb-galera-server = %{sameevr} - %description server-galera MariaDB is a multi-user, multi-threaded SQL database server. It is a client/server implementation consisting of a server daemon (mysqld) @@ -685,6 +686,7 @@ find . -name "*.jar" -type f -exec rm --verbose -f {} \; %patch13 -p1 %patch14 -p1 %patch15 -p1 +%patch16 -p1 # workaround for upstream bug #56342 #rm mysql-test/t/ssl_8k_key-master.opt @@ -759,9 +761,17 @@ rm -r storage/tokudb/mysql-test/tokudb/t/*.py %endif CFLAGS="$CFLAGS -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE" +# force PIC mode so that we can build libmysqld.so +CFLAGS="$CFLAGS -fPIC" +%if %{with debug} # Override all optimization flags when making a debug build -%{?with_debug: CFLAGS="$CFLAGS -O0 -g"} +CFLAGS="$CFLAGS -O0 -g" +CPPFLAGS="$CPPFLAGS -O0 -g -D_FORTIFY_SOURCE=0" +# Fix GCC flags broken by MariaDB upstream +CFLAGS="$CFLAGS -Wno-error=deprecated-copy -Wno-error=pessimizing-move -Wno-error=unused-result -Wno-error=maybe-uninitialized -Wno-error=stringop-overflow -Wno-error=sign-compare" +CPPFLAGS="$CPPFLAGS -Wno-error=deprecated-copy -Wno-error=pessimizing-move -Wno-error=unused-result -Wno-error=maybe-uninitialized -Wno-error=stringop-overflow -Wno-error=sign-compare" +%endif CXXFLAGS="$CFLAGS" CPPFLAGS="$CFLAGS" @@ -969,8 +979,10 @@ install -p -m 0644 %{SOURCE16} %{basename:%{SOURCE16}} install -p -m 0644 %{SOURCE71} %{basename:%{SOURCE71}} # install galera config file +%if %{with galera} sed -i -r 's|^wsrep_provider=none|wsrep_provider=%{_libdir}/galera/libgalera_smm.so|' support-files/wsrep.cnf install -p -m 0644 support-files/wsrep.cnf %{buildroot}%{_sysconfdir}/my.cnf.d/galera.cnf +%endif # install the clustercheck script mkdir -p %{buildroot}%{_sysconfdir}/sysconfig touch %{buildroot}%{_sysconfdir}/sysconfig/clustercheck @@ -1173,11 +1185,16 @@ export MTR_BUILD_THREAD=%{__isa_bits} %if %{with galera} %post server-galera -# Do what README at support-files/policy/selinux/README and upstream page -# http://galeracluster.com/documentation-webpages/firewallsettings.html recommend: -semanage port -a -t mysqld_port_t -p tcp 4568 >/dev/null 2>&1 || : +# Allow ports needed for the replication: +# https://mariadb.com/kb/en/library/configuring-mariadb-galera-cluster/#network-ports +# Galera Replication Port semanage port -a -t mysqld_port_t -p tcp 4567 >/dev/null 2>&1 || : semanage port -a -t mysqld_port_t -p udp 4567 >/dev/null 2>&1 || : +# IST Port +semanage port -a -t mysqld_port_t -p tcp 4568 >/dev/null 2>&1 || : +# SST Port +semanage port -a -t mysqld_port_t -p tcp 4444 >/dev/null 2>&1 || : + semodule -i %{_datadir}/selinux/packages/%{name}/%{name}-server-galera.pp >/dev/null 2>&1 || : %endif @@ -1317,6 +1334,8 @@ fi %dir %{_libdir}/%{pkg_name} %dir %{_libdir}/%{pkg_name}/plugin +# Change from root:root to mysql:mysql, so it can be accessed by the server +%attr(0755,mysql,mysql) %dir %{_libdir}/%{pkg_name}/plugin/auth_pam_tool_dir %{_libdir}/%{pkg_name}/plugin/* %{?with_oqgraph:%exclude %{_libdir}/%{pkg_name}/plugin/ha_oqgraph.so} %{?with_connect:%exclude %{_libdir}/%{pkg_name}/plugin/ha_connect.so} @@ -1373,7 +1392,9 @@ fi %doc %{_datadir}/%{name}-server/groonga-normalizer-mysql/README.md %doc %{_datadir}/%{name}-server/groonga/README.md %endif +%if %{with galera} %{_datadir}/%{pkg_name}/wsrep.cnf +%endif %{_datadir}/%{pkg_name}/wsrep_notify %dir %{_datadir}/%{pkg_name}/policy %dir %{_datadir}/%{pkg_name}/policy/selinux @@ -1531,6 +1552,10 @@ fi - Rebase to 10.4.11 Related: #1756468 - Remove 'bench' subpackage. Upstream no longer maintains it. +- Use Valgrind for debug builds +- Remove ancient obsoletions +- Tweak build flags +- Add patch for auth_pam_tool directory * Fri Jan 10 2020 Michal Schorm - 10.3.21-1 - Rebase to 10.3.21 From eb74a37ccc9b7b2c0d1cf60fc367240419fda1ac Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Fri, 17 Jan 2020 18:54:53 +0100 Subject: [PATCH 46/49] Rebase to 10.4.11 - Fix Galera Replication config file The replication requires cluster address upon startup (which is end-user specific) Disable it entirely, rather than have it failing out-of-the-box --- mariadb.spec | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/mariadb.spec b/mariadb.spec index 4d48d98..d7a3608 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -1001,6 +1001,13 @@ sed -i 's/^plugin-load-add/#plugin-load-add/' %{buildroot}%{_sysconfdir}/my.cnf. sed -i 's/^plugin-load-add/#plugin-load-add/' %{buildroot}%{_sysconfdir}/my.cnf.d/cracklib_password_check.cnf %endif +# Fix Galera Replication config file +# The replication requires cluster address upon startup (which is end-user specific). +# Disable it entirely, rather than have it failing out-of-the-box. +%if %{with galera} +sed -i 's/^wsrep_on=1/wsrep_on=0/' %{buildroot}%{_sysconfdir}/my.cnf.d/galera.cnf +%endif + %if %{without embedded} rm %{buildroot}%{_mandir}/man1/{mysql_client_test_embedded,mysqltest_embedded}.1* rm %{buildroot}%{_mandir}/man1/{mariadb-client-test-embedded,mariadb-test-embedded}.1* From 43a1c998f2397e94b91731478a235d0e6ebf6f90 Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Sat, 18 Jan 2020 15:11:13 +0100 Subject: [PATCH 47/49] Rebase to 10.4.11 - Update lists of failing tests --- rh-skipped-tests-arm.list | 24 ------------------------ rh-skipped-tests-base.list | 32 +++++++++++++++----------------- rh-skipped-tests-ppc.list | 2 -- rh-skipped-tests-s390.list | 6 ++---- 4 files changed, 17 insertions(+), 47 deletions(-) diff --git a/rh-skipped-tests-arm.list b/rh-skipped-tests-arm.list index e235e76..ec37d1b 100644 --- a/rh-skipped-tests-arm.list +++ b/rh-skipped-tests-arm.list @@ -1,26 +1,2 @@ -# Fails since 10.3.8, only on armv7hl -versioning.auto_increment : -versioning.commit_id : -versioning.delete : -versioning.foreign : -versioning.insert : -versioning.insert2 : -versioning.select2 : -versioning.update : -# Fails since 10.3.9, only on armv7hl -versioning.alter : -versioning.replace : -versioning.select : -versioning.truncate : -versioning.trx_id : # Fails since 10.3.17, only on armv7hl -versioning.online : versioning.partition : -versioning.replace : - - -# Fails since 10.3.9, only on armv7hl -federated.federatedx_versioning : - -# Fails from 10.3.17 only on armv7hl -mariabackup.system_versioning : \ No newline at end of file diff --git a/rh-skipped-tests-base.list b/rh-skipped-tests-base.list index eb84580..2b101f5 100644 --- a/rh-skipped-tests-base.list +++ b/rh-skipped-tests-base.list @@ -4,10 +4,6 @@ main.ssl_7937 : #1399847 main.ssl_8k_key : main.ssl_crl : #1399847 -perfschema.nesting : #1399847 -perfschema.socket_summary_by_instance_func : #1399847 -perfschema.socket_summary_by_event_name_func : - # ------------------------------ # Tests that fails because of 'Self Signed Certificate in the Certificate Chain' perfschema.cnf_option : @@ -18,6 +14,16 @@ rpl.rpl_row_img_eng_noblob : sys_vars.slave_parallel_threads_basic : +# ------------------------------ +# Expected to fail, the plugin is not build with server, but 'mariadb-connector-c' instead +plugins.auth_ed25519 : +plugins.multiauth : + +# ------------------------------ +perfschema.nesting : #1399847 +perfschema.socket_summary_by_instance_func : #1399847 +perfschema.socket_summary_by_event_name_func : + # ------------------------------ # Fails since 10.1.12 innodb.innodb_defrag_binlog : @@ -25,17 +31,9 @@ innodb.innodb_defrag_binlog : # Fails everywhere since 10.2.15 main.userstat : -# Fails on x86_64 since 10.2.15 -rocksdb.bulk_load : -rocksdb.bulk_load_rev_cf : -rocksdb.bulk_load_rev_cf_and_data : -rocksdb.bulk_load_rev_data : +# Fails everywhere since 10.4.11 +main.events_bugs : +sys_vars.tcp_nodelay : -# Fails everywhere from 10.3.16 -main.mysql : - -# Fails everywhere from 10.3.17 -versioning.update-big : - -# Expected to fail, the plugin is not build with server, but 'mariadb-connector-c' instead -plugins.auth_ed25519 : \ No newline at end of file +# Fails on i686 +encryption.innodb-redo-badkey : diff --git a/rh-skipped-tests-ppc.list b/rh-skipped-tests-ppc.list index 53e80b8..e69de29 100644 --- a/rh-skipped-tests-ppc.list +++ b/rh-skipped-tests-ppc.list @@ -1,2 +0,0 @@ -# Fails from 10.3.17 -innodb.innodb_buffer_pool_resize : diff --git a/rh-skipped-tests-s390.list b/rh-skipped-tests-s390.list index 2d82f8a..a7573da 100644 --- a/rh-skipped-tests-s390.list +++ b/rh-skipped-tests-s390.list @@ -1,6 +1,4 @@ # Fails since 10.2.15 disks.disks : -# Fails since 10.3.17 -disks.disks_notemysql-test-run : -innodb.innodb_defrag_binlog : -innodb.trx_id_future : \ No newline at end of file +# Fails since 10.4.11 +disks.disks_notembedded : From ced66e28de5e6a3af2d332ad3fe899dee40e5704 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 29 Jan 2020 12:03:48 +0000 Subject: [PATCH 48/49] - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- mariadb.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mariadb.spec b/mariadb.spec index d7a3608..1d40258 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -147,7 +147,7 @@ Name: mariadb Version: 10.4.11 -Release: 1%{?with_debug:.debug}%{?dist} +Release: 2%{?with_debug:.debug}%{?dist} Epoch: 3 Summary: A very fast and robust SQL database server @@ -1555,6 +1555,9 @@ fi %endif %changelog +* Wed Jan 29 2020 Fedora Release Engineering - 3:10.4.11-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + * Fri Jan 17 2020 Michal Schorm - 10.4.11-1 - Rebase to 10.4.11 Related: #1756468 From 55406c8293f2a1d7e0e9a59ce754e8870a5f7bcd Mon Sep 17 00:00:00 2001 From: Michal Schorm Date: Fri, 7 Feb 2020 14:34:26 +0100 Subject: [PATCH 49/49] Rebase to 10.4.12 --- mariadb-auth_pam_tool_dir.patch | 16 ++++++++-------- mariadb.spec | 11 +++++++++-- rh-skipped-tests-ppc.list | 2 ++ sources | 2 +- 4 files changed, 20 insertions(+), 11 deletions(-) diff --git a/mariadb-auth_pam_tool_dir.patch b/mariadb-auth_pam_tool_dir.patch index 2122190..6334812 100644 --- a/mariadb-auth_pam_tool_dir.patch +++ b/mariadb-auth_pam_tool_dir.patch @@ -5,11 +5,11 @@ Thus "chown 0" will always fail Never parse 'ls' output! http://mywiki.wooledge.org/BashFAQ/087 ---- mariadb-10.4.7/scripts/mysql_install_db.sh 2019-07-30 13:32:16.000000000 +0200 -+++ mariadb-10.4.7/scripts/mysql_install_db.sh_patched 2019-08-22 16:29:28.341484925 +0200 -@@ -490,13 +490,16 @@ then - fi - if test -z "$srcdir" +--- mariadb-10.4.12/scripts/mysql_install_db.sh 2020-01-26 21:43:53.000000000 +0100 ++++ mariadb-10.4.12/scripts/mysql_install_db.sh_patched 2020-01-29 11:11:09.448812331 +0100 +@@ -482,13 +482,16 @@ if test -n "$user" + then + if test -z "$srcdir" -a "$in_rpm" -eq 0 then - chown 0 "$pamtooldir/auth_pam_tool_dir/auth_pam_tool" && \ - chmod 04755 "$pamtooldir/auth_pam_tool_dir/auth_pam_tool" @@ -21,9 +21,9 @@ http://mywiki.wooledge.org/BashFAQ/087 + if test $? -ne 0 + then echo "Couldn't set an owner to '$pamtooldir/auth_pam_tool_dir/auth_pam_tool'." - echo " It must be root, the PAM authentication plugin doesn't work otherwise.." + echo "It must be root, the PAM authentication plugin doesn't work otherwise.." echo + fi fi - fi - args="$args --user=$user" + chown $user "$pamtooldir/auth_pam_tool_dir" && \ + chmod 0700 "$pamtooldir/auth_pam_tool_dir" diff --git a/mariadb.spec b/mariadb.spec index 1d40258..ca6c53f 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -146,8 +146,8 @@ %global sameevr %{epoch}:%{version}-%{release} Name: mariadb -Version: 10.4.11 -Release: 2%{?with_debug:.debug}%{?dist} +Version: 10.4.12 +Release: 1%{?with_debug:.debug}%{?dist} Epoch: 3 Summary: A very fast and robust SQL database server @@ -993,6 +993,8 @@ rm %{buildroot}%{logrotateddir}/mysql # Remove AppArmor files rm -r %{buildroot}%{_datadir}/%{pkg_name}/policy/apparmor +mv %{buildroot}/lib/security %{buildroot}%{_libdir} + # Disable plugins %if %{with gssapi} sed -i 's/^plugin-load-add/#plugin-load-add/' %{buildroot}%{_sysconfdir}/my.cnf.d/auth_gssapi.cnf @@ -1343,6 +1345,8 @@ fi %dir %{_libdir}/%{pkg_name}/plugin # Change from root:root to mysql:mysql, so it can be accessed by the server %attr(0755,mysql,mysql) %dir %{_libdir}/%{pkg_name}/plugin/auth_pam_tool_dir +%{_libdir}/security/pam_user_map.so +%{_sysconfdir}/security/user_map.conf %{_libdir}/%{pkg_name}/plugin/* %{?with_oqgraph:%exclude %{_libdir}/%{pkg_name}/plugin/ha_oqgraph.so} %{?with_connect:%exclude %{_libdir}/%{pkg_name}/plugin/ha_connect.so} @@ -1555,6 +1559,9 @@ fi %endif %changelog +* Thu Feb 06 2020 Michal Schorm - 10.4.12-1 +- Rebase to 10.4.12 + * Wed Jan 29 2020 Fedora Release Engineering - 3:10.4.11-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild diff --git a/rh-skipped-tests-ppc.list b/rh-skipped-tests-ppc.list index e69de29..ceff217 100644 --- a/rh-skipped-tests-ppc.list +++ b/rh-skipped-tests-ppc.list @@ -0,0 +1,2 @@ +# Fails on ppc64le since 10.4.12 +oqgraph.social : diff --git a/sources b/sources index dfbf8f0..e1aa5e9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (mariadb-10.4.11.tar.gz) = 2a1a8d90e326530b41a8a7d6889325cefcba5914451a48c6a20d5d5cd68004835e76e6ecac628554167a014f9c0b1487c15f37151afd771ea0166a4c40afd7d2 +SHA512 (mariadb-10.4.12.tar.gz) = 518dae18c04a1f7fcc6fd4d2dfbfbfbdf5e83e72ca41e66e1074328df8d92ab41b458e6a9973771419ac09a7348f264f158916cd198c335085d6e823e707bbc6