!25 mysql升级到8.0.22版本

From: @writings-of-prince-huainan
Reviewed-by: @small_leek
Signed-off-by: @small_leek
This commit is contained in:
openeuler-ci-bot 2020-12-07 15:35:37 +08:00 committed by Gitee
commit c025b79862
15 changed files with 428 additions and 216 deletions

View File

@ -1,49 +0,0 @@
From 216086b1de9daef9cf74194354e0504b44b0519d Mon Sep 17 00:00:00 2001
From: maminjie <maminjie1@huawei.com>
Date: Thu, 10 Sep 2020 16:44:50 +0800
Subject: [PATCH] fix internal compiler error: Segmentation fault
---
sql/dd/impl/types/partition_impl.cc | 6 +++++-
sql/dd/impl/types/partition_impl.h | 1 +
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/sql/dd/impl/types/partition_impl.cc b/sql/dd/impl/types/partition_impl.cc
index da8b057..fae0bac 100644
--- a/sql/dd/impl/types/partition_impl.cc
+++ b/sql/dd/impl/types/partition_impl.cc
@@ -291,7 +291,7 @@ bool Partition_impl::deserialize(Sdi_rcontext *rctx, const RJ_Value &val) {
deserialize_each(
rctx, [this]() { return add_index(nullptr); }, val, "indexes");
deserialize_each(
- rctx, [this]() { return add_subpartition(); }, val, "subpartitions");
+ rctx, [this]() { return add_subpartition_impl(); }, val, "subpartitions");
return deserialize_tablespace_ref(rctx, &m_tablespace_id, val,
"tablespace_ref");
@@ -371,6 +371,10 @@ Partition_index *Partition_impl::add_index(Index *idx) {
///////////////////////////////////////////////////////////////////////////
Partition *Partition_impl::add_subpartition() {
+ return add_subpartition_impl();
+}
+
+Partition_impl *Partition_impl::add_subpartition_impl() {
/// Support just one level of sub partitions.
DBUG_ASSERT(!parent());
diff --git a/sql/dd/impl/types/partition_impl.h b/sql/dd/impl/types/partition_impl.h
index 3b3068a..7a10649 100644
--- a/sql/dd/impl/types/partition_impl.h
+++ b/sql/dd/impl/types/partition_impl.h
@@ -247,6 +247,7 @@ class Partition_impl : public Entity_object_impl, public Partition {
/////////////////////////////////////////////////////////////////////////
virtual Partition *add_subpartition();
+ virtual Partition_impl *add_subpartition_impl();
virtual const Table::Partition_collection &subpartitions() const {
return m_subpartitions;
--
2.23.0

View File

@ -1,6 +1,6 @@
diff -up a/boost/boost_1_72_0/boost/mpl/print.hpp b/boost/boost_1_72_0/boost/mpl/print.hpp
--- a/boost/boost_1_72_0/boost/mpl/print.hpp 2014-07-09 23:12:31.000000000 +0200
+++ b/boost/boost_1_72_0/boost/mpl/print.hpp 2015-01-20 12:44:59.621400948 +0100
diff -up boost_1_57_0/boost/mpl/print.hpp\~ boost_1_57_0/boost/mpl/print.hpp
--- boost_1_57_0/boost/mpl/print.hpp~ 2014-07-09 23:12:31.000000000 +0200
+++ boost_1_57_0/boost/mpl/print.hpp 2015-01-20 12:44:59.621400948 +0100
@@ -52,16 +52,15 @@ struct print
enum { n = sizeof(T) + -1 };
#elif defined(__MWERKS__)

View File

@ -1,7 +1,7 @@
Index: boost/boost_1_72_0/boost/pool/pool.hpp
Index: boost/pool/pool.hpp
===================================================================
--- a/boost/boost_1_72_0/boost/pool/pool.hpp (revision 78317)
+++ b/boost/boost_1_72_0/boost/pool/pool.hpp (revision 78326)
--- boost/pool/pool.hpp (revision 78317)
+++ boost/pool/pool.hpp (revision 78326)
@@ -27,4 +27,6 @@
#include <boost/pool/poolfwd.hpp>

14
mysql-arm32-timer.patch Normal file
View File

@ -0,0 +1,14 @@
--- mysql-8.0.22/mysql-test/include/mtr_warnings.sql.old 2020-10-21 11:25:49.779775116 +0200
+++ mysql-8.0.22/mysql-test/include/mtr_warnings.sql 2020-10-21 11:26:29.507185307 +0200
@@ -299,6 +299,11 @@
("NOTIFY_SOCKET not set in environment. sd_notify messages will not be sent!"),
("Invalid systemd notify socket, cannot send: "),
+ /*
+ ARM32 don't support timers and get this warning in every test.
+ */
+ ("The CYCLE timer is not available. WAIT events in the performance_schema will not be timed."),
+
("THE_LAST_SUPPRESSION");

25
mysql-gcc11.patch Normal file
View File

@ -0,0 +1,25 @@
index a826a081..00000000
diff --git a/include/mysql/components/services/page_track_service.h b/include/mysql/components/services/page_track_service.h
index 103b5135..e6b3ba6f 100644
--- a/include/mysql/components/services/page_track_service.h
+++ b/include/mysql/components/services/page_track_service.h
@@ -26,6 +26,7 @@
#include <mysql/components/service.h>
#include <functional>
+#include <cstddef>
#include <stdint.h>
diff --git a/sql-common/sql_string.cc b/sql-common/sql_string.cc
index 40435729..8b6ee827 100644
--- a/sql-common/sql_string.cc
+++ b/sql-common/sql_string.cc
@@ -23,6 +23,7 @@
#include "sql_string.h"
#include <algorithm>
+#include <limits>
#include "my_dbug.h"
#include "my_macros.h"

41
mysql-s390-tsc.patch Normal file
View File

@ -0,0 +1,41 @@
Support s390/s390x in performance schema's cycle-counting functions.
Filed upstream at http://bugs.mysql.com/bug.php?id=59953
diff --git a/include/my_rdtsc.h b/include/my_rdtsc.h
index 65f7df19..a28f470c 100644
--- a/include/my_rdtsc.h
+++ b/include/my_rdtsc.h
@@ -128,5 +128,6 @@ void my_timer_init(MY_TIMER_INFO *mti);
#define MY_TIMER_ROUTINE_GETSYSTEMTIMEASFILETIME 26
#define MY_TIMER_ROUTINE_ASM_SUNPRO_X86_64 27
#define MY_TIMER_ROUTINE_ASM_AARCH64 28
+#define MY_TIMER_ROUTINE_ASM_S390 29
#endif
diff --git a/mysys/my_rdtsc.cc b/mysys/my_rdtsc.cc
index 54d19691..f18c182f 100644
--- a/mysys/my_rdtsc.cc
+++ b/mysys/my_rdtsc.cc
@@ -204,6 +204,13 @@ ulonglong my_timer_cycles(void) {
__asm __volatile__("mrs %[rt],cntvct_el0" : [ rt ] "=r"(result));
return result;
}
+#elif defined(__GNUC__) && defined(__s390__)
+ /* covers both s390 and s390x */
+ {
+ ulonglong result;
+ __asm__ __volatile__ ("stck %0" : "=Q" (result) : : "cc");
+ return result;
+ }
#elif defined(HAVE_SYS_TIMES_H) && defined(HAVE_GETHRTIME)
/* gethrtime may appear as either cycle or nanosecond counter */
return (ulonglong)gethrtime();
@@ -505,6 +512,8 @@ void my_timer_init(MY_TIMER_INFO *mti) {
mti->cycles.routine = MY_TIMER_ROUTINE_ASM_GCC_SPARC32;
#elif defined(__GNUC__) && defined(__aarch64__)
mti->cycles.routine = MY_TIMER_ROUTINE_ASM_AARCH64;
+#elif defined(__GNUC__) && defined(__s390__)
+ mti->cycles.routine = MY_TIMER_ROUTINE_ASM_S390;
#elif defined(HAVE_SYS_TIMES_H) && defined(HAVE_GETHRTIME)
mti->cycles.routine = MY_TIMER_ROUTINE_GETHRTIME;
#else

View File

@ -1,10 +1,8 @@
diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt
index 8217bb76..4149a764 100644
--- a/scripts/CMakeLists.txt
+++ b/scripts/CMakeLists.txt
@@ -513,4 +513,30 @@ ELSE()
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
)
--- mysql-8.0.22/scripts/CMakeLists.txt.old 2020-10-21 11:08:50.654252563 +0200
+++ mysql-8.0.22/scripts/CMakeLists.txt 2020-10-21 11:11:33.635935366 +0200
@@ -507,4 +507,30 @@
)
ENDIF()
ENDIF()
+
+ # files for systemd

View File

@ -1,133 +1,206 @@
#%{!?runselftest:%global runselftest 0}
%undefine __cmake_in_source_build
%global pkg_name %{name}
%global pkgnamepatch mysql
%{!?runselftest:%global runselftest 0}
%global check_testsuite 0
%global require_mysql_selinux 1
%global _pkgdocdirname %{pkg_name}%{!?_pkgdocdir:-%{version}}
%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{pkg_name}-%{version}}
%global _default_patch_flags --no-backup-if-mismatch
%global skiplist platform-specific-tests.list
%bcond_without clibrary
%bcond_without devel
%bcond_without client
%bcond_without common
%bcond_without errmsg
%bcond_without test
%bcond_with config
%bcond_with debug
%global boost_bundled_version 1.73.0
%global daemon_name mysqld
%global daemon_no_prefix mysqld
%global pidfiledir %{_rundir}/%{daemon_name}
%global logrotateddir %{_sysconfdir}/logrotate.d
%global logfiledir %{_localstatedir}/log/mysql
%global logfile %{logfiledir}/%{daemon_no_prefix}.log
%global dbdatadir %{_localstatedir}/lib/mysql
%global mysqluserhome /var/lib/mysql
%bcond_without mysql_names
%bcond_without conflicts
%global sameevr %{?epoch:%{epoch}:}%{version}-%{release}
Name: mysql
Version: 8.0.21
Release: 2
Summary: The package provides MySQL programs and shared libraries
License: GPLv2 with exceptions and LGPLv2 and BSD
Version: 8.0.22
Release: 1
Summary: MySQL client programs and shared libraries
URL: http://www.mysql.com
License: GPLv2 with exceptions and LGPLv2 and BSD
Source0: https://cdn.mysql.com/Downloads/MySQL-8.0/mysql-boost-%{version}.tar.gz
Source1: mysql_config_multilib.sh
Source2: my.cnf.in
Source3: README.mysql-docs
Source4: README.mysql-license
Source5: mysql.tmpfiles.d.in
Source6: mysql.service.in
Source7: mysql-prepare-db-dir.sh
Source8: mysql-check-socket.sh
Source9: mysql-scripts-common.sh
Source10: mysql-wait-stop.sh
Source11: mysql@.service.in
Source12: community-mysql.rpmlintrc
Source13: server.cnf.in
Patch0000: community-mysql-install-test.patch
Patch0001: community-mysql-file-contents.patch
Patch0002: community-mysql-scripts.patch
Patch0003: community-mysql-paths.patch
Patch0004: community-mysql-chain-certs.patch
Patch0005: community-mysql-sharedir.patch
Patch0006: community-mysql-rpath.patch
Patch0007: boost-1.58.0-pool.patch
Patch0008: boost-1.57.0-mpl-print.patch
Patch0009: 0001-fix-internal-compiler-error-Segmentation-fault.patch
BuildRequires: cmake gcc-c++ libaio-devel libedit-devel libevent-devel libicu-devel
BuildRequires: lz4-devel mecab-devel bison libzstd-devel openssl openssl-devel
BuildRequires: perl-interpreter perl-generators rpcgen libtirpc-devel lz4
BuildRequires: protobuf-lite-devel rapidjson-devel re2-devel zlib zlib-devel
BuildRequires: multilib-rpm-config procps time perl(Digest::file) perl(Digest::MD5) perl(Env)
BuildRequires: perl(Exporter) perl(Fcntl) perl(File::Temp) perl(Data::Dumper)
BuildRequires: perl(Getopt::Long) perl(IPC::Open3) perl(JSON) perl(LWP::Simple) perl(Memoize)
BuildRequires: perl(Socket) perl(Sys::Hostname) perl(Test::More) perl(Time::HiRes) systemd
%ifnarch aarch64
Source2: mysql_config_multilib.sh
Source3: my.cnf.in
Source6: README.mysql-docs
Source7: README.mysql-license
Source10: mysql.tmpfiles.d.in
Source11: mysql.service.in
Source12: mysql-prepare-db-dir.sh
Source14: mysql-check-socket.sh
Source15: mysql-scripts-common.sh
Source17: mysql-wait-stop.sh
Source18: mysql@.service.in
Source30: %{pkgnamepatch}.rpmlintrc
Source31: server.cnf.in
Patch1: %{pkgnamepatch}-install-test.patch
Patch2: %{pkgnamepatch}-s390-tsc.patch
Patch3: %{pkgnamepatch}-file-contents.patch
Patch4: %{pkgnamepatch}-scripts.patch
Patch5: %{pkgnamepatch}-paths.patch
Patch51: %{pkgnamepatch}-chain-certs.patch
Patch52: %{pkgnamepatch}-sharedir.patch
Patch55: %{pkgnamepatch}-rpath.patch
Patch75: %{pkgnamepatch}-arm32-timer.patch
Patch78: %{pkgnamepatch}-gcc11.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
BuildRequires: lz4-devel mecab-devel bison libzstd-devel
%ifnarch aarch64 %{arm} s390 s390x
BuildRequires: numactl-devel
%endif
Requires: bash coreutils grep mysql-common = %{version}-%{release}
Provides: bundled(boost) = 1.69 mysql = %{version}-%{release}
Provides: mysql-compat-client = %{version}-%{release}
Conflicts: mariadb
Obsoletes: mysql-cluster < 5.1.44
BuildRequires: openssl openssl-devel
%if 0%{?fedora} || 0%{?rhel} > 7
BuildRequires: perl-interpreter perl-generators
%endif
BuildRequires: rpcgen libtirpc-devel
BuildRequires: protobuf-lite-devel rapidjson-devel zlib zlib-devel multilib-rpm-config procps
BuildRequires: time perl(base) perl(Carp) perl(Cwd) perl(Digest::file) perl(Digest::MD5)
BuildRequires: perl(English) perl(Env) perl(Errno) perl(Exporter) perl(Fcntl)
BuildRequires: perl(File::Basename) perl(File::Copy) perl(File::Find) perl(File::Spec)
BuildRequires: perl(File::Spec::Functions) perl(File::Temp) perl(FindBin) perl(Data::Dumper)
BuildRequires: perl(Getopt::Long) perl(if) perl(IO::File) perl(IO::Handle) perl(IO::Select)
BuildRequires: perl(IO::Socket::INET) perl(IPC::Open3) perl(JSON) perl(lib) perl(LWP::Simple)
BuildRequires: perl(Memoize) perl(Net::Ping) perl(POSIX) perl(Socket) perl(strict)
BuildRequires: perl(Sys::Hostname) perl(Test::More) perl(Time::HiRes) perl(Time::localtime)
BuildRequires: perl(warnings) systemd
Requires: bash coreutils grep %{name}-common%{?_isa} = %{sameevr}
Provides: bundled(boost) = %{boost_bundled_version}
%if %{with mysql_names}
Provides: mysql = %{sameevr}
Provides: mysql%{?_isa} = %{sameevr}
Provides: mysql-compat-client = %{sameevr}
Provides: mysql-compat-client%{?_isa} = %{sameevr}
%endif
%{?with_conflicts:Conflicts: mariadb}
%global __requires_exclude ^perl\\((hostnames|lib::mtr|lib::v1|mtr_|My::)
%global __provides_exclude_from ^(%{_datadir}/(mysql|mysql-test)/.*|%{_libdir}/mysql/plugin/.*\\.so)$
%description
MySQL is a multi-threaded, multi-user database server. It consists
of a client, server implementation composed of a server daemon, and
differentClient program. Contains standard MySQL client and common
MySQL library and interface files.
MySQL is a multi-user, multi-threaded SQL database server. MySQL is a
client/server implementation consisting of a server daemon (mysqld)
and many different client programs and libraries. The base package
contains the standard MySQL client programs and generic MySQL files.
%if %{with clibrary}
%package libs
%package libs
Summary: The shared libraries required for MySQL clients
Requires: mysql-common = %{version}-%{release}
Provides: mysql-libs = %{version}-%{release}
%description libs
Requires: %{name}-common%{?_isa} = %{sameevr}
%if %{with mysql_names}
Provides: mysql-libs = %{sameevr}
Provides: mysql-libs%{?_isa} = %{sameevr}
%endif
%description libs
The mysql-libs package provides the essential shared libraries for any
MySQL client program or interface. You will need to install this package
to use any other MySQL package or any clients that need to connect to a
MySQL server.
%endif
%package config
Summary: The config files required by server and cl
Summary: The config files required by server and client
%description config
This package contains the config file my.cnf and my.cnf.d dir for MariaDB
or MySQL program. You will need to install this pack other MariaDB or MySQL
package if the config files are not package itself.
The package provides the config file my.cnf and my.cnf.d directory used by any
MariaDB or MySQL program. You will need to install this package to use any
other MariaDB or MySQL package if the config files are not provided in the
package itself.
%package common
%if %{with common}
%package common
Summary: The shared files required for MySQL server and client
Requires: %{_sysconfdir}/my.cnf
%description common
This pacakge contains the essential shared files for any MySQL program.
Need to install this package to use any other MySQL package.
%description common
The mysql-common package provides the essential shared files for any
MySQL program. You will need to install this package to use any other
MySQL package.
%endif
%if %{with errmsg}
%package errmsg
%package errmsg
Summary: The error messages files required by MySQL server
Requires: mysql-common = %{version}-%{release}
%description errmsg
The package contains the MySQL daemon`s error messages.
Requires: %{name}-common%{?_isa} = %{sameevr}
%description errmsg
The package provides error messages files for the MySQL daemon
%endif
%package server
%package server
Summary: The MySQL server and related files
Suggests: mysql = %{version}-%{release}
Requires: mysql
Requires: mysql-common = %{version}-%{release} %{_sysconfdir}/my.cnf
Requires: %{_sysconfdir}/my.cnf.d mysql-errmsg = %{version}-%{release}
Requires: coreutils systemd
Requires(pre): /usr/sbin/useradd
Suggests: %{name}%{?_isa} = %{sameevr}
Requires: mysql%{?_isa}
Requires: %{name}-common%{?_isa} = %{sameevr} %{_sysconfdir}/my.cnf
Requires: %{_sysconfdir}/my.cnf.d %{name}-errmsg%{?_isa} = %{sameevr}
%{?mecab:Requires: mecab-ipadic}
Requires: coreutils
Requires(pre): /usr/sbin/useradd
Requires: systemd
%{?systemd_requires: %systemd_requires}
Recommends: libcap
Requires(post): policycoreutils-python-utils
Requires(post): policycoreutils-python-utils
%if %require_mysql_selinux
Requires: (mysql-selinux if selinux-policy-targeted)
Provides: mysql-server = %{version}-%{release}
Provides: mysql-compat-server = %{version}-%{release}
Obsoletes: mysql-bench < 5.7.8
Obsoletes: community-mysql-bench < 5.7.8
Conflicts: mariadb-server
Conflicts: mariadb-galera-server
%description server
MySQL is a multi-threadmulti-user database. It consists with client/server
implementation, a server daemon(mysqld) and many different client programs
and libraries. The package contains MySQL server、directories and other
accompanying files.
%endif
%if %{with mysql_names}
Provides: mysql-server = %{sameevr}
Provides: mysql-server%{?_isa} = %{sameevr}
Provides: mysql-compat-server = %{sameevr}
Provides: mysql-compat-server%{?_isa} = %{sameevr}
%endif
%{?with_conflicts:Conflicts: mariadb-server}
%{?with_conflicts:Conflicts: mariadb-galera-server}
%description server
MySQL is a multi-user, multi-threaded SQL database server. MySQL is a
client/server implementation consisting of a server daemon (mysqld)
and many different client programs and libraries. This package contains
the MySQL server and some accompanying files and directories.
%if %{with devel}
%package devel
%package devel
Summary: Files for development of MySQL applications
Requires: mysql-libs = %{version}-%{release}
Requires: openssl-devel zlib-devel
Conflicts: mariadb-devel
%description devel
MySQL is a multi-threadmulti-user database. This package provides
the header files and libraries for the developing of MySQL client applications.
%{?with_clibrary:Requires: %{name}-libs%{?_isa} = %{sameevr}}
Requires: openssl-devel zlib-devel libzstd-devel
%{?with_conflicts:Conflicts: mariadb-devel}
%description devel
MySQL is a multi-user, multi-threaded SQL database server. This
package contains the libraries and header files that are needed for
developing MySQL client applications.
%endif
%if %{with test}
%package test
%package test
Summary: The test suite distributed with MySQL
Requires: mysql = %{version}-%{release} mysql-common = %{version}-%{release}
Requires: mysql-server = %{version}-%{release} gzip lz4 openssl perl(Digest::file)
Requires: %{name}%{?_isa} = %{sameevr} %{name}-common%{?_isa} = %{sameevr}
Requires: %{name}-server%{?_isa} = %{sameevr} gzip lz4 openssl perl(Digest::file)
Requires: perl(Digest::MD5) perl(Env) perl(Exporter) perl(Fcntl) perl(File::Temp)
Requires: perl(Data::Dumper) perl(Getopt::Long) perl(IPC::Open3) perl(JSON)
Requires: perl(FindBin) perl(Data::Dumper) perl(Getopt::Long) perl(IPC::Open3) perl(JSON)
Requires: perl(LWP::Simple) perl(Memoize) perl(Socket) perl(Sys::Hostname)
Requires: perl(Test::More) perl(Time::HiRes) perl(FindBin)
Conflicts: mariadb-test
Provides: mysql-test = %{version}-%{release}
%description test
MySQL is a multi-threadmulti-user database. The package provides test suite.
Requires: perl(Test::More) perl(Time::HiRes)
%{?with_conflicts:Conflicts: mariadb-test}
%if %{with mysql_names}
Provides: mysql-test = %{sameevr}
Provides: mysql-test%{?_isa} = %{sameevr}
%endif
%description test
MySQL is a multi-user, multi-threaded SQL database server. This
package contains the regression test suite distributed with
the MySQL sources.
%endif
%package help
Summary: Docs for development of MySQL applications.
@ -135,18 +208,35 @@ Requires: mysql = %{version}-%{release}
%description help
The package provides Docs for development of MySQL applications.
%prep
%autosetup -n mysql-%{version} -p1
cd mysql-test
%setup -q -n mysql-%{version}
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch51 -p1
%patch52 -p1
%patch55 -p1
%patch75 -p1
%patch78 -p1
pushd boost/boost_$(echo %{boost_bundled_version}| tr . _)
%patch115 -p0
%patch125 -p1
popd
pushd mysql-test
add_test () {
echo "$1" : BUG#0 "${@:2}" >> platform-specific-tests.list
echo "$1" : BUG#0 "${@:2}" >> %{skiplist}
}
touch platform-specific-tests.list
touch %{skiplist}
add_test innodb.redo_log_archive_04 failed since 8.0.17
add_test clone.remote_dml_no_binlog failed since 8.0.17
add_test auth_sec.keyring_file_data_qa sporadic since 8.0.19
add_test collations.chinese sporadic since 8.0.19
add_test main.mysql_load_data_local_dir local infile on
add_test rpl.rpl_row_jsondiff_basic_pk failed since 8.0.22
add_test rpl.rpl_row_jsondiff_basic_nokey failed since 8.0.22
%ifarch %arm aarch64
add_test gis.st_latitude
add_test gis.st_longitude
@ -157,12 +247,39 @@ add_test perfschema.setup_objects missing hw on arm32
add_test clone.remote_error_basic max_allowed_packet is 0
add_test innodb.create_tablespace
%endif
cd -
cp %{SOURCE1} %{SOURCE2} %{SOURCE5} %{SOURCE6} %{SOURCE7} \
%{SOURCE8} %{SOURCE9} %{SOURCE10} %{SOURCE11} %{SOURCE13} scripts
%ifarch s390x
add_test gis.geometry_class_attri_prop
add_test gis.geometry_property_function_issimple
add_test gis.gis_bugs_crashes
add_test gis.spatial_analysis_functions_buffer
add_test gis.spatial_analysis_functions_centroid
add_test gis.spatial_analysis_functions_distance
add_test gis.spatial_operators_intersection
add_test gis.spatial_op_testingfunc_mix
add_test gis.spatial_utility_function_distance_sphere
add_test gis.spatial_utility_function_simplify
add_test innodb.log_encrypt_kill main.with_recursive
add_test innodb.mysqldump_max_recordsize
add_test main.lock_multi_bug38499
add_test main.window_std_var
add_test main.window_std_var_optimized
add_test main.with_recursive
add_test x.resource_groups
add_test gis.spatial_operators_symdifference
add_test gis.spatial_operators_union
add_test main.subquery_bugs
%endif
%ifarch %arm
add_test perfschema.relaylog
%endif
popd
cp %{SOURCE2} %{SOURCE3} %{SOURCE10} %{SOURCE11} %{SOURCE12} \
%{SOURCE14} %{SOURCE15} %{SOURCE17} %{SOURCE18} %{SOURCE31} scripts
%build
%{set_build_flags}
%ifarch %arm
%define _lto_cflags %{nil}
%endif
%if %runselftest
if [ x"$(id -u)" = "x0" ]; then
echo "mysql's regression tests fail if run as root."
@ -171,27 +288,61 @@ cp %{SOURCE1} %{SOURCE2} %{SOURCE5} %{SOURCE6} %{SOURCE7} \
exit 1
fi
%endif
mkdir -p build && cd build
mkdir -p build && chmod +w build && cd build
cmake .. \
-DBUILD_CONFIG=mysql_release -DFEATURE_SET="community" -DINSTALL_LAYOUT=RPM -DDAEMON_NAME="mysqld" \
-DDAEMON_NO_PREFIX="mysqld" -DLOG_LOCATION="%{_localstatedir}/log/mysql/mysqld.log" \
-DPID_FILE_DIR="%{_rundir}/mysqld" -DNICE_PROJECT_NAME="MySQL" -DCMAKE_INSTALL_PREFIX="%{_prefix}" \
-DSYSCONFDIR="%{_sysconfdir}" -DSYSCONF2DIR="%{_sysconfdir}/my.cnf.d" -DINSTALL_INFODIR=share/info \
-DINSTALL_DOCDIR="share/doc/mysql" -DINSTALL_DOCREADMEDIR="share/doc/mysql" \
-DINSTALL_INCLUDEDIR=include/mysql -DINSTALL_LIBEXECDIR=libexec -DINSTALL_LIBDIR="%{_lib}/mysql" \
-DRPATH_LIBDIR="%{_libdir}" -DINSTALL_MANDIR=share/man -DINSTALL_MYSQLSHAREDIR=share/mysql \
-DINSTALL_MYSQLTESTDIR=share/mysql-test -DINSTALL_PLUGINDIR="%{_lib}/mysql/plugin" -DINSTALL_SBINDIR=bin \
-DINSTALL_SUPPORTFILESDIR=share/mysql -DMYSQL_DATADIR="%{_localstatedir}/lib/mysql" \
-DMYSQL_UNIX_ADDR="/var/lib/mysql/mysql.sock" -DENABLED_LOCAL_INFILE=ON -DWITH_SYSTEMD=1 \
-DSYSTEMD_SERVICE_NAME="mysqld" -DSYSTEMD_PID_DIR="%{_rundir}/mysqld" -DWITH_INNODB_MEMCACHED=ON \
-DWITH_ROUTER=OFF -DWITH_SYSTEM_LIBS=ON -DWITH_BOOST=../boost -DREPRODUCIBLE_BUILD=OFF \
-DCMAKE_C_FLAGS="%{optflags}" -DCMAKE_CXX_FLAGS="%{optflags}" -DCMAKE_EXE_LINKER_FLAGS="-pie %{build_ldflags}" \
-DTMPDIR=/var/tmp -DWITH_MYSQLD_LDFLAGS="%{build_ldflags}" -DCMAKE_C_LINK_FLAGS="%{build_ldflags}" \
%ifnarch aarch64
-DBUILD_CONFIG=mysql_release \
-DFEATURE_SET="community" \
-DINSTALL_LAYOUT=RPM \
-DDAEMON_NAME="%{daemon_name}" \
-DDAEMON_NO_PREFIX="%{daemon_no_prefix}" \
-DLOG_LOCATION="%{logfile}" \
-DPID_FILE_DIR="%{pidfiledir}" \
-DNICE_PROJECT_NAME="MySQL" \
-DCMAKE_INSTALL_PREFIX="%{_prefix}" \
-DSYSCONFDIR="%{_sysconfdir}" \
-DSYSCONF2DIR="%{_sysconfdir}/my.cnf.d" \
-DINSTALL_DOCDIR="share/doc/%{_pkgdocdirname}" \
-DINSTALL_DOCREADMEDIR="share/doc/%{_pkgdocdirname}" \
-DINSTALL_INCLUDEDIR=include/mysql \
-DINSTALL_INFODIR=share/info \
-DINSTALL_LIBEXECDIR=libexec \
-DINSTALL_LIBDIR="%{_lib}/mysql" \
-DRPATH_LIBDIR="%{_libdir}" \
-DINSTALL_MANDIR=share/man \
-DINSTALL_MYSQLSHAREDIR=share/%{pkg_name} \
-DINSTALL_MYSQLTESTDIR=share/mysql-test \
-DINSTALL_PLUGINDIR="%{_lib}/mysql/plugin" \
-DINSTALL_SBINDIR=bin \
-DINSTALL_SUPPORTFILESDIR=share/%{pkg_name} \
-DMYSQL_DATADIR="%{dbdatadir}" \
-DMYSQL_UNIX_ADDR="/var/lib/mysql/mysql.sock" \
-DENABLED_LOCAL_INFILE=ON \
-DWITH_SYSTEMD=1 \
-DSYSTEMD_SERVICE_NAME="%{daemon_name}" \
-DSYSTEMD_PID_DIR="%{pidfiledir}" \
-DWITH_INNODB_MEMCACHED=ON \
%ifnarch aarch64 %{arm} s390 s390x
-DWITH_NUMA=ON \
%endif
-DCMAKE_CXX_LINK_FLAGS"%{build_ldflags}"
%ifarch s390 s390x armv7hl
-DUSE_LD_GOLD=OFF \
%endif
-DWITH_ROUTER=OFF \
-DWITH_SYSTEM_LIBS=ON \
-DWITH_MECAB=system \
-DWITH_BOOST=../boost \
-DREPRODUCIBLE_BUILD=OFF \
-DCMAKE_C_FLAGS="%{optflags}%{?with_debug: -fno-strict-overflow -Wno-unused-result -Wno-unused-function -Wno-unused-but-set-variable}" \
-DCMAKE_CXX_FLAGS="%{optflags}%{?with_debug: -fno-strict-overflow -Wno-unused-result -Wno-unused-function -Wno-unused-but-set-variable}" \
-DCMAKE_EXE_LINKER_FLAGS="-pie %{build_ldflags}" \
%{?with_debug: -DWITH_DEBUG=1} \
%{?with_debug: -DMYSQL_MAINTAINER_MODE=0} \
-DTMPDIR=/var/tmp \
-DWITH_MYSQLD_LDFLAGS="%{build_ldflags}" \
-DCMAKE_C_LINK_FLAGS="%{build_ldflags}" \
-DCMAKE_CXX_LINK_FLAGS="%{build_ldflags}"
cmake .. -LAH
%make_build
cd -
@ -204,46 +355,66 @@ install -p -m 0755 scripts/mysql_config_multilib %{buildroot}%{_bindir}/mysql_co
fi
install -p -m 0644 Docs/INFO_SRC %{buildroot}%{_libdir}/mysql/
install -p -m 0644 Docs/INFO_BIN %{buildroot}%{_libdir}/mysql/
install -d %{buildroot}%{_localstatedir}/log/mysql
install -d %{buildroot}%{_rundir}/mysqld
install -p -m 0755 -d %{buildroot}%{_localstatedir}/lib/mysql
mkdir -p %{buildroot}%{logfiledir}
mkdir -p %{buildroot}%{pidfiledir}
install -p -m 0755 -d %{buildroot}%{dbdatadir}
install -p -m 0750 -d %{buildroot}%{_localstatedir}/lib/mysql-files
install -p -m 0700 -d %{buildroot}%{_localstatedir}/lib/mysql-keyring
install -D -p -m 0644 scripts/my.cnf %{buildroot}%{_sysconfdir}/my.cnf
install -D -p -m 644 scripts/mysql.service %{buildroot}%{_unitdir}/mysqld.service
install -D -p -m 644 scripts/mysql@.service %{buildroot}%{_unitdir}/mysqld@.service
install -D -p -m 0644 scripts/mysql.tmpfiles.d %{buildroot}%{_tmpfilesdir}/mysqld.conf
install -D -p -m 755 scripts/mysql-prepare-db-dir %{buildroot}%{_libexecdir}/mysql-prepare-db-dir
install -D -p -m 644 scripts/mysql.service %{buildroot}%{_unitdir}/%{daemon_name}.service
install -D -p -m 644 scripts/mysql@.service %{buildroot}%{_unitdir}/%{daemon_name}@.service
install -D -p -m 0644 scripts/mysql.tmpfiles.d %{buildroot}%{_tmpfilesdir}/%{daemon_name}.conf
rm -r %{buildroot}%{_tmpfilesdir}/mysql.conf
install -D -p -m 755 scripts/mysql-prepare-db-dir %{buildroot}%{_libexecdir}/mysql-prepare-db-dir
install -p -m 755 scripts/mysql-wait-stop %{buildroot}%{_libexecdir}/mysql-wait-stop
install -p -m 755 scripts/mysql-check-socket %{buildroot}%{_libexecdir}/mysql-check-socket
install -p -m 644 scripts/mysql-scripts-common %{buildroot}%{_libexecdir}/mysql-scripts-common
install -D -p -m 0644 scripts/server.cnf %{buildroot}%{_sysconfdir}/my.cnf.d/mysql-server.cnf
install -d %{buildroot}%{_sysconfdir}/logrotate.d
mv %{buildroot}%{_datadir}/mysql/mysql-log-rotate %{buildroot}%{_sysconfdir}/logrotate.d/mysqld
chmod 644 %{buildroot}%{_sysconfdir}/logrotate.d/mysqld
install -d %{buildroot}%{_sysconfdir}/ld.so.conf.d
echo "%{_libdir}/mysql" > %{buildroot}%{_sysconfdir}/ld.so.conf.d/mysql-%{_arch}.conf
install -D -p -m 0644 scripts/server.cnf %{buildroot}%{_sysconfdir}/my.cnf.d/%{pkg_name}-server.cnf
rm %{buildroot}%{_libdir}/mysql/*.a
rm %{buildroot}%{_mandir}/man1/comp_err.1*
mkdir -p %{buildroot}%{logrotateddir}
mv %{buildroot}%{_datadir}/%{pkg_name}/mysql-log-rotate %{buildroot}%{logrotateddir}/%{daemon_name}
chmod 644 %{buildroot}%{logrotateddir}/%{daemon_name}
mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d
echo "%{_libdir}/mysql" > %{buildroot}%{_sysconfdir}/ld.so.conf.d/%{name}-%{_arch}.conf
mv %{buildroot}%{_bindir}/mysqld %{buildroot}%{_libexecdir}/mysqld
install -d %{buildroot}%{_sbindir}
mkdir -p %{buildroot}%{_sbindir}
ln -s %{_libexecdir}/mysqld %{buildroot}%{_sbindir}/mysqld
cd -
install -p -m 0644 %{SOURCE3} %{basename:%{SOURCE3}}
install -p -m 0644 %{SOURCE4} %{basename:%{SOURCE4}}
install -p -m 0644 mysql-test/platform-specific-tests.list %{buildroot}%{_datadir}/mysql-test
%if %{with debug}
mv %{buildroot}%{_bindir}/mysqld-debug %{buildroot}%{_libexecdir}/mysqld
%endif
cd -
install -p -m 0644 %{SOURCE6} %{basename:%{SOURCE6}}
install -p -m 0644 %{SOURCE7} %{basename:%{SOURCE7}}
install -p -m 0644 mysql-test/%{skiplist} %{buildroot}%{_datadir}/mysql-test
mkdir -p %{buildroot}%{_sysconfdir}/my.cnf.d
%check
%if %runselftest
pushd build
make test VERBOSE=1
cd mysql-test
cp ../../mysql-test/platform-specific-tests.list .
cp ../../mysql-test/%{skiplist} .
export MTR_BUILD_THREAD=%{__isa_bits}
./mtr --mem --parallel=auto --force --retry=2 \
./mtr %{?with_debug:--debug-server} \
--mem --parallel=auto --force --retry=2 \
--mysqld=--binlog-format=mixed \
--suite-timeout=720 --testcase-timeout=30 \
--report-unstable-tests --clean-vardir \
--skip-test-list=platform-specific-tests.list
%if %{check_testsuite}
--max-test-fail=0 || :
%else
--skip-test-list=%{skiplist}
%endif
rm -r var $(readlink var)
cd -
popd
@ -251,25 +422,25 @@ popd
%pre server
/usr/sbin/groupadd -g 27 -o -r mysql >/dev/null 2>&1 || :
/usr/sbin/useradd -M -N -g mysql -o -r -d /var/lib/mysql -s /sbin/nologin \
/usr/sbin/useradd -M -N -g mysql -o -r -d %{mysqluserhome} -s /sbin/nologin \
-c "MySQL Server" -u 27 mysql >/dev/null 2>&1 || :
%post server
%systemd_post mysqld.service
if [ ! -e "%{_localstatedir}/log/mysql/mysqld.log" -a ! -h "%{_localstatedir}/log/mysql/mysqld.log" ] ; then
install /dev/null -m0640 -omysql -gmysql "%{_localstatedir}/log/mysql/mysqld.log"
%systemd_post %{daemon_name}.service
if [ ! -e "%{logfile}" -a ! -h "%{logfile}" ] ; then
install /dev/null -m0640 -omysql -gmysql "%{logfile}"
fi
%preun server
%systemd_preun mysqld.service
%systemd_preun %{daemon_name}.service
%postun server
%systemd_postun_with_restart mysqld.service
%systemd_postun_with_restart %{daemon_name}.service
%files
%doc README README.mysql-license README.mysql-docs
%{_bindir}/{mysql,mysql_config_editor,mysqladmin,mysqlcheck,mysqldump}
%{_bindir}/{mysqlimport,mysqlpump,mysqlshow,mysqlslap,mysqlbinlog}
%{_bindir}/{mysqlimport,mysqlpump,mysqlshow,mysqlslap,mysqlbinlog,zlib_decompress}
%exclude %{_tmpfilesdir}/mysql.conf
%files libs
@ -368,8 +539,20 @@ fi
%exclude %{_mandir}/man1/{mysqld_multi.1*,mysqld_safe.1*,comp_err.1*}
%changelog
* Tue Dec 1 2020 weishengjing <weishengjing1@huawei.com> - 8.0.22-1
- New version 8.0.22 fix CVES: CVE-2020-14852 CVE-2020-14794 CVE-2020-14775
CVE-2020-14893 CVE-2020-14829 CVE-2020-14828 CVE-2020-14888 CVE-2020-14891
CVE-2020-14812 CVE-2020-14870 CVE-2020-14769 CVE-2020-14878 CVE-2020-14789
CVE-2020-14821 CVE-2020-14844 CVE-2020-14836 CVE-2020-14830 CVE-2020-14827
CVE-2020-14773 CVE-2020-14765 CVE-2020-14869 CVE-2020-14776 CVE-2020-14861
CVE-2020-14866 CVE-2020-14672 CVE-2020-14837 CVE-2020-14771 CVE-2020-14785
CVE-2020-14838 CVE-2020-14848 CVE-2020-14791 CVE-2020-14793 CVE-2020-14804
CVE-2020-14777 CVE-2020-14800 CVE-2020-14786 CVE-2020-14845 CVE-2020-14839
CVE-2020-14846 CVE-2020-14867 CVE-2020-14868 CVE-2020-14873 CVE-2020-14860
CVE-2020-14814 CVE-2020-14790 CVE-2020-14809
* Sat Sep 19 2020 maminjie <maminjie1@huawei.com> - 8.0.21-2
* fix internal compiler error: Segmentation fault
- fix internal compiler error: Segmentation fault
* Mon Sep 14 2020 maminjie <maminjie1@huawei.com> - 8.0.21-1
- upgrade to 8.0.21