[packages/percona-server] - builds and works (minor cleanups needed)

arekm arekm at pld-linux.org
Fri Aug 11 12:13:58 CEST 2017


commit 0beb0def84cf26e386090cfc6d4e1e6d17a02953
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Fri Aug 11 12:13:41 2017 +0200

    - builds and works (minor cleanups needed)

 lz4.patch                          |  59 ++++++++++++++++++
 mysql-build.patch                  |  69 ---------------------
 mysql-no-default-secure-auth.patch |  98 -----------------------------
 mysql-system-libhsclient.patch     |  15 -----
 mysql-system-users.patch           |  38 ------------
 mysqld.conf                        |  15 +++--
 mysqldumpslow-clusters.patch       |  46 --------------
 percona-server.init                | 111 ++++++++++++---------------------
 percona-server.logrotate           |   8 +--
 percona-server.spec                | 123 ++++++++++++-------------------------
 x32.patch                          |  11 ----
 11 files changed, 150 insertions(+), 443 deletions(-)
---
diff --git a/percona-server.spec b/percona-server.spec
index 873148f..f842e2d 100644
--- a/percona-server.spec
+++ b/percona-server.spec
@@ -16,32 +16,6 @@
 #        /usr/README.md
 #        /usr/bin/mysqlxtest
 #        /usr/include/backup.h
-#        /usr/lib64/percona-server/plugin/keyring_udf.so
-#        /usr/lib64/percona-server/plugin/libtest_framework.so
-#        /usr/lib64/percona-server/plugin/libtest_services.so
-#        /usr/lib64/percona-server/plugin/libtest_services_threaded.so
-#        /usr/lib64/percona-server/plugin/libtest_session_detach.so
-#        /usr/lib64/percona-server/plugin/libtest_session_in_thd.so
-#        /usr/lib64/percona-server/plugin/libtest_session_info.so
-#        /usr/lib64/percona-server/plugin/libtest_sql_2_sessions.so
-#        /usr/lib64/percona-server/plugin/libtest_sql_all_col_types.so
-#        /usr/lib64/percona-server/plugin/libtest_sql_cmds_1.so
-#        /usr/lib64/percona-server/plugin/libtest_sql_commit.so
-#        /usr/lib64/percona-server/plugin/libtest_sql_complex.so
-#        /usr/lib64/percona-server/plugin/libtest_sql_errors.so
-#        /usr/lib64/percona-server/plugin/libtest_sql_lock.so
-#        /usr/lib64/percona-server/plugin/libtest_sql_processlist.so
-#        /usr/lib64/percona-server/plugin/libtest_sql_replication.so
-#        /usr/lib64/percona-server/plugin/libtest_sql_shutdown.so
-#        /usr/lib64/percona-server/plugin/libtest_sql_sqlmode.so
-#        /usr/lib64/percona-server/plugin/libtest_sql_stored_procedures_functions.so
-#        /usr/lib64/percona-server/plugin/libtest_sql_views_triggers.so
-#        /usr/lib64/percona-server/plugin/libtest_x_sessions_deinit.so
-#        /usr/lib64/percona-server/plugin/libtest_x_sessions_init.so
-#        /usr/lib64/percona-server/plugin/replication_observers_example_plugin.so
-#        /usr/lib64/percona-server/plugin/rewrite_example.so
-#        /usr/lib64/percona-server/plugin/test_security_context.so
-#        /usr/lib64/percona-server/plugin/test_udf_services.so
 # NOTE:
 # - mysql 'root' user will be 'root' not 'mysql' with 5.7 package
 #   this is to make pld consistent what the rest of the world uses.
@@ -57,6 +31,7 @@
 %bcond_without	tcpd		# libwrap (tcp_wrappers) support
 %bcond_with	sphinx		# Sphinx storage engine support
 %bcond_without	tokudb		# TokuDB
+# mysql needs boost 1.59.0 and doesn't support newer/older boost versions
 %bcond_with	system_boost	# Use system boost package
 %bcond_with	tests		# FIXME: don't run correctly
 %bcond_with	ndb		# NDB is now a separate product, this here is broken, so disable it
@@ -66,7 +41,7 @@
 %undefine	with_tokudb
 %endif
 
-%define		rel	0.1
+%define		rel	0.4
 %define		percona_rel	16
 %include	/usr/lib/rpm/macros.perl
 Summary:	Percona Server: a very fast and reliable SQL database engine
@@ -86,6 +61,10 @@ Source0:	https://www.percona.com/downloads/Percona-Server-5.7/LATEST/source/tarb
 # Source0-md5:	01a79e52b352f771ce2025b549b98d6a
 Source100:	http://www.sphinxsearch.com/files/sphinx-2.2.11-release.tar.gz
 # Source100-md5:	5cac34f3d78a9d612ca4301abfcbd666
+%if %{without system_boost}
+Source101:      http://downloads.sourceforge.net/boost/boost_1_59_0.tar.bz2
+# Source101-md5:        6aa9a5c6a4ca1016edd0ed1178e3cb87
+%endif
 Source1:	%{name}.init
 Source2:	%{name}.sysconfig
 Source3:	%{name}.logrotate
@@ -101,12 +80,9 @@ Source13:	%{name}-client.conf
 Source14:	my.cnf
 Patch0:		mysql-opt.patch
 Patch1:		mysql-versioning.patch
-Patch4:		mysql-no-default-secure-auth.patch
-Patch5:		mysql-system-libhsclient.patch
-# from fedora
-Patch6:		mysql-system-users.patch
 
-Patch9:		mysql-build.patch
+Patch7:		lz4.patch
+
 Patch11:	mysql-upgrade.patch
 Patch12:	mysql-config.patch
 Patch18:	mysql-sphinx.patch
@@ -115,22 +91,16 @@ Patch19:	mysql-chain-certs.patch
 Patch20:	mysql-dubious-exports.patch
 
 Patch24:	mysql-cmake.patch
-
-Patch26:	mysqldumpslow-clusters.patch
-Patch27:	x32.patch
 URL:		https://www.percona.com/software/mysql-database/percona-server
 BuildRequires:	bison >= 1.875
-BuildRequires:	cmake >= 2.6
+BuildRequires:	cmake >= 2.8.2
 BuildRequires:	readline-devel >= 6.2
-%if "%{pld_release}" == "ac"
-BuildRequires:	libstdc++4-devel >= 5:4.0
-%else
 BuildRequires:	libstdc++-devel >= 5:4.0
-%endif
 BuildRequires:	automake
 %{?with_system_boost:BuildRequires:	boost-devel = 1.59.0}
 BuildRequires:	libhsclient-devel
 %{?with_tcpd:BuildRequires:	libwrap-devel}
+BuildRequires:	mecab-devel
 BuildRequires:	ncurses-devel >= 4.2
 %{?with_ssl:BuildRequires:	openssl-devel >= 0.9.7d}
 BuildRequires:	pam-devel
@@ -167,7 +137,7 @@ Conflicts:	logrotate < 3.8.0
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define		_libexecdir	%{_sbindir}
-%define		_localstatedir	/var/lib/%{name}
+%define		_localstatedir	/var/lib/mysql
 %define		_perconahome	/home/services/%{name}
 
 %description
@@ -517,7 +487,7 @@ This package contains the standard Percona Server NDB CPC Daemon.
 Ten pakiet zawiera standardowego demona Percona Server NDB CPC.
 
 %prep
-%setup -q -n %{name}-%{version}-%{percona_rel} %{?with_sphinx:-a100}
+%setup -q -n %{name}-%{version}-%{percona_rel} %{?with_sphinx:-a100} %{!?with_system_boost:-a101}
 
 %patch0 -p1
 
@@ -527,24 +497,14 @@ mv sphinx-*/mysqlse storage/sphinx
 %patch18 -p1
 %endif
 %patch1 -p1
-#%patch4 -p1 STILL NEEDED?
-#%patch5 -p1 HSCLIENT NOT PRESENT?!
-#%patch6 -p1 ADD mysql_sysadmin user, drop 'mysql' user, or rotate also with 'root' user?
 
-#%patch9 -p1 PERHAPS OUTDATED?
-#%patch11 -p1 mysql_upgrade command is missing (but man page still exists!)
-#%patch12 -p1 cflags filtering, still needed? (added in 2008: a236ba89)
+%patch7 -p1
+
 %patch19 -p1
 %patch20 -p1
 
 %patch24 -p1
 
-#"mysqldumpslow.sh" is not currently compatible with Percona extended slow query
-#log format. Please use "pt-query-digest" from Percona Toolkit instead
-#(https://www.percona.com/doc/percona-toolkit/2.2/pt-query-digest.html).
-#%patch26 -p1
-#%patch27 -p1 LIKELY OUTDATED
-
 # to get these files rebuild
 [ -f sql/sql_yacc.cc ] && %{__rm} sql/sql_yacc.cc
 [ -f sql/sql_yacc.h ] && %{__rm} sql/sql_yacc.h
@@ -559,13 +519,6 @@ cd build
 # (it defaults to first cluster but user may change it to whatever
 # cluster it wants)
 
-%if "%{pld_release}" == "ac"
-# add suffix, but allow ccache, etc in ~/.rpmmacros
-%{expand:%%define	__cc	%(echo '%__cc' | sed -e 's,-gcc,-gcc4,')}
-%{expand:%%define	__cxx	%(echo '%__cxx' | sed -e 's,-g++,-g++4,')}
-%{expand:%%define	__cpp	%(echo '%__cpp' | sed -e 's,-gcc,-gcc4,')}
-%endif
-
 CPPFLAGS="%{rpmcppflags}" \
 %cmake .. \
 	-DCMAKE_BUILD_TYPE=%{!?debug:RelWithDebInfo}%{?debug:Debug} \
@@ -583,7 +536,7 @@ CPPFLAGS="%{rpmcppflags}" \
 	-DINSTALL_SUPPORTFILESDIR=share/%{name}-support \
 	-DINSTALL_MYSQLSHAREDIR=share/%{name} \
 	-DINSTALL_SECURE_FILE_PRIVDIR="" \
-	-DMYSQL_UNIX_ADDR=/var/lib/%{name}/%{name}.sock \
+	-DMYSQL_UNIX_ADDR=/var/lib/mysql/mysql.sock \
 	%{?debug:-DWITH_DEBUG=ON} \
 	-DWITHOUT_EXAMPLE_STORAGE_ENGINE=1 \
 	-DWITH_FAST_MUTEXES=ON \
@@ -592,17 +545,18 @@ CPPFLAGS="%{rpmcppflags}" \
 	-DWITH_PERFSCHEMA_STORAGE_ENGINE=1 \
 	-DWITH_PIC=ON \
 	-DWITH_SCALABILITY_METRICS=ON \
-%if "%{pld_release}" == "ac"
-	-DWITH_SSL=%{?with_ssl:bundled}%{!?with_ssl:no} \
-%else
 	-DWITH_SSL=%{?with_ssl:system}%{!?with_ssl:no} \
-%endif
 	-DWITH_UNIT_TESTS=%{?with_tests:ON}%{!?with_tests:OFF} \
 %if %{without system_boost}
-	-DDOWNLOAD_BOOST=1 -DWITH_BOOST=$(pwd)/boost \
+	%{!?with_system_boost:-DWITH_BOOST="$(pwd)/$(ls -1d ../boost_*)"} \
 %endif
 	-DWITH_ZLIB=system \
-	-DWITH_READLINE=system
+	-DWITH_READLINE=system \
+	-DWITH_LZ4=system \
+	-DWITH_LIBEVENT=system \
+	-DWITH_PROTOBUF=system \
+	-DWITH_MECAB=system \
+	-DTMPDIR=/var/tmp
 
 %{__make}
 
@@ -726,13 +680,13 @@ rm -rf $RPM_BUILD_ROOT
 
 %post
 /sbin/ldconfig
-/sbin/chkconfig --add mysql
-%service mysql restart
+/sbin/chkconfig --add %{name}
+%service %{name} restart
 
 %preun
 if [ "$1" = "0" ]; then
-	%service -q mysql stop
-	/sbin/chkconfig --del mysql
+	%service -q %{name} stop
+	/sbin/chkconfig --del %{name}
 fi
 
 %postun
@@ -743,33 +697,33 @@ if [ "$1" = "0" ]; then
 fi
 
 %post ndb
-/sbin/chkconfig --add mysql-ndb
-%service mysql-ndb restart "mysql NDB engine"
+/sbin/chkconfig --add %{name}-ndb
+%service %{name}-ndb restart "%{name} NDB engine"
 
 %preun ndb
 if [ "$1" = "0" ]; then
-	%service mysql-ndb stop
-	/sbin/chkconfig --del mysql-ndb
+	%service %{name}-ndb stop
+	/sbin/chkconfig --del %{name}-ndb
 fi
 
 %post ndb-mgm
-/sbin/chkconfig --add mysql-ndb-mgm
-%service mysql-ndb-mgm restart "mysql NDB management node"
+/sbin/chkconfig --add %{name}-ndb-mgm
+%service %{name}-ndb-mgm restart "%{name} NDB management node"
 
 %preun ndb-mgm
 if [ "$1" = "0" ]; then
-	%service mysql-ndb-mgm stop
-	/sbin/chkconfig --del mysql-ndb-mgm
+	%service %{name}-ndb-mgm stop
+	/sbin/chkconfig --del %{name}-ndb-mgm
 fi
 
 %post ndb-cpc
-/sbin/chkconfig --add mysql-ndb-cpc
-%service mysql-ndb-cpc restart "mysql NDB CPC"
+/sbin/chkconfig --add %{name}-ndb-cpc
+%service %{name}-ndb-cpc restart "mysql NDB CPC"
 
 %preun ndb-cpc
 if [ "$1" = "0" ]; then
-	%service mysql-ndb-cpc stop
-	/sbin/chkconfig --del mysql-ndb-cpc
+	%service %{name}-ndb-cpc stop
+	/sbin/chkconfig --del %{name}-ndb-cpc
 fi
 
 %post   libs -p /sbin/ldconfig
@@ -812,6 +766,7 @@ fi
 #%attr(755,root,root) %{_libdir}/%{name}/plugin/handlersocket.so
 %attr(755,root,root) %{_libdir}/%{name}/plugin/keyring_file.so
 %attr(755,root,root) %{_libdir}/%{name}/plugin/keyring_udf.so
+%attr(755,root,root) %{_libdir}/%{name}/plugin/libpluginmecab.so
 %attr(755,root,root) %{_libdir}/%{name}/plugin/libfnv1a_udf.so
 %attr(755,root,root) %{_libdir}/%{name}/plugin/libfnv_udf.so
 %attr(755,root,root) %{_libdir}/%{name}/plugin/libmurmur_udf.so
diff --git a/lz4.patch b/lz4.patch
new file mode 100644
index 0000000..792e278
--- /dev/null
+++ b/lz4.patch
@@ -0,0 +1,59 @@
+this sucks, in .c files they use "lz4" prefix, but in cmake no prefix
+
+and should really just use pkgconfig
+
+and it's iconsistent as well!
+
+--- mysql-5.7.16/cmake/lz4.cmake~	2016-09-28 20:02:44.000000000 +0300
++++ mysql-5.7.16/cmake/lz4.cmake	2016-12-12 11:37:18.923456466 +0200
+@@ -17,7 +17,7 @@
+ # bundled is the default
+ 
+ MACRO (FIND_SYSTEM_LZ4)
+-  FIND_PATH(PATH_TO_LZ4 NAMES lz4frame.h)
++  FIND_PATH(PATH_TO_LZ4 NAMES lz4/lz4frame.h)
+   FIND_LIBRARY(LZ4_SYSTEM_LIBRARY NAMES lz4)
+   IF (PATH_TO_LZ4 AND LZ4_SYSTEM_LIBRARY)
+     SET(SYSTEM_LZ4_FOUND 1)
+--- mysql-5.7.16/storage/innobase/os/os0file.cc~	2016-09-28 20:02:44.000000000 +0300
++++ mysql-5.7.16/storage/innobase/os/os0file.cc	2016-12-12 12:12:43.810635067 +0200
+@@ -70,7 +70,7 @@
+ # include <linux/falloc.h>
+ #endif /* HAVE_FALLOC_PUNCH_HOLE_AND_KEEP_SIZE */
+ 
+-#include <lz4.h>
++#include <lz4/lz4.h>
+ #include <zlib.h>
+ 
+ #ifdef UNIV_DEBUG
+@@ -8435,7 +8435,7 @@
+ #include "fil0fil.h"
+ #include "os0file.h"
+ 
+-#include <lz4.h>
++#include <lz4/lz4.h>
+ #include <zlib.h>
+ 
+ #include <my_aes.h>
+--- mysql-5.7.16/client/dump/compression_lz4_writer.h~	2016-09-28 20:02:44.000000000 +0300
++++ mysql-5.7.16/client/dump/compression_lz4_writer.h	2016-12-12 12:17:53.912464632 +0200
+@@ -21,7 +21,7 @@
+ #include "i_output_writer.h"
+ #include "abstract_output_writer_wrapper.h"
+ #include "i_callable.h"
+-#include <lz4frame.h>
++#include <lz4/lz4frame.h>
+ #include "base/mutex.h"
+ #include <string.h>
+ 
+--- mysql-5.7.17/rapid/plugin/group_replication/libmysqlgcs/src/bindings/xcom/gcs_message_stage_lz4.cc~	2016-11-28 15:32:52.000000000 +0200
++++ mysql-5.7.17/rapid/plugin/group_replication/libmysqlgcs/src/bindings/xcom/gcs_message_stage_lz4.cc	2016-12-14 16:39:53.124878289 +0200
+@@ -15,7 +15,7 @@
+ 
+ #include "gcs_internal_message.h"
+ #include "gcs_message_stage_lz4.h"
+-#include <lz4.h>
++#include <lz4/lz4.h>
+ #include <mysql/gcs/xplatform/byteorder.h>
+ #include "gcs_logging.h"
+ #include <string.h>
diff --git a/mysql-build.patch b/mysql-build.patch
deleted file mode 100644
index e50b058..0000000
--- a/mysql-build.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-diff -urNbB mysql-5.0.13-rc.org/sql/mysqld.cc mysql-5.0.13-rc/sql/mysqld.cc
---- mysql-5.0.13-rc.org/sql/mysqld.cc	2005-09-22 21:39:56.000000000 +0200
-+++ mysql-5.0.13-rc/sql/mysqld.cc	2005-09-29 19:29:59.991454000 +0200
-@@ -3183,7 +3183,7 @@
-   init_ssl();
- 
- #ifdef HAVE_LIBWRAP
--  libwrapName= my_progname+dirname_length(my_progname);
-+  libwrapName= (char *)my_progname+dirname_length(my_progname);
-   openlog(libwrapName, LOG_PID, LOG_AUTH);
- #endif
- 
---- Percona-Server-5.6.13-rel61.0/storage/innobase/row/row0log.cc~	2013-10-07 12:25:25.000000000 +0200
-+++ Percona-Server-5.6.13-rel61.0/storage/innobase/row/row0log.cc	2013-10-15 18:28:42.453836505 +0200
-@@ -2364,7 +2364,7 @@
- 		and be ignored when the operation is unsupported. */
- 		fallocate(index->online_log->fd,
- 			  FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE,
--			  ofs, srv_buf_size);
-+			  ofs, srv_sort_buf_size);
- #endif /* FALLOC_FL_PUNCH_HOLE */
- 
- 		next_mrec = index->online_log->head.block;
-@@ -3153,7 +3153,7 @@
- 		and be ignored when the operation is unsupported. */
- 		fallocate(index->online_log->fd,
- 			  FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE,
--			  ofs, srv_buf_size);
-+			  ofs, srv_sort_buf_size);
- #endif /* FALLOC_FL_PUNCH_HOLE */
- 
- 		next_mrec = index->online_log->head.block;
---- Percona-Server-5.6.13-rel61.0/sql/CMakeLists.txt~	2013-10-07 12:25:25.000000000 +0200
-+++ Percona-Server-5.6.13-rel61.0/sql/CMakeLists.txt	2013-10-15 20:37:28.259765844 +0200
-@@ -237,20 +237,20 @@
-                    log_event.cc log_event_old.cc binlog.cc sql_binlog.cc
- 		   rpl_filter.cc rpl_record.cc rpl_record_old.cc rpl_utility.cc
- 		   rpl_injector.cc)
--ADD_LIBRARY(binlog ${BINLOG_SOURCE})
-+ADD_LIBRARY(binlog STATIC ${BINLOG_SOURCE})
- SET (RPL_SOURCE rpl_handler.cc rpl_tblmap.cc)
- ADD_DEPENDENCIES(binlog GenError)
--ADD_LIBRARY(rpl ${RPL_SOURCE})
-+ADD_LIBRARY(rpl STATIC ${RPL_SOURCE})
- SET (MASTER_SOURCE rpl_master.cc)
- ADD_DEPENDENCIES(rpl GenError)
--ADD_LIBRARY(master ${MASTER_SOURCE})
-+ADD_LIBRARY(master STATIC ${MASTER_SOURCE})
- ADD_DEPENDENCIES(master GenError)
- SET (SLAVE_SOURCE rpl_slave.cc rpl_reporting.cc rpl_mi.cc rpl_rli.cc
- 		  rpl_info_handler.cc rpl_info_file.cc rpl_info_table.cc
- 		  rpl_info_values.cc rpl_info.cc rpl_info_factory.cc
- 		  rpl_info_table_access.cc dynamic_ids.cc rpl_rli_pdb.cc
- 		  rpl_info_dummy.cc)
--ADD_LIBRARY(slave ${SLAVE_SOURCE})
-+ADD_LIBRARY(slave STATIC ${SLAVE_SOURCE})
- ADD_DEPENDENCIES(slave GenError)
- ADD_LIBRARY(sqlgunitlib
-   filesort_utils.cc mdl.cc sql_list.cc sql_string.cc thr_malloc.cc
---- percona-server-5.6.28-76.1/storage/tokudb/CMakeLists.txt~	2016-01-27 21:17:38.000000000 +0100
-+++ percona-server-5.6.28-76.1/storage/tokudb/CMakeLists.txt	2016-01-28 07:23:41.844001444 +0100
-@@ -1,6 +1,7 @@
- SET(TOKUDB_VERSION 5.6.28-76.1)
- # PerconaFT only supports x86-64 and cmake-2.8.9+
- IF(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" AND
-+    "${CMAKE_SIZEOF_VOID_P}" EQUAL "8" AND
-     NOT CMAKE_VERSION VERSION_LESS "2.8.9")
- CHECK_CXX_SOURCE_COMPILES(
- "
diff --git a/mysql-no-default-secure-auth.patch b/mysql-no-default-secure-auth.patch
deleted file mode 100644
index 26cf10c..0000000
--- a/mysql-no-default-secure-auth.patch
+++ /dev/null
@@ -1,98 +0,0 @@
---- Percona-Server-5.6.14-rel62.0/client/mysql.cc~	2013-10-22 09:42:41.000000000 +0200
-+++ Percona-Server-5.6.14-rel62.0/client/mysql.cc	2013-11-23 13:20:56.986861400 +0100
-@@ -152,7 +152,7 @@
- 	       vertical=0, line_numbers=1, column_names=1,opt_html=0,
-                opt_xml=0,opt_nopager=1, opt_outfile=0, named_cmds= 0,
- 	       tty_password= 0, opt_nobeep=0, opt_reconnect=1,
--	       opt_secure_auth= TRUE,
-+	       opt_secure_auth= 0,
-                default_pager_set= 0, opt_sigint_ignore= 0,
-                auto_vertical_output= 0,
-                show_warnings= 0, executing_query= 0, interrupted_query= 0,
---- Percona-Server-5.6.14-rel62.0/client/mysql.cc~	2013-11-23 14:34:06.000000000 +0100
-+++ Percona-Server-5.6.14-rel62.0/client/mysql.cc	2013-11-23 15:25:56.195617871 +0100
-@@ -1737,7 +1737,7 @@
-    1, ULONG_MAX, 0, 1, 0},
-   {"secure-auth", OPT_SECURE_AUTH, "Refuse client connecting to server if it"
-     " uses old (pre-4.1.1) protocol.", &opt_secure_auth,
--    &opt_secure_auth, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
-+    &opt_secure_auth, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
-   {"server-arg", OPT_SERVER_ARG, "Send embedded server this as a parameter.",
-    0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
-   {"show-warnings", OPT_SHOW_WARNINGS, "Show warnings after every statement.",
---- Percona-Server-5.6.14-rel62.0/sql/sys_vars.cc~	2013-11-23 15:30:45.000000000 +0100
-+++ Percona-Server-5.6.14-rel62.0/sql/sys_vars.cc	2013-11-23 15:30:50.922370696 +0100
-@@ -2655,9 +2655,7 @@
-        "Disallow authentication for accounts that have old (pre-4.1) "
-        "passwords",
-        GLOBAL_VAR(opt_secure_auth), CMD_LINE(OPT_ARG, OPT_SECURE_AUTH),
--       DEFAULT(TRUE),
--       NO_MUTEX_GUARD, NOT_IN_BINLOG,
--       ON_CHECK(on_check_opt_secure_auth)
-+       DEFAULT(FALSE)
-        );
- 
- static Sys_var_charptr Sys_secure_file_priv(
-MySQL 5.6.11 does not allow pre-4.1.1 password hashes although the server is
-started with "skip-secure-auth option" (secure-auth mode disabled), this patch
-enables this feature again, it's a mysql_init() backport from MySQL 5.6.10.
-
-mysql> SHOW VARIABLES LIKE 'secure_auth' ;
-+---------------+-------+
-| Variable_name | Value |
-+---------------+-------+
-| secure_auth   | OFF   |
-+---------------+-------+
-
-$ mysql -uexample -pexample test
-ERROR 2049 (HY000): Connection using old (pre-4.1.1) authentication protocol refused (client option 'secure_auth' enabled)
-
-This bug has been also reported by Jørgen Thomsen: http://bugs.mysql.com/bug.php?id=69027
-
-Santi Saez 2013-04-22 / powerstack.org
-
-diff -urN mysql-5.6.11.orig/sql-common/client.c mysql-5.6.11/sql-common/client.c
---- mysql-5.6.11.orig/sql-common/client.c	2013-04-05 14:27:18.000000000 +0200
-+++ mysql-5.6.11/sql-common/client.c		2013-04-22 23:11:45.754001616 +0200
-@@ -4747,27 +4747,10 @@
- 
-   if (mysql->passwd[0])
-   {
--    /*
--       If --secure-auth option is used, throw an error.
--       Note that, we do not need to check for CLIENT_SECURE_CONNECTION
--       capability of server. If server is not capable of handling secure
--       connections, we would have raised error before reaching here.
--
--       TODO: Change following code to access MYSQL structure through
--       client-side plugin service.
--    */
--    if (mysql->options.secure_auth)
--    {
--      set_mysql_error(mysql, CR_SECURE_AUTH, unknown_sqlstate);
-+    char scrambled[SCRAMBLE_LENGTH_323 + 1];
-+    scramble_323(scrambled, (char*)pkt, mysql->passwd);
-+    if (vio->write_packet(vio, (uchar*)scrambled, SCRAMBLE_LENGTH_323 + 1))
-       DBUG_RETURN(CR_ERROR);
--    }
--    else
--    {
--      char scrambled[SCRAMBLE_LENGTH_323 + 1];
--      scramble_323(scrambled, (char*)pkt, mysql->passwd);
--      if (vio->write_packet(vio, (uchar*)scrambled, SCRAMBLE_LENGTH_323 + 1))
--        DBUG_RETURN(CR_ERROR);
--    }
-   }
-   else
-     if (vio->write_packet(vio, 0, 0)) /* no password */
---- Percona-Server-5.6.14-rel62.0/sql-common/client.c~	2013-11-29 10:48:02.000000000 +0100
-+++ Percona-Server-5.6.14-rel62.0/sql-common/client.c	2013-11-29 11:02:32.121352484 +0100
-@@ -1697,7 +1697,7 @@
-   */
-   mysql->reconnect= 0;
-  
--  mysql->options.secure_auth= TRUE;
-+  mysql->options.secure_auth= 0;
- 
-   return mysql;
- }
diff --git a/mysql-system-libhsclient.patch b/mysql-system-libhsclient.patch
deleted file mode 100644
index ca81903..0000000
--- a/mysql-system-libhsclient.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- percona-server-5.6.20-68.0/plugin/HandlerSocket-Plugin-for-MySQL/CMakeLists.txt.orig	2014-09-06 08:40:46.096111513 +0200
-+++ percona-server-5.6.20-68.0/plugin/HandlerSocket-Plugin-for-MySQL/CMakeLists.txt	2014-09-07 07:52:06.829274818 +0200
-@@ -2,10 +2,9 @@
-   STRING(REPLACE "-fno-implicit-templates" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
- ENDIF()
- ADD_DEFINITIONS(-fno-rtti -fno-exceptions -fPIC -DPIC)
--ADD_SUBDIRECTORY(libhsclient)
--INCLUDE_DIRECTORIES(libhsclient)
-+INCLUDE_DIRECTORIES(/usr/include/handlersocket)
- SET ( HANDLERSOCKET_SOURCES
-     handlersocket/database.cpp handlersocket/handlersocket.cpp handlersocket/hstcpsvr_worker.cpp handlersocket/hstcpsvr.cpp
- )
- 
--MYSQL_ADD_PLUGIN(handlersocket ${HANDLERSOCKET_SOURCES} LINK_LIBRARIES hsclient MODULE_ONLY)
-+MYSQL_ADD_PLUGIN(handlersocket ${HANDLERSOCKET_SOURCES} LINK_LIBRARIES hsclient  MODULE_ONLY)
diff --git a/mysql-system-users.patch b/mysql-system-users.patch
deleted file mode 100644
index b0331ab..0000000
--- a/mysql-system-users.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-
-test user's dropping obsoleted by mysql_security_commands.sql
-
-
---- mysql-5.5.8/scripts/mysql_system_tables_data.sql.org	2010-12-16 00:09:23.662631925 +0100
-+++ mysql-5.5.8/scripts/mysql_system_tables_data.sql	2010-12-16 00:10:17.763454969 +0100
-@@ -27,23 +27,17 @@
- SET @get_hostname= @@hostname;
- SELECT REPLACE((SELECT REPLACE(@get_hostname,'_','\_')),'%','\%') INTO @current_hostname;
- 
--
---- Fill "db" table with default grants for anyone to
---- access database 'test' and 'test_%' if "db" table didn't exist
--CREATE TEMPORARY TABLE tmp_db LIKE db;
--INSERT INTO tmp_db VALUES ('%','test','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N','Y','Y');
--INSERT INTO tmp_db VALUES ('%','test\_%','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N','Y','Y');
--INSERT INTO db SELECT * FROM tmp_db WHERE @had_db_table=0;
--DROP TABLE tmp_db;
--
--
- -- Fill "user" table with default users allowing root access
- -- from local machine if "user" table didn't exist before
- CREATE TEMPORARY TABLE tmp_user LIKE user;
--INSERT INTO tmp_user VALUES ('localhost','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'mysql_native_password','','N');
--REPLACE INTO tmp_user SELECT @current_hostname,'root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'mysql_native_password','','N' FROM dual WHERE @current_hostname != 'localhost';
--REPLACE INTO tmp_user VALUES ('127.0.0.1','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'mysql_native_password','','N');
--REPLACE INTO tmp_user VALUES ('::1','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'mysql_native_password','','N');
-+INSERT INTO tmp_user VALUES ('localhost','mysql','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'mysql_native_password','','N');
-+REPLACE INTO tmp_user SELECT @current_hostname,'mysql','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'mysql_native_password','','N' FROM dual WHERE @current_hostname != 'localhost';
-+REPLACE INTO tmp_user VALUES ('127.0.0.1','mysql','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'mysql_native_password','','N');
-+REPLACE INTO tmp_user VALUES ('::1','mysql','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0,'mysql_native_password','','N');
-+INSERT INTO tmp_user VALUES ('localhost',      'mysql_sysadmin','','N','N','N','N','N','N',/*10:Reload_priv*/'Y',/*11:Shutdown_priv*/'Y','N','N','N','N','N','N','N','N','N','N','N','N',/*24:Repl_client_priv*/'Y','N','N','N','N','N','N','N','N','','','','',0,0,0,0,'mysql_native_password','','N');
-+REPLACE INTO tmp_user SELECT @current_hostname,'mysql_sysadmin','','N','N','N','N','N','N',/*10:Reload_priv*/'Y',/*11:Shutdown_priv*/'Y','N','N','N','N','N','N','N','N','N','N','N','N',/*24:Repl_client_priv*/'Y','N','N','N','N','N','N','N','N','','','','',0,0,0,0,'mysql_native_password','','N' FROM dual WHERE @current_hostname != 'localhost';
-+REPLACE INTO tmp_user VALUES ('127.0.0.1',     'mysql_sysadmin','','N','N','N','N','N','N',/*10:Reload_priv*/'Y',/*11:Shutdown_priv*/'Y','N','N','N','N','N','N','N','N','N','N','N','N',/*24:Repl_client_priv*/'Y','N','N','N','N','N','N','N','N','','','','',0,0,0,0,'mysql_native_password','','N');
-+REPLACE INTO tmp_user VALUES ('::1',           'mysql_sysadmin','','N','N','N','N','N','N',/*10:Reload_priv*/'Y',/*11:Shutdown_priv*/'Y','N','N','N','N','N','N','N','N','N','N','N','N',/*24:Repl_client_priv*/'Y','N','N','N','N','N','N','N','N','','','','',0,0,0,0,'mysql_native_password','','N');
- INSERT INTO tmp_user (host,user) VALUES ('localhost','');
- INSERT INTO tmp_user (host,user) SELECT @current_hostname,'' FROM dual WHERE @current_hostname != 'localhost';
- INSERT INTO user SELECT * FROM tmp_user WHERE @had_user_table=0;
diff --git a/mysqld.conf b/mysqld.conf
index 4d4f2db..b00af55 100644
--- a/mysqld.conf
+++ b/mysqld.conf
@@ -123,19 +123,19 @@ skip-networking
 log-output = FILE
 
 # mysqld error log (stderr)
-log-error = /var/log/mysql/mysqld.log
+log-error = /var/log/percona-server/mysqld.log
 log-warnings = 2
 
 # Log slow queries
 slow-query-log
-slow-query-log-file = /var/log/mysql/slow.log
+slow-query-log-file = /var/log/percona-server/slow.log
 
 # Log connections and queries. It slows down MySQL so it's disabled by default
 #general-log
-#general-log-file = /var/log/mysql/query.log
+#general-log-file = /var/log/percona-server/query.log
 
 # Log all updates.
-#log-update = /var/log/mysql/update
+#log-update = /var/log/percona-server/update
 # Log some extra information to update log
 #log-long-format
 
@@ -195,7 +195,8 @@ slow-query-log-file = /var/log/mysql/slow.log
 #delay-key-write-for-all-tables
 
 # Repair automatically on open if the table wasn't closed properly.
-myisam-recover
+# http://dev.mysql.com/doc/refman/5.6/en/server-options.html#option_mysqld_myisam-recover-options
+myisam-recover-options
 #
 #myisam_sort_buffer_size=4M
 
@@ -216,9 +217,11 @@ innodb_file_per_table
 
 # these are actual defaults (as of 5.0.26)
 innodb_data_home_dir = @clusterdir@/mysqldb/db
-innodb_mirrored_log_groups=1
+innodb_data_file_path = ibdata1:10M:autoextend
 innodb_log_group_home_dir = @clusterdir@/mysqldb/db
 innodb_log_files_in_group=2
+innodb_log_file_size=5M
+innodb_log_buffer_size=1M
 
 #innodb_flush_log_at_trx_commit=1
 #innodb_log_arch_dir = @clusterdir@/innodb/log
diff --git a/mysqldumpslow-clusters.patch b/mysqldumpslow-clusters.patch
deleted file mode 100644
index 415ab93..0000000
--- a/mysqldumpslow-clusters.patch
+++ /dev/null
@@ -1,46 +0,0 @@
---- percona-server-5.6.20-68.0/scripts/mysqldumpslow.sh~	2014-08-29 10:58:05.000000000 +0300
-+++ percona-server-5.6.20-68.0/scripts/mysqldumpslow.sh	2014-09-06 20:50:22.000000000 +0300
-@@ -51,8 +51,33 @@
- 
- $opt{'help'} and usage();
- 
-+# find config file for first defined cluster
-+sub get_defaults_file {
-+	my $clusters_file = '/etc/mysql/clusters.conf';
-+	return unless -f $clusters_file;
-+
-+	open(my $fh , "< $clusters_file") or return;
-+	while (<$fh>) {
-+		my ($config, $clusterdir) = m{^([^#]+)\s*=\s*(.+)$};
-+		next unless $config;
-+
-+		if ($config !~ m{/}) {
-+			my $f = "/etc/mysql/$config";
-+			return $f if -f $f;
-+
-+			my $f = "$clusterdir/$config";
-+			return $f if -f $f;
-+		}
-+		return $config;
-+	}
-+	close($fh) or die $!;
-+	return undef;
-+}
-+
- unless (@ARGV) {
--    my $defaults   = `my_print_defaults mysqld`;
-+	my $defaults_file = get_defaults_file;
-+	my $defaults_arg = "-c $defaults_file" if $defaults_file;
-+   my $defaults   = `my_print_defaults $defaults_arg mysqld`;
-     my $basedir = ($defaults =~ m/--basedir=(.*)/)[0]
- 	or die "Can't determine basedir from 'my_print_defaults mysqld' output: $defaults";
-     warn "basedir=$basedir\n" if $opt{v};
-@@ -61,7 +86,7 @@
-     my $slowlog = ($defaults =~ m/--slow-query-log-file=(.*)/)[0];
-     if (!$datadir or $opt{i}) {
- 	# determine the datadir from the instances section of /etc/my.cnf, if any
--	my $instances  = `my_print_defaults instances`;
-+	my $instances  = `my_print_defaults $defaults_arg instances`;
- 	die "Can't determine datadir from 'my_print_defaults mysqld' output: $defaults"
- 	    unless $instances;
- 	my @instances = ($instances =~ m/^--(\w+)-/mg);
diff --git a/percona-server.init b/percona-server.init
index bcd8475..82754f7 100755
--- a/percona-server.init
+++ b/percona-server.init
@@ -80,7 +80,7 @@ else
 fi
 
 # global error log, if mysqld.conf hasn't migrated to log-error style
-MYSQL_ERRLOG=/var/log/percona-server/percona-serverd.log
+MYSQL_ERRLOG=/var/log/percona-server/mysqld.log
 MYSQL_STOP_WAIT_TIME=${MYSQL_STOP_WAIT_TIME:-900}
 
 #
@@ -125,7 +125,7 @@ mysqlstatus() {
 	fi
 
 	if [ "$mode" = "start" ]; then
-		MYSQL_GREP_PID=$(grep -alE "^/usr/sbin/percona-serverd.*${MYSQL_PIDFILE}" /proc/[0-9]*/cmdline 2> /dev/null | awk -F "/" '{ print $3; exit; }')
+		MYSQL_GREP_PID=$(grep -alE "^/usr/sbin/mysqld.*${MYSQL_PIDFILE}" /proc/[0-9]*/cmdline 2> /dev/null | awk -F "/" '{ print $3; exit; }')
 		if [ -n "$MYSQL_GREP_PID" ]; then
 			MYSQL_PID=$MYSQL_GREP_PID
 			if grep -qa "$MYSQL_PIDFILE" /proc/$MYSQL_PID/cmdline 2> /dev/null; then
@@ -160,9 +160,9 @@ mysqlgetconfig() {
 	local mode="$2"
 
 	# emulate old behaviour if only one cluster specified
-	if [ "$clusterdir" = "$MYSQL_DB_CLUSTERS" -a "$clusterdir" = "/var/lib/percona-server" -a -f /etc/percona-serverd.conf ]; then
+	if [ "$clusterdir" = "$MYSQL_DB_CLUSTERS" -a "$clusterdir" = "/var/lib/percona-server" -a -f /etc/mysqld.conf ]; then
 		MYSQL_RA_COMPAT=yes
-		config_file=/etc/percona-serverd.conf
+		config_file=/etc/mysqld.conf
 	else
 		local config=$(awk -F= -vclusterdir="$clusterdir" '!/^#/{ if (clusterdir == $2) print $1}' /etc/percona-server/clusters.conf)
 		if [[ $config = /* ]]; then
@@ -170,7 +170,7 @@ mysqlgetconfig() {
 		elif [ -f "/etc/percona-server/$config" ]; then
 			config_file="/etc/percona-server/$config"
 		else
-			config_file="$clusterdir/percona-serverd.conf"
+			config_file="$clusterdir/mysqld.conf"
 		fi
 	fi
 
@@ -251,7 +251,7 @@ mysqlgetconfig() {
 	if is_yes "$MYSQL_RA_COMPAT"; then
 		MYSQL_DATA_DIR_SUB=""
 	else
-		MYSQL_DATA_DIR_SUB="/percona-serverdb"
+		MYSQL_DATA_DIR_SUB="/mysqldb"
 	fi
 
 	if [ -z "$MYSQL_DATA_DIR" -o "$MYSQL_DATA_DIR" != "${clusterdir}${MYSQL_DATA_DIR_SUB}/db" ]; then
@@ -260,8 +260,8 @@ mysqlgetconfig() {
 		exit 6
 	fi
 
-	if [ -z "$MYSQL_PIDFILE" -o "$MYSQL_PIDFILE" != "$clusterdir${MYSQL_DATA_DIR_SUB}/percona-server.pid" ]; then
-		nls "Error: pid-file specified in %s should be %s" "$config_file" "$clusterdir${MYSQL_DATA_DIR_SUB}/percona-server.pid"
+	if [ -z "$MYSQL_PIDFILE" -o "$MYSQL_PIDFILE" != "$clusterdir${MYSQL_DATA_DIR_SUB}/mysql.pid" ]; then
+		nls "Error: pid-file specified in %s should be %s" "$config_file" "$clusterdir${MYSQL_DATA_DIR_SUB}/mysql.pid"
 		nls " percona-server can't be run."
 		exit 6
 	fi
@@ -277,7 +277,7 @@ mysqlgetconfig() {
 mysqlstart() {
 	local clusterdir="$1"
 	mysqlgetconfig "$clusterdir"
-	if [ ! -d "$MYSQL_DATA_DIR/percona-server" ]; then
+	if [ ! -d "$MYSQL_DATA_DIR/mysql" ]; then
 		nls "percona-server cluster %s not initialized." "$clusterdir"
 		nls "Try \`%s init %s' before start." "$0" "$clusterdir"
 		exit 6
@@ -289,7 +289,7 @@ mysqlstart() {
 
 
 	TMPDIR=/tmp nice -n ${SERVICE_RUN_NICE_LEVEL:-$DEFAULT_SERVICE_RUN_NICE_LEVEL} \
-		/usr/bin/setsid /usr/sbin/percona-serverd \
+		/usr/bin/setsid /usr/sbin/mysqld \
 			--defaults-file=$MYSQL_CONFIG \
 			--datadir=$MYSQL_DATA_DIR \
 			--pid-file=$MYSQL_PIDFILE \
@@ -436,23 +436,23 @@ mysqlsubsys() {
 mysqlinit() {
 	local clusterdir="$1"
 
-	if [ -f /etc/percona-serverd.conf ]; then
+	if [ -f /etc/mysqld.conf ]; then
 		nls "Running in \`no cluster compat' mode: can't initialize database."
-		nls "Move /etc/percona-serverd.conf away and rerun \`$0 init' (new config will be in $clusterdir)."
+		nls "Move /etc/mysqld.conf away and rerun \`$0 init' (new config will be in $clusterdir)."
 		exit 1
 	fi
 
-	if [ -f "$clusterdir/percona-serverd.conf" ]; then
+	if [ -f "$clusterdir/mysqld.conf" ]; then
 		mysqlgetconfig "$clusterdir"
 	else
 		MYSQL_USER="mysql"
 		MYSQL_CLUSTER_DIR="$clusterdir"
-		MYSQL_DATA_DIR="$clusterdir/percona-serverdb/db"
-		MYSQL_PIDFILE="$clusterdir/percona-serverdb/percona-server.pid"
-		MYSQL_SOCKET="$clusterdir/percona-serverdb/percona-server.sock"
+		MYSQL_DATA_DIR="$clusterdir/mysqldb/db"
+		MYSQL_PIDFILE="$clusterdir/mysqldb/mysql.pid"
+		MYSQL_SOCKET="$clusterdir/mysqldb/mysql.sock"
 
 		# this $MYSQL_CONFIG will be created later
-		MYSQL_CONFIG="$MYSQL_CLUSTER_DIR/percona-serverd.conf"
+		MYSQL_CONFIG="$MYSQL_CLUSTER_DIR/mysqld.conf"
 	fi
 
 	show "Initializing cluster %s" "$clusterdir"; started
@@ -472,42 +472,34 @@ mysqlinit() {
 	mkdir -p "$MYSQL_DATA_DIR" > /dev/null 2>&1
 	# Using mysql:mysql for MYSQL_CLUSTER_DIR is creating SECURITY hole, root:root is proper
 	chown root:root "$MYSQL_CLUSTER_DIR"
-	chown mysql:mysql "$MYSQL_CLUSTER_DIR/percona-serverdb" "$MYSQL_DATA_DIR" > /dev/null 2>&1
-	chmod 751 "$MYSQL_CLUSTER_DIR" "$MYSQL_CLUSTER_DIR/percona-serverdb"
+	chown mysql:mysql "$MYSQL_CLUSTER_DIR/mysqldb" "$MYSQL_DATA_DIR" > /dev/null 2>&1
+	chmod 751 "$MYSQL_CLUSTER_DIR" "$MYSQL_CLUSTER_DIR/mysqldb"
 
-	if [ -f $sharedir/percona-serverd.conf -a ! -f "$MYSQL_CLUSTER_DIR/percona-serverd.conf" ]; then
+	if [ -f $sharedir/mysqld.conf -a ! -f "$MYSQL_CLUSTER_DIR/mysqld.conf" ]; then
 		sed -e "
 			s#\(datadir.*\)=.*#\1= $MYSQL_DATA_DIR#g;
 			s#\(pid-file.*\)=.*#\1= $MYSQL_PIDFILE#g;
 			s#\(socket.*\)=.*#\1= $MYSQL_SOCKET#g;
 			s#@clusterdir@#$MYSQL_CLUSTER_DIR#g;
-		" $sharedir/percona-serverd.conf > "$MYSQL_CLUSTER_DIR/percona-serverd.conf"
-		chown root:root "$MYSQL_CLUSTER_DIR/percona-serverd.conf"
-		chmod 640 "$MYSQL_CLUSTER_DIR/percona-serverd.conf"
+		" $sharedir/mysqld.conf > "$MYSQL_CLUSTER_DIR/mysqld.conf"
+		chown root:root "$MYSQL_CLUSTER_DIR/mysqld.conf"
+		chmod 640 "$MYSQL_CLUSTER_DIR/mysqld.conf"
 	fi
 
-	cat > $MYSQL_DATA_DIR/percona-server-init.sql <<-EOF
-		CREATE DATABASE mysql;
-		use mysql;
-		$(cat $sharedir/percona-server_system_tables.sql)
-		$(sed -e "/@current_hostname/d" $sharedir/percona-server_system_tables_data.sql)
-EOF
-
 	ok=0
-	/usr/sbin/percona-serverd \
-		--defaults-file=$MYSQL_CLUSTER_DIR/percona-serverd.conf \
-		--bootstrap \
+	/usr/sbin/mysqld \
+		--defaults-file=$MYSQL_CLUSTER_DIR/mysqld.conf \
+		--initialize \
+		--user=mysql \
 		--skip-grant-tables \
 		--datadir=$MYSQL_DATA_DIR \
 		--user=$MYSQL_USER \
 		--slave-load-tmpdir=$MYSQL_DATA_DIR \
 		--tmpdir=$MYSQL_DATA_DIR \
-		--log-error=$MYSQL_ERRLOG \
-		< $MYSQL_DATA_DIR/percona-server-init.sql && ok=1
-	[ -f $MYSQL_DATA_DIR/percona-server/user.frm ] || ok=0
+		--log-error=$MYSQL_ERRLOG && ok=1
+	[ -f $MYSQL_DATA_DIR/mysql/user.frm ] || ok=0
 
 	if [ "$ok" = 1 ]; then
-		rm -f $MYSQL_DATA_DIR/percona-server-init.sql
 		ok
 		cat << END_OF_MSG
 
@@ -526,40 +518,15 @@ mysqladmin section. See the manual for more instructions.
 (This user is used at logs rotation and server shutdown)
 
 END_OF_MSG
-		show "Filling help tables..."
-		ok=0
-		( echo "use mysql;"; cat $sharedir/fill_help_tables.sql ) | \
-			/usr/sbin/percona-serverd \
-			--defaults-file=$MYSQL_CLUSTER_DIR/percona-serverd.conf \
-			--bootstrap \
-			--skip-grant-tables \
-			--datadir=$MYSQL_DATA_DIR \
-			--user=$MYSQL_USER \
-			--slave-load-tmpdir=$MYSQL_DATA_DIR \
-			--tmpdir=$MYSQL_DATA_DIR \
-			--log-error=$MYSQL_ERRLOG \
-			&& ok=1
-		if [ "$ok" = 1 ]; then
-			ok
-		else
-			cat << END_OF_MSG
-
-WARNING: HELP FILES ARE NOT COMPLETELY INSTALLED!
-The "HELP" command might not work properly.
-
-END_OF_MSG
-		fi
 	else
 		fail
 		cat << END_OF_MSG
 ERROR:
 ERROR:
-ERROR: Installation of grant tables FAILED!
+ERROR: Initialization of server FAILED!
 ERROR:
 ERROR:
 
-The initialization SQL script was preserved at $MYSQL_DATA_DIR/percona-server-init.sql
-
 Examine the logs in /var/log/percona-server for more information. You can
 also try to start the mysqld daemon with:
 
@@ -572,7 +539,7 @@ shell> mysql -u mysql mysql
 mysql> show tables
 
 Try 'mysqld --help' if you have problems with paths. Setting on
-logging in $MYSQL_DATA_DIR/percona-serverd.conf gives you a log in /var/log/percona-server/query.log that
+logging in $MYSQL_DATA_DIR/mysqld.conf gives you a log in /var/log/percona-server/query.log that
 may be helpful. The latest information about percona-server is available on the
 web at https://www.percona.com/software/mysql-database/percona-server.
 
@@ -587,13 +554,13 @@ END_OF_MSG
 	fi
 
 	# if it's first server, register as default
-	if [ ! -e /var/lib/percona-server/percona-server.sock ] || [ -L /var/lib/percona-server/percona-server.sock ] && [ -z "$(readlink /var/lib/percona-server/percona-server.sock)" ]; then
-		sock=${MYSQL_SOCKET#/var/lib/percona-server/} # make it relative if possible
-		ln -s "$sock" /var/lib/percona-server/percona-server.sock
+	if [ ! -e /var/lib/mysql/mysql.sock ] || [ -L /var/lib/mysql/mysql.sock ] && [ -z "$(readlink /var/lib/mysql/mysql.sock)" ]; then
+		sock=${MYSQL_SOCKET#/var/lib/mysql/} # make it relative if possible
+		ln -s "$sock" /var/lib/mysql/mysql.sock
 	fi
 	# same for config, move to /etc
-	if [ ! -e /etc/percona-server/percona-serverd.conf ]; then
-		mv "$MYSQL_CLUSTER_DIR/percona-serverd.conf" /etc/percona-server/percona-serverd.conf
+	if [ ! -e /etc/percona-server/mysqld.conf ]; then
+		mv "$MYSQL_CLUSTER_DIR/mysqld.conf" /etc/percona-server/mysqld.conf
 	fi
 }
 
@@ -647,7 +614,7 @@ status() {
 			RETVAL=0
 			addr=${MYSQL_BIND_ADDRESS:-0.0.0.0}
 			port=${MYSQL_PORT:-3306}
-			socket=${MYSQL_SOCKET:-/var/lib/percona-server/percona-server.sock}
+			socket=${MYSQL_SOCKET:-/var/lib/mysql/mysql.sock}
 			pid=$MYSQL_PID
 			nls "percona-server cluster %s, pid %s\n" "$mysqldir" "$pid"
 			[ -z "$MYSQL_SKIP_NETWORKING" ] && nls "\ttcp:%s:%s\n" "$addr" "$port"
@@ -676,12 +643,12 @@ status() {
 		for pid in $running; do
 			datadir=$(cat /proc/$pid/cmdline | tr '\0' '\n' | fgrep -- --datadir=)
 			datadir=${datadir#--datadir=} # strip --datadir
-			mysqldir=${datadir%/percona-serverdb/db} # strip /percona-serverdb/db
+			mysqldir=${datadir%/mysqldb/db} # strip /mysqldb/db
 			mysqlstatus "$mysqldir"
 			if [ "$MYSQL_STATUS" = "running" ]; then
 				addr=${MYSQL_BIND_ADDRESS:-0.0.0.0}
 				port=${MYSQL_PORT:-3306}
-				socket=${MYSQL_SOCKET:-/var/lib/percona-server/percona-server.sock}
+				socket=${MYSQL_SOCKET:-/var/lib/mysql/mysql.sock}
 				nls "percona-server cluster %s, pid %s\n" "$mysqldir" "$pid"
 				[ -z "$MYSQL_SKIP_NETWORKING" ] && nls "\ttcp:%s:%s\n" "$addr" "$port"
 				nls "\tunix: %s\n" "$socket"
diff --git a/percona-server.logrotate b/percona-server.logrotate
index 4bb78ce..f723f80 100644
--- a/percona-server.logrotate
+++ b/percona-server.logrotate
@@ -11,10 +11,10 @@
 #
 # You must do this for every active cluster defined in /etc/mysql/clusters.conf
 
-/var/log/mysql/query.log
-/var/log/mysql/mysqld.log
-/var/log/mysql/slow.log
-/var/log/mysql/update*
+/var/log/percona-server/query.log
+/var/log/percona-server/mysqld.log
+/var/log/percona-server/slow.log
+/var/log/percona-server/update*
 {
 	olddir /var/log/archive/mysql
 	notifempty
diff --git a/x32.patch b/x32.patch
deleted file mode 100644
index 304e262..0000000
--- a/x32.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- percona-server-5.6.21-70.1/include/m_string.h~	2014-12-28 15:51:15.000000000 +0000
-+++ percona-server-5.6.21-70.1/include/m_string.h	2014-12-28 17:47:02.185659146 +0000
-@@ -252,7 +252,7 @@
-    @return          the last non-space character
- */
- 
--#ifdef __x86_64__
-+#if defined(__x86_64__) && !defined(__ILP32__)
- 
- #if SIZEOF_LONG != 8
- # error "SIZEOF_LONG != 8"
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/percona-server.git/commitdiff/0beb0def84cf26e386090cfc6d4e1e6d17a02953




More information about the pld-cvs-commit mailing list