diff --git a/disable-moutline-atomics-for-aarch64.patch b/disable-moutline-atomics-for-aarch64.patch new file mode 100644 index 0000000000000000000000000000000000000000..c7a8eba5b42d7bf9b10a6dfe5845f75b3c150863 --- /dev/null +++ b/disable-moutline-atomics-for-aarch64.patch @@ -0,0 +1,37 @@ +From 3603a7c5191c98e86e3b769c5877d17fd18bf39b Mon Sep 17 00:00:00 2001 +From: maminjie +Date: Fri, 26 Feb 2021 14:58:05 +0800 +Subject: [PATCH] disable moutline-atomics for aarch64 + +--- + CMakeLists.txt | 13 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index df69eb90..94557fc9 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -938,13 +938,13 @@ ENDIF() + # The -moutline-atomics switch enables run-time detection of LSE support. + # There are compilers (gcc 9.3.1 for example) which support this switch, but + # do not enable it by default, even though it seems to help. So, we force it. +-IF(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64") +- MY_CHECK_CXX_COMPILER_FLAG( "-moutline-atomics" HAVE_OUTLINE_ATOMICS) +- IF(HAVE_OUTLINE_ATOMICS) +- STRING_APPEND(CMAKE_C_FLAGS " -moutline-atomics") +- STRING_APPEND(CMAKE_CXX_FLAGS " -moutline-atomics") +- ENDIF() +-ENDIF() ++#IF(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64") ++# MY_CHECK_CXX_COMPILER_FLAG( "-moutline-atomics" HAVE_OUTLINE_ATOMICS) ++# IF(HAVE_OUTLINE_ATOMICS) ++# STRING_APPEND(CMAKE_C_FLAGS " -moutline-atomics") ++# STRING_APPEND(CMAKE_CXX_FLAGS " -moutline-atomics") ++# ENDIF() ++#ENDIF() + + IF(LINUX) + OPTION(LINK_RANDOMIZE "Randomize the order of all symbols in the binary" OFF) +-- +2.23.0 + diff --git a/mysql-boost-8.0.23.tar.gz b/mysql-boost-8.0.23.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..5fa3d863eca346978eafa9a022db78c14ca8a324 Binary files /dev/null and b/mysql-boost-8.0.23.tar.gz differ diff --git a/mysql-boost-8.0.22.tar.gz b/mysql-boost-8.0.23.tar.gz.aa similarity index 34% rename from mysql-boost-8.0.22.tar.gz rename to mysql-boost-8.0.23.tar.gz.aa index 6c3ca81d65cc5ac4e5c85102adfc20e02432dba9..8040faf962ac7b31dd1f5034cd3a73c3e5699525 100644 Binary files a/mysql-boost-8.0.22.tar.gz and b/mysql-boost-8.0.23.tar.gz.aa differ diff --git a/mysql-boost-8.0.23.tar.gz.ab b/mysql-boost-8.0.23.tar.gz.ab new file mode 100644 index 0000000000000000000000000000000000000000..0fed939d92757b0cebaed7501e749ac4365b7833 Binary files /dev/null and b/mysql-boost-8.0.23.tar.gz.ab differ diff --git a/mysql-boost-8.0.23.tar.gz.ac b/mysql-boost-8.0.23.tar.gz.ac new file mode 100644 index 0000000000000000000000000000000000000000..6809c7b92dd33968b5c079da4978aad618a355bf Binary files /dev/null and b/mysql-boost-8.0.23.tar.gz.ac differ diff --git a/mysql-fix-includes-robin-hood.patch b/mysql-fix-includes-robin-hood.patch new file mode 100644 index 0000000000000000000000000000000000000000..0aca3ef5e8743d074abc9c3d944c70ee128e05a8 --- /dev/null +++ b/mysql-fix-includes-robin-hood.patch @@ -0,0 +1,13 @@ +# Prevents fails when compiling with gcc11 (Fedora 34) +# Upstream PR: https://github.com/mysql/mysql-server/pull/323 + +--- mysql-8.0.23/extra/robin-hood-hashing/robin_hood.h.old 2021-02-04 17:15:31.034997221 +0100 ++++ mysql-8.0.23/extra/robin-hood-hashing/robin_hood.h 2021-02-04 17:15:50.781372066 +0100 +@@ -48,6 +48,7 @@ + #include + #include + #include ++#include + #if __cplusplus >= 201703L + # include + #endif diff --git a/mysql-main-cast.patch b/mysql-main-cast.patch new file mode 100644 index 0000000000000000000000000000000000000000..c078fae0603542419b9f4b1e50930484538c78bc --- /dev/null +++ b/mysql-main-cast.patch @@ -0,0 +1,48 @@ +commit 68730acd9ae7ae8b2fcd25b5ccd18d47038d00b9 +Author: Catalin Besleaga +Date: Mon Jan 4 14:32:05 2021 +0100 + + WL#14015: Follow-up: fixed unstable test + + Change-Id: I11f352168902c6689981131cfda3a87ba924941c + +diff --git a/mysql-test/r/cast.result b/mysql-test/r/cast.result +index af82329a9c5..4d81ef111cb 100644 +--- a/mysql-test/r/cast.result ++++ b/mysql-test/r/cast.result +@@ -1747,6 +1747,7 @@ CAST("2020extra" AS YEAR) + 2020 + Warnings: + Warning 1292 Truncated incorrect YEAR value: '2020extra' ++SET timestamp = UNIX_TIMESTAMP('2020-12-22 03:30:00'); + SELECT CAST(TIMESTAMP'2010-01-01 00:00' AS YEAR); + CAST(TIMESTAMP'2010-01-01 00:00' AS YEAR) + 2010 +@@ -1764,6 +1765,7 @@ CAST(TIME'08:09:10' AS YEAR) + SELECT CAST(TIME'00:00:00' AS YEAR); + CAST(TIME'00:00:00' AS YEAR) + 2020 ++SET timestamp = DEFAULT; + SELECT CAST(ST_PointFromText('POINT(10 10)') AS YEAR); + ERROR HY000: Incorrect arguments to cast_as_year + CREATE TABLE t AS SELECT CAST("2010" AS YEAR); +diff --git a/mysql-test/t/cast.test b/mysql-test/t/cast.test +index 1a1f512fca7..a74d79ad91f 100644 +--- a/mysql-test/t/cast.test ++++ b/mysql-test/t/cast.test +@@ -799,6 +799,7 @@ SELECT CAST("extra" AS YEAR); + SELECT CAST("22extra" AS YEAR); + SELECT CAST("2020extra" AS YEAR); + ++SET timestamp = UNIX_TIMESTAMP('2020-12-22 03:30:00'); + #date[time] values + SELECT CAST(TIMESTAMP'2010-01-01 00:00' AS YEAR); + SET SQL_MODE = ""; +@@ -807,6 +808,7 @@ SET SQL_MODE = default; + SELECT CAST(TIMESTAMP'2010-01-01 08:09:10' AS YEAR); + SELECT CAST(TIME'08:09:10' AS YEAR); + SELECT CAST(TIME'00:00:00' AS YEAR); ++SET timestamp = DEFAULT; + + #geometry values + --error ER_WRONG_ARGUMENTS diff --git a/mysql.spec b/mysql.spec index 93f4263f8ab7b4322a37668045cfc60b710d689f..61544d56437373a0601a41e9a9c0c3439915a767 100644 --- a/mysql.spec +++ b/mysql.spec @@ -29,8 +29,8 @@ %bcond_without conflicts %global sameevr %{?epoch:%{epoch}:}%{version}-%{release} Name: mysql -Version: 8.0.22 -Release: 2 +Version: 8.0.23 +Release: 1 Summary: MySQL client programs and shared libraries URL: http://www.mysql.com License: GPLv2 with exceptions and LGPLv2 and BSD @@ -48,6 +48,9 @@ Source17: mysql-wait-stop.sh Source18: mysql@.service.in Source30: %{pkgnamepatch}.rpmlintrc Source31: server.cnf.in +Source32: mysql-boost-%{version}.tar.gz.aa +Source33: mysql-boost-%{version}.tar.gz.ab +Source34: mysql-boost-%{version}.tar.gz.ac Patch1: %{pkgnamepatch}-install-test.patch Patch2: %{pkgnamepatch}-s390-tsc.patch Patch3: %{pkgnamepatch}-file-contents.patch @@ -58,6 +61,9 @@ Patch52: %{pkgnamepatch}-sharedir.patch Patch55: %{pkgnamepatch}-rpath.patch Patch75: %{pkgnamepatch}-arm32-timer.patch Patch78: %{pkgnamepatch}-gcc11.patch +Patch79: %{pkgnamepatch}-main-cast.patch +Patch80: %{pkgnamepatch}-fix-includes-robin-hood.patch +Patch81: disable-moutline-atomics-for-aarch64.patch Patch115: boost-1.58.0-pool.patch Patch125: boost-1.57.0-mpl-print.patch BuildRequires: cmake gcc-c++ libaio-devel libedit-devel libevent-devel libicu-devel lz4 @@ -65,7 +71,7 @@ BuildRequires: lz4-devel mecab-devel bison libzstd-devel %ifnarch aarch64 %{arm} s390 s390x BuildRequires: numactl-devel %endif -BuildRequires: openssl openssl-devel +BuildRequires: openssl openssl-devel libcurl-devel make BuildRequires: perl-interpreter perl-generators BuildRequires: rpcgen libtirpc-devel BuildRequires: protobuf-lite-devel rapidjson-devel zlib zlib-devel multilib-rpm-config procps @@ -208,6 +214,9 @@ The package provides Docs for development of MySQL applications. %prep +cd ../SOURCES +cat %{SOURCE32} %{SOURCE33} %{SOURCE34} | tar xj +cd .. %setup -q -n mysql-%{version} %patch1 -p1 %patch2 -p1 @@ -219,6 +228,9 @@ The package provides Docs for development of MySQL applications. %patch55 -p1 %patch75 -p1 %patch78 -p1 +%patch79 -p1 +%patch80 -p1 +%patch81 -p1 pushd boost/boost_$(echo %{boost_bundled_version}| tr . _) %patch115 -p0 %patch125 -p1 @@ -537,8 +549,16 @@ fi %exclude %{_mandir}/man1/{mysqld_multi.1*,mysqld_safe.1*,comp_err.1*} %changelog +* Wed Mar 10 2021 wangxiao - 8.0.23-1 +- Upgrade mysql to 8.0.23, fix CVES: CVE-2021-1998 CVE-2021-2002 + CVE-2021-2010 CVE-2021-2011 CVE-2021-2016 CVE-2021-2021 CVE-2021-2022 + CVE-2021-2024 CVE-2021-2031 CVE-2021-2032 CVE-2021-2036 CVE-2021-2038 + CVE-2021-2046 CVE-2021-2048 CVE-2021-2056 CVE-2021-2058 CVE-2021-2060 + CVE-2021-2061 CVE-2021-2065 CVE-2021-2070 CVE-2021-2072 CVE-2021-2076 + CVE-2021-2081 CVE-2021-2087 CVE-2021-2088 CVE-2021-2122 + * Wed Jan 13 2021 Shengjing Wei - 8.0.22-2 -- Delete useless information +- Delete useless information * Tue Dec 1 2020 weishengjing - 8.0.22-1 - New version 8.0.22 fix CVES: CVE-2020-14852 CVE-2020-14794 CVE-2020-14775