Skip to content
This repository has been archived by the owner on Feb 10, 2023. It is now read-only.

Commit

Permalink
Merge pull request #12 from TCeason/MySQL-release-5.7.26-29
Browse files Browse the repository at this point in the history
MySQL release 5.7.26 29
  • Loading branch information
BohuTANG authored Jun 17, 2019
2 parents 914b0f5 + 9868c89 commit 82cbee9
Show file tree
Hide file tree
Showing 663 changed files with 151,202 additions and 29,029 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ INCLUDE(lz4)
INCLUDE(libevent)
INCLUDE(ssl)
INCLUDE(sasl)
INCLUDE(rpc)
INCLUDE(readline)
INCLUDE(protobuf)
INCLUDE(mysql_version)
Expand Down
4 changes: 2 additions & 2 deletions VERSION
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
MYSQL_VERSION_MAJOR=5
MYSQL_VERSION_MINOR=7
MYSQL_VERSION_PATCH=25
MYSQL_VERSION_EXTRA=-28
MYSQL_VERSION_PATCH=26
MYSQL_VERSION_EXTRA=-29
86 changes: 60 additions & 26 deletions build-ps/percona-server-5.7_builder.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,23 @@ check_workdir(){
add_percona_yum_repo(){
if [ ! -f /etc/yum.repos.d/percona-dev.repo ]
then
curl -o /etc/yum.repos.d/ https://jenkins.percona.com/yum-repo/percona-dev.repo
curl -o /etc/yum.repos.d/percona-dev.repo https://jenkins.percona.com/yum-repo/percona-dev.repo
sed -i 's:$basearch:x86_64:g' /etc/yum.repos.d/percona-dev.repo

fi
return
}

add_percona_apt_repo(){
if [ ! -f /etc/apt/sources.list.d/percona-dev.list ]; then
curl -o /etc/apt/sources.list.d/ https://jenkins.percona.com/apt-repo/percona-dev.list.template
mv /etc/apt/sources.list.d/percona-dev.list.template /etc/apt/sources.list.d/percona-dev.list
if [ "x$RHEL" = "x8" ]; then
echo -e '[main]\nenabled=0\n' > /etc/yum/pluginconf.d/subscription-manager.conf
echo 'strict=0' >> /etc/dnf/dnf.conf
echo 'strict=0' >> /etc/yum/yum.conf
wget -O /etc/yum.repos.d/rhel8-beta.repo https://jenkins.percona.com/yum-repo/rhel8/rhel8-beta.repo
wget -O /etc/yum.repos.d/percona-dev.repo https://jenkins.percona.com/yum-repo/percona-dev.repo
fi
curl -o /etc/apt/sources.list.d/percona-dev.list https://jenkins.percona.com/apt-repo/percona-dev.list.template
sed -i "s:@@DIST@@:$OS_NAME:g" /etc/apt/sources.list.d/percona-dev.list
fi

Expand Down Expand Up @@ -293,15 +301,30 @@ install_deps() {
RHEL=$(rpm --eval %rhel)
ARCH=$(echo $(uname -m) | sed -e 's:i686:i386:g')
add_percona_yum_repo
yum -y install https://repo.percona.com/yum/percona-release-latest.noarch.rpm || true
percona-release enable origin release
yum -y install epel-release
yum -y install git numactl-devel rpm-build gcc-c++ gperf ncurses-devel perl readline-devel openssl-devel jemalloc
yum -y install time zlib-devel libaio-devel bison cmake pam-devel libeatmydata jemalloc-devel
yum -y install perl-Time-HiRes libcurl-devel openldap-devel unzip wget libcurl-devel
yum -y install perl-Env perl-Data-Dumper perl-JSON MySQL-python perl-Digest perl-Digest-MD5 perl-Digest-Perl-MD5 || true
if [ ${RHEL} -lt 7 -a $(uname -m) = x86_64 ]; then
yum -y install percona-devtoolset-gcc percona-devtoolset-gcc-c++ percona-devtoolset-binutils
if [ ${RHEL} -lt 8 ]; then
yum -y install https://repo.percona.com/yum/percona-release-latest.noarch.rpm || true
percona-release enable origin release
yum -y install epel-release
yum -y install git pkg-config numactl-devel rpm-build gcc-c++ gperf ncurses-devel perl readline-devel openssl-devel jemalloc
yum -y install time zlib-devel libaio-devel bison cmake pam-devel libeatmydata jemalloc-devel
yum -y install perl-Time-HiRes libcurl-devel openldap-devel unzip wget libcurl-devel
yum -y install perl-Env perl-Data-Dumper perl-JSON MySQL-python perl-Digest perl-Digest-MD5 perl-Digest-Perl-MD5 || true
if [ ${RHEL} = 6 ]; then
if [ $(uname -m) = x86_64 ]; then
yum -y install percona-devtoolset-gcc percona-devtoolset-gcc-c++ percona-devtoolset-binutils
else
wget -O /etc/yum.repos.d/slc6-devtoolset.repo http://linuxsoft.cern.ch/cern/devtoolset/slc6-devtoolset.repo
wget -O /etc/pki/rpm-gpg/RPM-GPG-KEY-cern https://raw.githubusercontent.com/cms-sw/cms-docker/master/slc6-vanilla/RPM-GPG-KEY-cern
yum -y install devtoolset-2-gcc-c++ devtoolset-2-binutils libevent2-devel
fi
fi
else
yum -y install perl.x86_64
yum -y install binutils gcc gcc-c++ tar rpm-build rsync bison glibc glibc-devel libstdc++-devel libtirpc-devel make openssl-devel pam-devel perl perl-JSON perl-Memoize
yum -y install automake autoconf cmake jemalloc jemalloc-devel
yum -y install libcurl-devel openldap-devel selinux-policy-devel
yum -y install libaio-devel ncurses-devel numactl-devel readline-devel time
yum -y install rpcgen libtirpc-devel
fi
if [ "x$RHEL" = "x6" ]; then
yum -y install Percona-Server-shared-56
Expand All @@ -319,17 +342,25 @@ install_deps() {
echo "waiting"
done
apt-get -y purge eatmydata || true
echo "deb http://jenkins.percona.com/apt-repo/ ${DIST} main" > percona-dev.list
mv -f percona-dev.list /etc/apt/sources.list.d/
wget -q -O - http://jenkins.percona.com/apt-repo/8507EFA5.pub | sudo apt-key add -
wget -q -O - http://jenkins.percona.com/apt-repo/CD2EFD2A.pub | sudo apt-key add -
apt-get update
apt-get -y install psmisc
apt-get -y install libsasl2-modules:amd64 || apt-get -y install libsasl2-modules
apt-get -y install psmisc pkg-config
apt-get -y install libsasl2-dev libsasl2-modules:amd64 libsasl2-modules-ldap || apt-get -y install libsasl2-modules libsasl2-modules-ldap libsasl2-dev
apt-get -y install dh-systemd || true
apt-get -y install curl bison cmake perl libssl-dev gcc g++ libaio-dev libldap2-dev libwrap0-dev gdb unzip gawk
apt-get -y install lsb-release libmecab-dev libncurses5-dev libreadline-dev libpam-dev zlib1g-dev libcurl4-openssl-dev
apt-get -y install lsb-release libmecab-dev libncurses5-dev libreadline-dev libpam-dev zlib1g-dev
apt-get -y install libldap2-dev libnuma-dev libjemalloc-dev libeatmydata libc6-dbg valgrind libjson-perl python-mysqldb libsasl2-dev

apt-get -y install libmecab2 mecab mecab-ipadic
apt-get -y install build-essential devscripts
apt-get -y install build-essential devscripts libnuma-dev
apt-get -y install cmake autotools-dev autoconf automake build-essential devscripts debconf debhelper fakeroot
apt-get -y install libcurl4-openssl-dev
if [ "x${DIST}" = "xcosmic" -o "x${DIST}" = "xbionic" -o "x${DIST}" = "xdisco" -o "x${DIST}" = "xbuster" ]; then
apt-get -y install libeatmydata1
fi
fi
return;
}
Expand Down Expand Up @@ -442,6 +473,11 @@ build_mecab_lib(){
make
make check
make DESTDIR=${MECAB_INSTALL_DIR} install
cd ../${MECAB_INSTALL_DIR}
if [ -d usr/lib64 ]; then
mkdir -p usr/lib
mv usr/lib64/* usr/lib
fi
cd ${WORKDIR}
}

Expand Down Expand Up @@ -511,9 +547,11 @@ build_rpm(){
#
mv *.src.rpm rpmbuild/SRPMS
#
if [ ${ARCH} = x86_64 ]; then
if [ ${RHEL} != 7 ]; then
if [ ${RHEL} = 6 ]; then
if [ ${ARCH} = x86_64 ]; then
source /opt/percona-devtoolset/enable
else
source /opt/rh/devtoolset-2/enable
fi
fi

Expand Down Expand Up @@ -621,7 +659,7 @@ build_deb(){

cd ${DIRNAME}
#
if [ ${DEBIAN_VERSION} = xenial -o ${DEBIAN_VERSION} = artful -o ${DEBIAN_VERSION} = bionic -o ${DEBIAN_VERSION} = trusty ]; then
if [ ${DEBIAN_VERSION} = xenial -o ${DEBIAN_VERSION} = artful -o ${DEBIAN_VERSION} = bionic -o ${DEBIAN_VERSION} = trusty -o ${DEBIAN_VERSION} = cosmic -o ${DEBIAN_VERSION} = disco -o ${DEBIAN_VERSION} = buster ]; then
rm -rf debian
cp -r build-ps/ubuntu debian
fi
Expand All @@ -633,7 +671,7 @@ build_deb(){
mv debian/rules.notokudb debian/rules
mv debian/control.notokudb debian/control
else
if [ ${DEBIAN_VERSION} != trusty -a ${DEBIAN_VERSION} != xenial -a ${DEBIAN_VERSION} != jessie -a ${DEBIAN_VERSION} != stretch -a ${DEBIAN_VERSION} != artful -a ${DEBIAN_VERSION} != bionic ]; then
if [ ${DEBIAN_VERSION} != trusty -a ${DEBIAN_VERSION} != xenial -a ${DEBIAN_VERSION} != jessie -a ${DEBIAN_VERSION} != stretch -a ${DEBIAN_VERSION} != artful -a ${DEBIAN_VERSION} != bionic -a ${DEBIAN_VERSION} != cosmic -a ${DEBIAN_VERSION} != disco -a ${DEBIAN_VERSION} != buster ]; then
gcc47=$(which gcc-4.7 2>/dev/null || true)
if [ -x "${gcc47}" ]; then
export CC=gcc-4.7
Expand All @@ -657,7 +695,7 @@ build_deb(){
sed -i 's/export CXXFLAGS=/export CXXFLAGS=-Wno-error=deprecated-declarations -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=unused-parameter -Wno-error=date-time /' debian/rules
fi

if [ ${DEBIAN_VERSION} = "artful" -o ${DEBIAN_VERSION} = "bionic" ]; then
if [ ${DEBIAN_VERSION} = "artful" -o ${DEBIAN_VERSION} = "bionic" -o ${DEBIAN_VERSION} = "cosmic" -o ${DEBIAN_VERSION} = "disco" -o ${DEBIAN_VERSION} = "buster" ]; then
sed -i 's/export CFLAGS=/export CFLAGS=-Wno-error=deprecated-declarations -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=unused-parameter -Wno-error=date-time /' debian/rules
sed -i 's/export CXXFLAGS=/export CXXFLAGS=-Wno-error=deprecated-declarations -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=unused-parameter -Wno-error=date-time /' debian/rules
fi
Expand Down Expand Up @@ -731,12 +769,8 @@ build_tarball(){
CMAKE_OPTS="-DWITH_ROCKSDB=1" bash -xe ./build-ps/build-binary.sh --with-jemalloc=../jemalloc/ --with-yassl --with-mecab="${MECAB_INSTALL_DIR}/usr" ../TARGET
else
CMAKE_OPTS="-DWITH_ROCKSDB=1" bash -xe ./build-ps/build-binary.sh --with-mecab="${MECAB_INSTALL_DIR}/usr" --with-jemalloc=../jemalloc/ ../TARGET

DIRNAME="tarball"
fi



mkdir -p ${WORKDIR}/${DIRNAME}
mkdir -p ${CURDIR}/${DIRNAME}
cp ../TARGET/*.tar.gz ${WORKDIR}/${DIRNAME}
Expand Down Expand Up @@ -792,4 +826,4 @@ build_tarball
build_srpm
build_source_deb
build_rpm
build_deb
build_deb
22 changes: 15 additions & 7 deletions build-ps/percona-server.spec
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
# NOTE: "vendor" is used in upgrade/downgrade check, so you can't
# change these, has to be exactly as is.

%undefine _missing_build_ids_terminate_build
%global mysql_vendor Oracle and/or its affiliates
%global percona_server_vendor Percona, Inc
%global mysqldatadir /var/lib/mysql
Expand All @@ -44,7 +45,6 @@
# By default a build will be done including the RocksDB
%{!?with_rocksdb: %global rocksdb 1}


# Pass path to mecab lib
%{?with_mecab: %global mecab_option -DWITH_MECAB=%{with_mecab}}
%{?with_mecab: %global mecab 1}
Expand All @@ -54,6 +54,7 @@

%{!?with_systemd: %global systemd 0}
%{?el7: %global systemd 1}
%{?el8: %global systemd 1}
%{!?with_debuginfo: %global nodebuginfo 0}
%{!?product_suffix: %global product_suffix -57}
%{!?feature_set: %global feature_set community}
Expand Down Expand Up @@ -89,7 +90,7 @@
%endif

# Version for compat libs
%if 0%{?rhel} == 7
%if 0%{?rhel} > 6
%global compatver 5.6.28
%global percona_compatver 76.1
%global compatlib 18
Expand Down Expand Up @@ -209,6 +210,10 @@ Requires(preun): /sbin/chkconfig
Requires(preun): /sbin/service
%endif

%if 0%{?rhel} == 8
Obsoletes: mariadb-connector-c-config
%endif

%description -n Percona-Server-server%{product_suffix}
The Percona Server software delivers a very fast, multi-threaded, multi-user,
and robust SQL (Structured Query Language) database server. Percona Server
Expand Down Expand Up @@ -280,7 +285,7 @@ and applications need to dynamically load and use Percona Server.

%if 0%{?compatlib}
%package -n Percona-Server-shared-compat%{product_suffix}
Summary: Shared compat libraries for Percona Server %{compatver}--%{percona_compatver} database client applications
Summary: Shared compat libraries for Percona Server %{compatver}-%{percona_compatver} database client applications
Group: Applications/Databases
Provides: mysql-libs-compat = %{version}-%{release}
Provides: mysql-libs-compat%{?_isa} = %{version}-%{release}
Expand Down Expand Up @@ -543,10 +548,11 @@ rm -rf %{buildroot}%{_bindir}/mysql_embedded
/usr/sbin/groupadd -g 27 -o -r mysql >/dev/null 2>&1 || :
/usr/sbin/useradd -M %{!?el5:-N} -g mysql -o -r -d /var/lib/mysql -s /bin/false \
-c "Percona Server" -u 27 mysql >/dev/null 2>&1 || :
if [ $1 -ge 1 ]; then
if [ ! -f /etc/my.cnf -a -f /etc/my.cnf_back_before_remove -a ! -L /etc/my.cnf ]; then
mv /etc/my.cnf_back_before_remove /etc/my.cnf
echo " /etc/my.cnf was restored from backup file my.cnf_back_before_remove"
if [ "$1" = 1 ]; then
if [ -f %{_sysconfdir}/my.cnf ]; then
timestamp=$(date '+%Y%m%d-%H%M')
cp %{_sysconfdir}/my.cnf \
%{_sysconfdir}/my.cnf.rpmsave-${timestamp}
fi
fi

Expand Down Expand Up @@ -838,6 +844,7 @@ fi
%attr(755, root, root) %{_libdir}/mysql/plugin/connection_control.so
%attr(755, root, root) %{_libdir}/mysql/plugin/group_replication.so
%attr(755, root, root) %{_libdir}/mysql/plugin/authentication_ldap_sasl_client.so
%attr(755, root, root) %{_libdir}/mysql/plugin/udf_example.so
%dir %{_libdir}/mysql/plugin/debug
%attr(755, root, root) %{_libdir}/mysql/plugin/debug/adt_null.so
%attr(755, root, root) %{_libdir}/mysql/plugin/debug/auth_socket.so
Expand All @@ -858,6 +865,7 @@ fi
%attr(755, root, root) %{_libdir}/mysql/plugin/debug/keyring_udf.so
%attr(755, root, root) %{_libdir}/mysql/plugin/debug/connection_control.so
%attr(755, root, root) %{_libdir}/mysql/plugin/debug/group_replication.so
%attr(755, root, root) %{_libdir}/mysql/plugin/debug/udf_example.so
%if 0%{?mecab}
%{_libdir}/mysql/mecab
%attr(755, root, root) %{_libdir}/mysql/plugin/libpluginmecab.so
Expand Down
4 changes: 2 additions & 2 deletions build-ps/rpm/mysql-5.7-sharedlib-rename.patch
Original file line number Diff line number Diff line change
Expand Up @@ -530,13 +530,13 @@ diff -rup old/rapid/plugin/x/CMakeLists.txt new/rapid/plugin/x/CMakeLists.txt
diff -rup old/rapid/unittest/gunit/xplugin/CMakeLists.txt new/rapid/unittest/gunit/xplugin/CMakeLists.txt
--- old/rapid/unittest/gunit/xplugin/CMakeLists.txt
+++ new/rapid/unittest/gunit/xplugin/CMakeLists.txt
@@ -137,7 +137,7 @@
@@ -151,7 +151,7 @@
regex
gmock
mysqlservices
- perconaserverclient
+ mysqlclient
${LIBEVENT_LIBRARY} ${LIBEVENT_LIBRARIES}
${LIBEVENT_LIBRARIES}
${CMAKE_THREAD_LIBS_INIT}
${PROTOBUF_LIBRARY}
--- old/storage/tokudb/PerconaFT/tools/CMakeLists.txt
Expand Down
4 changes: 3 additions & 1 deletion client/base/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
#
# 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
Expand All @@ -15,6 +15,8 @@

ADD_DEFINITIONS(${SSL_DEFINES})

INCLUDE(${MYSQL_CMAKE_SCRIPT_DIR}/compile_flags.cmake)

ADD_CONVENIENCE_LIBRARY(client_base
i_option.cc
bool_option.cc
Expand Down
2 changes: 2 additions & 0 deletions client/dump/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

INCLUDE(${MYSQL_CMAKE_SCRIPT_DIR}/compile_flags.cmake)

INCLUDE_DIRECTORIES(
${CMAKE_SOURCE_DIR}/dump
)
Expand Down
6 changes: 3 additions & 3 deletions client/dump/mysql_crawler.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2015, 2016 Oracle and/or its affiliates. All rights reserved.
Copyright (c) 2015, 2018 Oracle and/or its affiliates. All rights reserved.
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
Expand Down Expand Up @@ -114,6 +114,8 @@ void Mysql_crawler::enumerate_objects()
m_dump_end_task->add_dependency(m_tables_definition_ready_dump_task);
this->process_dump_task(m_tables_definition_ready_dump_task);

this->enumerate_users();

std::vector<Database* >::iterator it;
std::vector<Database_end_dump_task* >::iterator it_end;
for (it= db_list.begin(),it_end= db_end_task_list.begin();
Expand All @@ -128,8 +130,6 @@ void Mysql_crawler::enumerate_objects()

Mysql::Tools::Base::Mysql_query_runner::cleanup_result(&databases);

this->enumerate_users();

this->process_dump_task(m_dump_end_task);

this->report_crawler_completed(this);
Expand Down
11 changes: 8 additions & 3 deletions client/mysqladmin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1559,7 +1559,7 @@ static my_bool get_pidfile(MYSQL *mysql, char *pidfile)
{
MYSQL_RES* result;

if (mysql_query(mysql, "SHOW VARIABLES LIKE 'pid_file'"))
if (mysql_query(mysql, "SELECT @@datadir, @@pid_file"))
{
my_printf_error(mysql_errno(mysql),
"The query to get the server's pid file failed,"
Expand All @@ -1570,8 +1570,13 @@ static my_bool get_pidfile(MYSQL *mysql, char *pidfile)
if (result)
{
MYSQL_ROW row=mysql_fetch_row(result);
if (row)
my_stpcpy(pidfile, row[1]);
if (row) {
char datadir[FN_REFLEN];
char pidfile_option[FN_REFLEN];
my_stpcpy(datadir, row[0]);
my_stpcpy(pidfile_option, row[1]);
(void) my_load_path(pidfile, pidfile_option, datadir);
}
mysql_free_result(result);
return row == 0; /* Error if row = 0 */
}
Expand Down
12 changes: 12 additions & 0 deletions cmake/curl.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,15 @@ MACRO(MYSQL_CHECK_CURL)
ENDIF()
ENDIF()
ENDMACRO()

MACRO (CHECK_IF_CURL_DEPENDS_ON_RTMP project_name)
EXECUTE_PROCESS(COMMAND ldd ${CURL_LIBRARY}
COMMAND grep rtmp
OUTPUT_VARIABLE CURL_DEPENDS_ON_RTMP)
IF (NOT CURL_DEPENDS_ON_RTMP STREQUAL "")
message(WARNING "Not building ${project_name}. The supplied CURL library depends on rtmp library.
Please provide CURL library that does not depend on rtmp library to build keyring_vault unittests.")
RETURN()
ENDIF()
ENDMACRO()

Loading

0 comments on commit 82cbee9

Please sign in to comment.