[packages/mysql] - up to 5.7.16; builds here; starts but upgrade not tested at all; switch default user to root (as u
arekm
arekm at pld-linux.org
Fri Oct 28 19:10:10 CEST 2016
commit 416b5906d364728d79e3791ebcb35381d6af2652
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Fri Oct 28 19:09:59 2016 +0200
- up to 5.7.16; builds here; starts but upgrade not tested at all; switch default user to root (as upstream); drop obsolete patches
mysql-5.7-sphinx.patch | 234 +++++++++++++++++++++++++++++++++++++
mysql-build.patch | 57 ---------
mysql-config.patch | 32 -----
mysql-dubious-exports.patch | 59 ----------
mysql-no-default-secure-auth.patch | 98 ----------------
mysql-system-libhsclient.patch | 15 ---
mysql-system-users.patch | 34 ------
mysql-upgrade.patch | 36 ------
mysql-versioning.patch | 15 ---
mysql.init | 32 ++---
mysql.spec | 46 ++------
x32.patch | 11 --
12 files changed, 264 insertions(+), 405 deletions(-)
---
diff --git a/mysql.spec b/mysql.spec
index 50e3e15..74f607b 100644
--- a/mysql.spec
+++ b/mysql.spec
@@ -20,7 +20,7 @@
%bcond_without systemtap # systemtap/dtrace probes
%bcond_without tcpd # libwrap (tcp_wrappers) support
%bcond_without sphinx # Sphinx storage engine support
-# drop system_boost functionality after we start using boost 1.59 in PLD
+# mysql needs boost 1.59.0 and doesn't support newer/older boost versions
%bcond_with system_boost
%bcond_with tests # FIXME: don't run correctly
%bcond_with ndb # NDB is now a separate product, this here is broken, so disable it
@@ -36,17 +36,17 @@ Summary(ru.UTF-8): MySQL - быстрый SQL-сервер
Summary(uk.UTF-8): MySQL - швидкий SQL-сервер
Summary(zh_CN.UTF-8): MySQL数据库服务器
Name: mysql
-Version: 5.7.9
+Version: 5.7.16
Release: %{rel}
License: GPL + MySQL FLOSS Exception
Group: Applications/Databases
Source0: http://cdn.mysql.com/Downloads/MySQL-5.7/%{name}-%{version}.tar.gz
-# Source0-md5: 6d782dda9046acb81e694934fd513993
-Source100: http://www.sphinxsearch.com/files/sphinx-2.2.10-release.tar.gz
-# Source100-md5: dda52b24d8348fc09e26d8a649a231d2
+# Source0-md5: dbd5b1b19c2d285f87258ca446d4a7fe
+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/project/boost/boost/1.59.0/boost_1_59_0.tar.bz2
-# Source101-md5: 6aa9a5c6a4ca1016edd0ed1178e3cb87
+# Source101-md5: 6aa9a5c6a4ca1016edd0ed1178e3cb87
%endif
Source1: %{name}.init
Source2: %{name}.sysconfig
@@ -62,25 +62,14 @@ Source12: %{name}-ndb-cpc.sysconfig
Source13: %{name}-client.conf
Source14: my.cnf
Patch0: %{name}-opt.patch
-Patch1: %{name}-versioning.patch
-Patch4: %{name}-no-default-secure-auth.patch
-Patch5: %{name}-system-libhsclient.patch
-# from fedora
-Patch6: %{name}-system-users.patch
-
-Patch9: %{name}-build.patch
-Patch11: %{name}-upgrade.patch
-Patch12: %{name}-config.patch
+Patch17: %{name}-5.7-sphinx.patch
Patch18: %{name}-sphinx.patch
Patch19: %{name}-chain-certs.patch
-# from fedora
-Patch20: %{name}-dubious-exports.patch
Patch24: %{name}-cmake.patch
Patch26: mysqldumpslow-clusters.patch
-Patch27: x32.patch
URL: http://www.mysql.com/products/community/
BuildRequires: bison >= 1.875
%{?with_system_boost:BuildRequires: boost-devel >= 1.59.0}
@@ -479,35 +468,21 @@ Ten pakiet zawiera standardowego demona MySQL NDB CPC.
%if %{with sphinx}
# http://www.sphinxsearch.com/docs/manual-0.9.9.html#sphinxse-mysql51
mv sphinx-*/mysqlse storage/sphinx
+%patch17 -p1
%patch18 -p1
%endif
-#%patch1 -p1
-#%patch4 -p1 FIXME?
-#%patch5 -p1
-#%patch6 -p1 PROBABLY OBSOLETE
-
-%patch9 -p1
-#%patch11 -p1
-#%patch12 -p1
# really not fixed? verify
%patch19 -p1
-#%patch20 -p1
-
%patch24 -p1
%patch26 -p1
-#%patch27 -p1
# 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
-# FIXME/CHECK
-# map has more sane versioning that default "global everything" in ver.in
-#cp -p libmysql/libmysql.map libmysql/libmysql.ver.in
-
%build
install -d build
cd build
@@ -921,9 +896,12 @@ done
%attr(755,root,root) %{_libdir}/%{name}/plugin/auth.so
%attr(755,root,root) %{_libdir}/%{name}/plugin/auth_socket.so
%attr(755,root,root) %{_libdir}/%{name}/plugin/auth_test_plugin.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/locking_service.so
%attr(755,root,root) %{_libdir}/%{name}/plugin/mypluglib.so
%attr(755,root,root) %{_libdir}/%{name}/plugin/mysql_no_login.so
+%attr(755,root,root) %{_libdir}/%{name}/plugin/mysqlx.so
%attr(755,root,root) %{_libdir}/%{name}/plugin/qa_auth_client.so
%attr(755,root,root) %{_libdir}/%{name}/plugin/qa_auth_interface.so
%attr(755,root,root) %{_libdir}/%{name}/plugin/qa_auth_server.so
@@ -936,8 +914,6 @@ done
%if %{with sphinx}
%attr(755,root,root) %{_libdir}/%{name}/plugin/ha_sphinx.so
%endif
-# for plugins
-%attr(755,root,root) %{_libdir}/libmysqlservices.so
%{_mandir}/man1/innochecksum.1*
%{_mandir}/man1/my_print_defaults.1*
%{_mandir}/man1/myisamchk.1*
diff --git a/mysql-5.7-sphinx.patch b/mysql-5.7-sphinx.patch
new file mode 100644
index 0000000..a47ed9d
--- /dev/null
+++ b/mysql-5.7-sphinx.patch
@@ -0,0 +1,234 @@
+From d4273a352d22e8c5e924bc4fd094fc7d9f8e047f Mon Sep 17 00:00:00 2001
+From: riden <denis.doronin at gmail.com>
+Date: Thu, 26 Nov 2015 03:51:40 +0200
+Subject: [PATCH] MySQLSE MySQL 5.7 support
+
+---
+ mysqlse/ha_sphinx.cc | 66 ++++++++++++++++++++++++++++++++++++++-----------
+ mysqlse/snippets_udf.cc | 22 +++++++++++++----
+ 2 files changed, 68 insertions(+), 20 deletions(-)
+
+diff --git a/storage/sphinx/ha_sphinx.cc b/storage/sphinx/ha_sphinx.cc
+index 8eabe87..e6a49a8 100644
+--- a/storage/sphinx/ha_sphinx.cc
++++ b/storage/sphinx/ha_sphinx.cc
+@@ -34,13 +34,37 @@
+ #include "../mysql_priv.h"
+ #endif
+
++#if MYSQL_VERSION_ID>=50709
++#include "item_timefunc.h"
++#define sphinx_append push_back
++#define sphinx_array std::vector
++#define sphinx_elements size
++#if defined(_WIN32)
++#define __WIN__ _WIN32
++#define pthread_mutex_init(A,B) (InitializeCriticalSection(A),0)
++#define pthread_mutex_lock(A) (EnterCriticalSection(A),0)
++#define pthread_mutex_unlock(A) (LeaveCriticalSection(A), 0)
++#define pthread_mutex_destroy(A) (DeleteCriticalSection(A), 0)
++#define in_addr_t uint32
++#include <winsock2.h>
++#endif
++#else
++#define sphinx_append append
++#define sphinx_array Dynamic_array
++#define sphinx_elements elements
++#endif
++
+ #include <mysys_err.h>
+ #include <my_sys.h>
+ #include <mysql.h> // include client for INSERT table (sort of redoing federated..)
+
+ #ifndef __WIN__
+ // UNIX-specific
+- #include <my_net.h>
++ #if MYSQL_VERSION_ID>=50709
++ #include <arpa/inet.h>
++ #else
++ #include <my_net.h>
++ #endif
+ #include <netdb.h>
+ #include <sys/un.h>
+
+@@ -286,6 +310,12 @@ inline void SPH_DEBUG ( const char *, ... ) {}
+ #define SafeDelete(_arg) { if ( _arg ) delete ( _arg ); (_arg) = NULL; }
+ #define SafeDeleteArray(_arg) { if ( _arg ) delete [] ( _arg ); (_arg) = NULL; }
+
++#if MYSQL_VERSION_ID>=50709
++#ifdef __WIN__
++typedef native_mutex_t pthread_mutex_t;
++#endif
++#endif
++
+ //////////////////////////////////////////////////////////////////////////////
+
+ /// per-table structure that will be shared among all open Sphinx SE handlers
+@@ -602,10 +632,10 @@ struct CSphSEQuery
+ };
+ char * m_sName; ///< points to query buffer
+ int m_iType;
+- Dynamic_array<ulonglong> m_dIds;
+- Dynamic_array<Value_t> m_dValues;
++ sphinx_array<ulonglong> m_dIds;
++ sphinx_array<Value_t> m_dValues;
+ };
+- Dynamic_array<Override_t *> m_dOverrides;
++ sphinx_array<Override_t *> m_dOverrides;
+
+ public:
+ char m_sParseError[256];
+@@ -733,9 +763,13 @@ static int sphinx_init_func ( void * p )
+ {
+ sphinx_init = 1;
+ void ( pthread_mutex_init ( &sphinx_mutex, MY_MUTEX_INIT_FAST ) );
++ #if MYSQL_VERSION_ID >= 50709
++ sphinx_hash_init ( &sphinx_open_tables, system_charset_info, 32, 0, 0,
++ sphinx_get_key, 0, 0, 0 );
++ #else
+ sphinx_hash_init ( &sphinx_open_tables, system_charset_info, 32, 0, 0,
+ sphinx_get_key, 0, 0 );
+-
++ #endif
+ #if MYSQL_VERSION_ID > 50100
+ handlerton * hton = (handlerton*) p;
+ hton->state = SHOW_OPTION_YES;
+@@ -1321,7 +1355,7 @@ CSphSEQuery::~CSphSEQuery ()
+ SafeDeleteArray ( m_sQueryBuffer );
+ SafeDeleteArray ( m_pWeights );
+ SafeDeleteArray ( m_pBuf );
+- for ( int i=0; i<m_dOverrides.elements(); i++ )
++ for ( int i=0; i<m_dOverrides.sphinx_elements(); i++ )
+ SafeDelete ( m_dOverrides.at(i) );
+ SPH_VOID_RET();
+ }
+@@ -1789,7 +1823,7 @@ bool CSphSEQuery::ParseField ( char * sField )
+ pOverride = new CSphSEQuery::Override_t;
+ pOverride->m_sName = chop(sName);
+ pOverride->m_iType = iType;
+- m_dOverrides.append ( pOverride );
++ m_dOverrides.sphinx_append ( pOverride );
+ }
+
+ ulonglong uId = strtoull ( sId, NULL, 10 );
+@@ -1801,8 +1835,8 @@ bool CSphSEQuery::ParseField ( char * sField )
+ else
+ tValue.m_uValue = (uint32)strtoul ( sValue, NULL, 10 );
+
+- pOverride->m_dIds.append ( uId );
+- pOverride->m_dValues.append ( tValue );
++ pOverride->m_dIds.sphinx_append ( uId );
++ pOverride->m_dValues.sphinx_append ( tValue );
+ }
+
+ if ( !pOverride )
+@@ -1906,11 +1940,11 @@ int CSphSEQuery::BuildRequest ( char ** ppBuffer )
+ iReqSize += 8 + strlen(m_sFieldWeight[i] );
+ // overrides
+ iReqSize += 4;
+- for ( int i=0; i<m_dOverrides.elements(); i++ )
++ for ( int i=0; i<m_dOverrides.sphinx_elements(); i++ )
+ {
+ CSphSEQuery::Override_t * pOverride = m_dOverrides.at(i);
+ const uint32 uSize = pOverride->m_iType==SPH_ATTR_BIGINT ? 16 : 12; // id64 + value
+- iReqSize += strlen ( pOverride->m_sName ) + 12 + uSize*pOverride->m_dIds.elements();
++ iReqSize += strlen ( pOverride->m_sName ) + 12 + uSize*pOverride->m_dIds.sphinx_elements();
+ }
+ // select
+ iReqSize += 4;
+@@ -2012,14 +2046,14 @@ int CSphSEQuery::BuildRequest ( char ** ppBuffer )
+ SendString ( m_sComment );
+
+ // overrides
+- SendInt ( m_dOverrides.elements() );
+- for ( int i=0; i<m_dOverrides.elements(); i++ )
++ SendInt ( m_dOverrides.sphinx_elements() );
++ for ( int i=0; i<m_dOverrides.sphinx_elements(); i++ )
+ {
+ CSphSEQuery::Override_t * pOverride = m_dOverrides.at(i);
+ SendString ( pOverride->m_sName );
+ SendDword ( pOverride->m_iType );
+- SendInt ( pOverride->m_dIds.elements() );
+- for ( int j=0; j<pOverride->m_dIds.elements(); j++ )
++ SendInt ( pOverride->m_dIds.sphinx_elements() );
++ for ( int j=0; j<pOverride->m_dIds.sphinx_elements(); j++ )
+ {
+ SendUint64 ( pOverride->m_dIds.at(j) );
+ if ( pOverride->m_iType==SPH_ATTR_FLOAT )
+@@ -2073,8 +2107,10 @@ ha_sphinx::ha_sphinx ( handlerton * hton, TABLE_ARG * table )
+ , m_dUnboundFields ( NULL )
+ {
+ SPH_ENTER_METHOD();
++ #if MYSQL_VERSION_ID < 50709
+ if ( current_thd )
+ current_thd->variables.engine_condition_pushdown = true;
++ #endif
+ SPH_VOID_RET();
+ }
+
+diff --git a/storage/sphinx/snippets_udf.cc b/storage/sphinx/snippets_udf.cc
+index d0899e8..e9f7bc0 100644
+--- a/storage/sphinx/snippets_udf.cc
++++ b/storage/sphinx/snippets_udf.cc
+@@ -17,13 +17,16 @@
+ #include <string.h>
+ #include <assert.h>
+
+-#ifndef __WIN__
++#include <mysql_version.h>
++
++#ifndef _WIN32
++#if MYSQL_VERSION_ID>=50709
++#include <arpa/inet.h>
++#endif
+ #include <sys/un.h>
+ #include <netdb.h>
+ #endif
+
+-#include <mysql_version.h>
+-
+ #if MYSQL_VERSION_ID>=50515
+ #include "sql_class.h"
+ #include "sql_array.h"
+@@ -34,6 +37,13 @@
+ #include "../mysql_priv.h"
+ #endif
+
++#ifdef _WIN32
++#if MYSQL_VERSION_ID>=50709
++#define in_addr_t uint32
++#include <winsock2.h>
++#endif
++#endif
++
+ #include <mysys_err.h>
+ #include <my_sys.h>
+
+@@ -90,7 +100,9 @@ void sphUnalignedWrite ( void * pPtr, const T & tVal )
+
+ #define Min(a,b) ((a)<(b)?(a):(b))
+
++#if !defined(_WIN32)
+ typedef unsigned int DWORD;
++#endif
+
+ inline DWORD sphF2DW ( float f ) { union { float f; uint32 d; } u; u.f = f; return u.d; }
+
+@@ -359,7 +371,7 @@ bool CSphUrl::Parse ( const char * sUrl, int iLen )
+ int CSphUrl::Connect()
+ {
+ struct sockaddr_in sin;
+-#ifndef __WIN__
++#ifndef _WIN32
+ struct sockaddr_un saun;
+ #endif
+
+@@ -426,7 +438,7 @@ int CSphUrl::Connect()
+ }
+ } else
+ {
+-#ifndef __WIN__
++#ifndef _WIN32
+ iDomain = AF_UNIX;
+ iSockaddrSize = sizeof(saun);
+ pSockaddr = (struct sockaddr *) &saun;
diff --git a/mysql-build.patch b/mysql-build.patch
deleted file mode 100644
index 84970fb..0000000
--- a/mysql-build.patch
+++ /dev/null
@@ -1,57 +0,0 @@
---- mysql-5.7.9/sql/CMakeLists.txt~ 2015-10-12 08:21:35.000000000 +0200
-+++ mysql-5.7.9/sql/CMakeLists.txt 2015-10-22 13:35:37.172783012 +0200
-@@ -335,7 +335,7 @@
- )
- ENDIF()
-
--ADD_LIBRARY(sql STATIC ${SQL_SOURCE})
-+ADD_CONVENIENCE_LIBRARY(sql STATIC ${SQL_SOURCE})
- ADD_DEPENDENCIES(sql GenServerSource)
- ADD_DEPENDENCIES(sql GenDigestServerSource)
- ADD_DEPENDENCIES(sql GenBootstrapPriv)
-@@ -362,15 +362,15 @@
- 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 rpl_table_access.cc)
--ADD_LIBRARY(binlog ${BINLOG_SOURCE})
-+ADD_CONVENIENCE_LIBRARY(binlog ${BINLOG_SOURCE})
- TARGET_LINK_LIBRARIES(binlog binlogevents_static)
-
- SET (RPL_SOURCE rpl_handler.cc rpl_tblmap.cc rpl_context.cc)
- ADD_DEPENDENCIES(binlog GenError)
--ADD_LIBRARY(rpl ${RPL_SOURCE})
-+ADD_CONVENIENCE_LIBRARY(rpl ${RPL_SOURCE})
- SET (MASTER_SOURCE rpl_master.cc rpl_binlog_sender.cc)
- ADD_DEPENDENCIES(rpl GenError)
--ADD_LIBRARY(master ${MASTER_SOURCE})
-+ADD_CONVENIENCE_LIBRARY(master ${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
-@@ -379,7 +379,7 @@
- rpl_rli_pdb.cc rpl_info_dummy.cc rpl_mts_submode.cc
- rpl_slave_commit_order_manager.cc rpl_msr.cc
- rpl_trx_boundary_parser.cc rpl_channel_service_interface.cc)
--ADD_LIBRARY(slave ${SLAVE_SOURCE})
-+ADD_CONVENIENCE_LIBRARY(slave ${SLAVE_SOURCE})
- ADD_DEPENDENCIES(slave GenError)
-
- ######################### GUnit Lib #################################
-@@ -396,7 +396,7 @@
- LIST(APPEND SQL_GUNIT_LIB_SOURCE named_pipe.cc)
- ENDIF()
-
--ADD_LIBRARY(sqlgunitlib ${SQL_GUNIT_LIB_SOURCE})
-+ADD_CONVENIENCE_LIBRARY(sqlgunitlib ${SQL_GUNIT_LIB_SOURCE})
- ADD_DEPENDENCIES(sqlgunitlib GenError)
-
- ######################### GUnit Lib #################################
-@@ -558,7 +558,7 @@
-
-
- IF(WIN32 OR HAVE_DLOPEN AND NOT DISABLE_SHARED)
-- ADD_LIBRARY(udf_example MODULE udf_example.cc)
-+ ADD_CONVENIENCE_LIBRARY(udf_example MODULE udf_example.cc)
- SET_TARGET_PROPERTIES(udf_example PROPERTIES PREFIX "")
- # udf_example depends on strings
- IF(WIN32)
diff --git a/mysql-config.patch b/mysql-config.patch
deleted file mode 100644
index ac61f8f..0000000
--- a/mysql-config.patch
+++ /dev/null
@@ -1,32 +0,0 @@
---- Percona-Server-5.6.13-rel61.0/scripts/mysql_config.sh~ 2013-10-07 12:25:25.000000000 +0200
-+++ Percona-Server-5.6.13-rel61.0/scripts/mysql_config.sh 2013-10-15 18:17:41.547988430 +0200
-@@ -124,23 +124,23 @@
- for remove in DDBUG_OFF DSAFE_MUTEX DFORCE_INIT_OF_VARS \
- DEXTRA_DEBUG DHAVE_purify O 'O[0-9]' 'xO[0-9]' 'W[-A-Za-z]*' \
- 'mtune=[-A-Za-z0-9]*' 'mcpu=[-A-Za-z0-9]*' 'march=[-A-Za-z0-9]*' \
-- unroll2 ip mp restrict
-+ unroll2 ip mp restrict 'f[-a-z0-9]*' 'g[-a-z0-9]*' 'm[-a-z0-9]*'
- do
- # The first option we might strip will always have a space before it because
- # we set -I$pkgincludedir as the first option
-- cflags=`echo "$cflags"|sed -e "s/ -$remove */ /g"`
-+ cflags=`echo "$cflags"|sed -e "s/ \(-$remove *\)\{1,\}/ /g"`
- cxxflags=`echo "$cxxflags"|sed -e "s/ -$remove */ /g"`
- done
- cflags=`echo "$cflags"|sed -e 's/ *\$//'`
- cxxflags=`echo "$cxxflags"|sed -e 's/ *\$//'`
-
- # Same for --libs(_r)
--for remove in lmtmalloc static-libcxa i-static static-intel
-+for remove in lmtmalloc static-libcxa i-static static-intel 'Wl,-[-a-z0-9,]*'
- do
- # We know the strings starts with a space
-- libs=`echo "$libs"|sed -e "s/ -$remove */ /g"`
-- libs_r=`echo "$libs_r"|sed -e "s/ -$remove */ /g"`
-- embedded_libs=`echo "$embedded_libs"|sed -e "s/ -$remove */ /g"`
-+ libs=`echo "$libs"|sed -e "s/ \(-$remove *\)\{1,\}/ /g"`
-+ libs_r=`echo "$libs_r"|sed -e "s/ \(-$remove *\)\{1,\}/ /g"`
-+ embedded_libs=`echo "$embedded_libs"|sed -e "s/ \(-$remove *\)\{1,\}/ /g"`
- done
-
- # Strip trailing and ending space if any, and '+' (FIXME why?)
diff --git a/mysql-dubious-exports.patch b/mysql-dubious-exports.patch
deleted file mode 100644
index 4166c52..0000000
--- a/mysql-dubious-exports.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-Prefix mysql_ to the real names of several symbols that have to be exported
-from libmysqlclient because mysql-connector-odbc and/or PHP depend on them.
-This limits the intrusion on application namespace.
-
-
-diff -Naur mysql-5.5.8.orig/include/my_sys.h mysql-5.5.8/include/my_sys.h
---- mysql-5.5.8.orig/include/my_sys.h 2010-12-03 12:58:24.000000000 -0500
-+++ mysql-5.5.8/include/my_sys.h 2010-12-27 14:27:23.956926896 -0500
-@@ -227,6 +227,7 @@
-
- /* charsets */
- #define MY_ALL_CHARSETS_SIZE 2048
-+#define default_charset_info mysql_default_charset_info /* namespace sanity */
- extern MYSQL_PLUGIN_IMPORT CHARSET_INFO *default_charset_info;
- extern MYSQL_PLUGIN_IMPORT CHARSET_INFO *all_charsets[MY_ALL_CHARSETS_SIZE];
- extern CHARSET_INFO compiled_charsets[];
-@@ -914,6 +915,9 @@
- extern uint get_collation_number(const char *name);
- extern const char *get_charset_name(uint cs_number);
-
-+#define get_charset mysql_get_charset /* namespace sanity */
-+#define get_charset_by_csname mysql_get_charset_by_csname
-+
- extern CHARSET_INFO *get_charset(uint cs_number, myf flags);
- extern CHARSET_INFO *get_charset_by_name(const char *cs_name, myf flags);
- extern CHARSET_INFO *get_charset_by_csname(const char *cs_name,
-diff -Naur mysql-5.5.8.orig/include/mysql.h.pp mysql-5.5.8/include/mysql.h.pp
---- mysql-5.5.8.orig/include/mysql.h.pp 2010-12-03 12:58:24.000000000 -0500
-+++ mysql-5.5.8/include/mysql.h.pp 2010-12-27 14:27:23.956926896 -0500
-@@ -90,7 +90,7 @@
- void my_net_local_init(NET *net);
- void net_end(NET *net);
- void net_clear(NET *net, my_bool check_buffer);
--my_bool net_realloc(NET *net, size_t length);
-+my_bool mysql_net_realloc(NET *net, size_t length);
- my_bool net_flush(NET *net);
- my_bool my_net_write(NET *net,const unsigned char *packet, size_t len);
- my_bool net_write_command(NET *net,unsigned char command,
-diff -Naur mysql-5.5.8.orig/include/mysql_com.h mysql-5.5.8/include/mysql_com.h
---- mysql-5.5.8.orig/include/mysql_com.h 2010-12-03 12:58:24.000000000 -0500
-+++ mysql-5.5.8/include/mysql_com.h 2010-12-27 14:27:23.957927198 -0500
-@@ -497,6 +497,7 @@
- void my_net_local_init(NET *net);
- void net_end(NET *net);
- void net_clear(NET *net, my_bool check_buffer);
-+#define net_realloc mysql_net_realloc /* namespace sanity */
- my_bool net_realloc(NET *net, size_t length);
- my_bool net_flush(NET *net);
- my_bool my_net_write(NET *net,const unsigned char *packet, size_t len);
---- mysql-5.5.9/include/m_string.h~ 2011-01-20 00:37:08.000000000 +0200
-+++ mysql-5.5.9/include/m_string.h 2011-03-31 16:36:35.184588054 +0300
-@@ -118,6 +118,7 @@
- extern size_t strnlen(const char *s, size_t n);
- #endif
-
-+#define is_prefix mysql_is_prefix /* namespace sanity */
- extern int is_prefix(const char *, const char *);
-
- /* Conversion routines */
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 1c53b20..0000000
--- a/mysql-system-users.patch
+++ /dev/null
@@ -1,34 +0,0 @@
---- 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/mysql-upgrade.patch b/mysql-upgrade.patch
deleted file mode 100644
index 397747c..0000000
--- a/mysql-upgrade.patch
+++ /dev/null
@@ -1,36 +0,0 @@
---- mysql-5.5.32/client/mysql_upgrade.c.orig 2013-07-01 03:16:34.000000000 +0000
-+++ mysql-5.5.32/client/mysql_upgrade.c 2013-07-09 16:15:08.366178596 +0000
-@@ -35,13 +35,13 @@
- # endif
- #endif
-
--static char mysql_path[FN_REFLEN];
--static char mysqlcheck_path[FN_REFLEN];
-+static char *mysql_path = "/usr/bin/mysql";
-+static char *mysqlcheck_path = "/usr/sbin/mysqlcheck";
-
- static my_bool opt_force, opt_verbose, debug_info_flag, debug_check_flag,
- opt_systables_only, opt_version_check;
- static uint my_end_arg= 0;
--static char *opt_user= (char*)"root";
-+static char *opt_user= (char*)"mysql";
-
- static DYNAMIC_STRING ds_args;
- static DYNAMIC_STRING conn_args;
-@@ -923,15 +923,7 @@
- dynstr_append_os_quoted(&ds_args, "--user=", opt_user, NullS);
- dynstr_append(&ds_args, " ");
-
-- /* Find mysql */
-- find_tool(mysql_path, IF_WIN("mysql.exe", "mysql"), self_name);
--
-- if (!opt_systables_only)
-- {
-- /* Find mysqlcheck */
-- find_tool(mysqlcheck_path, IF_WIN("mysqlcheck.exe", "mysqlcheck"), self_name);
-- }
-- else
-+ if (opt_systables_only)
- {
- printf("The --upgrade-system-tables option was used, databases won't be touched.\n");
- }
diff --git a/mysql-versioning.patch b/mysql-versioning.patch
deleted file mode 100644
index 6d4ea8c..0000000
--- a/mysql-versioning.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- Percona-Server-5.6.14-rel62.0//libmysql/libmysql.map 2013-10-30 17:14:14.270019272 +0100
-+++ percona-server-5.6.16-64.1/libmysql/libmysql.map 2014-05-02 22:58:14.025317912 +0300
-@@ -145,6 +145,7 @@
- mysql_net_realloc;
- # PHP's mysqli.so requires this (via the ER() macro)
- mysql_client_errors;
-+ client_errors;
- # mydumper requires this (added by remi)
- my_net_read;
- };
-@@ -155,2 +156,4 @@
- get_tty_password;
-+# for mysql-workbench 6.1
-+ mysql_options4;
- };
diff --git a/mysql.init b/mysql.init
index 6b1da9b..120f67b 100755
--- a/mysql.init
+++ b/mysql.init
@@ -445,7 +445,7 @@ mysqlinit() {
if [ -f "$clusterdir/mysqld.conf" ]; then
mysqlgetconfig "$clusterdir"
else
- MYSQL_USER="mysql"
+ MYSQL_USER="root"
MYSQL_CLUSTER_DIR="$clusterdir"
MYSQL_DATA_DIR="$clusterdir/mysqldb/db"
MYSQL_PIDFILE="$clusterdir/mysqldb/mysql.pid"
@@ -505,26 +505,32 @@ mysqlinit() {
PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL USERS!
-CURRENT TEMPORARY ROOT PASSWORD CAN BE FOUND IN LOG
-(grep for "A temporary password is generated" string):
-$MYSQL_ERRLOG
-
-
Start database:
$ service mysql start
and set passwords:
-FIXME FIXME: For 'mysql_sysadmin' (RELOAD and SHUTDOWN privileges):
-echo "update mysql.user set password=password('newpassword') where user='mysql_sysadmin'; FLUSH PRIVILEGES;" | mysql -u mysql -S $MYSQL_SOCKET
-
For 'root' user (ALL privileges, DB admin), paste command with new password:
-ALTER USER 'root'@'localhost' IDENTIFIED BY 'newpassword'; FLUSH PRIVILEGES;
+ALTER USER 'root'@'localhost' IDENTIFIED BY 'newpassword';
+FLUSH PRIVILEGES;
+
+For 'mysql_sysadmin' (RELOAD and SHUTDOWN privileges):
+CREATE USER 'mysql_sysadmin'@'localhost' IDENTIFIED BY 'sysnewpassword' PASSWORD EXPIRE NEVER;
+GRANT RELOAD, SHUTDOWN ON *.* TO 'mysql_sysadmin'@'localhost';
+FLUSH PRIVILEGES;
+
+
+Both into command:
+$ mysql -u root -p --ssl-mode=disabled -S $MYSQL_SOCKET
+
+NOTE 1:
+CURRENT TEMPORARY ROOT PASSWORD CAN BE FOUND IN LOG
+(grep for "A temporary password is generated" string):
+$MYSQL_ERRLOG
-into command:
-$ mysql -u root -p -S $MYSQL_SOCKET
-NOTE: mysql_sysadmin password should be placed to $MYSQL_CONFIG in
+NOTE 2:
+mysql_sysadmin password should be placed to $MYSQL_CONFIG in
mysqladmin section. See the manual for more instructions.
(This user is used at logs rotation and server shutdown)
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/mysql.git/commitdiff/416b5906d364728d79e3791ebcb35381d6af2652
More information about the pld-cvs-commit
mailing list