From 7eed319278c419e4460db802cc51e711c511df91 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Wed, 30 Jun 2021 09:38:54 +0200 Subject: [PATCH] - up to 5.6.51; 43594 seems to be fixed --- bug-44278.patch | 2 +- mysql-bug-43594.patch | 30 ------------------------------ mysql-build.patch | 2 +- mysql-cmake.patch | 23 +++++++++++------------ mysql-dubious-exports.patch | 2 +- mysql-opt.patch | 4 ++-- mysql-system-users.patch | 19 ++++++++++++++----- mysql.spec | 12 ++++++------ 8 files changed, 36 insertions(+), 58 deletions(-) delete mode 100644 mysql-bug-43594.patch diff --git a/bug-44278.patch b/bug-44278.patch index b5d680c..d4072cf 100644 --- a/bug-44278.patch +++ b/bug-44278.patch @@ -37,7 +37,7 @@ Content-Disposition: inline } elsif (defined($tgt_name) && ($tgt_name =~ m:/: || $tgt_name eq '.')) { @@ -285,7 +285,7 @@ foreach my $rdb ( @db_desc ) { - } + my @dbh_tables = (@dbh_base_tables, @dbh_views); ## get list of files to copy - my $db_dir = "$datadir/$db"; diff --git a/mysql-bug-43594.patch b/mysql-bug-43594.patch deleted file mode 100644 index b8cc07b..0000000 --- a/mysql-bug-43594.patch +++ /dev/null @@ -1,30 +0,0 @@ -=== modified file 'scripts/mysqlhotcopy.sh' ---- scripts/mysqlhotcopy.sh 2008-03-07 20:45:40 +0000 -+++ scripts/mysqlhotcopy.sh 2009-03-12 13:06:42 +0000 -@@ -777,7 +777,24 @@ sub get_list_of_tables { - } || []; - warn "Unable to retrieve list of tables in $db: $@" if $@; - -- return (map { $_->[0] } @$tables); -+ my @ignore_tables = (); -+ -+ # Ignore tables for the mysql database -+ if ($db eq 'mysql') { -+ @ignore_tables = qw(general_log slow_log schema apply_status); -+ } -+ -+ my @res = (); -+ if ($#ignore_tables > 1) { -+ my @tmp = (map { $_->[0] } @$tables); -+ for my $t (@tmp) { -+ push(@res, $t) if not exists { map { $_=>1 } @ignore_tables }->{$t}; -+ } -+ } else { -+ @res = (map { $_->[0] } @$tables); -+ } -+ -+ return @res; - } - - sub quote_names { - diff --git a/mysql-build.patch b/mysql-build.patch index 57ca277..ae10f26 100644 --- a/mysql-build.patch +++ b/mysql-build.patch @@ -28,7 +28,7 @@ --- 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) + SET(TOKUDB_VERSION ) # 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 diff --git a/mysql-cmake.patch b/mysql-cmake.patch index 7b7ae1c..7239ca7 100644 --- a/mysql-cmake.patch +++ b/mysql-cmake.patch @@ -37,7 +37,7 @@ int main(int argc, char **argv) { HIST_ENTRY entry; -@@ -170,14 +170,13 @@ +@@ -179,7 +179,7 @@ CHECK_CXX_SOURCE_COMPILES(" #include @@ -45,15 +45,14 @@ + #include int main(int argc, char **argv) { -- typedef int MYFunction(const char*, int); -- MYFunction* myf= rl_completion_entry_function; -- int res= (myf)(NULL, 0); -- completion_matches(0,0); -- return res; -+ rl_compentry_func_t *myf= rl_completion_entry_function; -+ char *res= (myf)(NULL, 0); -+ rl_completion_matches(0,0); -+ return res ? 0 : 1; - }" - EDITLINE_HAVE_COMPLETION) + typedef int MYFunction(const char*, int); +@@ -192,7 +192,7 @@ + CHECK_CXX_SOURCE_COMPILES(" + #include +- #include ++ #include + int main(int argc, char **argv) + { + typedef char* MYFunction(const char*, int); + diff --git a/mysql-dubious-exports.patch b/mysql-dubious-exports.patch index 4166c52..0f92087 100644 --- a/mysql-dubious-exports.patch +++ b/mysql-dubious-exports.patch @@ -23,7 +23,7 @@ diff -Naur mysql-5.5.8.orig/include/my_sys.h mysql-5.5.8/include/my_sys.h + 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, + extern CHARSET_INFO *my_collation_get_by_name(MY_CHARSET_LOADER *loader, 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 diff --git a/mysql-opt.patch b/mysql-opt.patch index c7db343..c317a6e 100644 --- a/mysql-opt.patch +++ b/mysql-opt.patch @@ -1,6 +1,6 @@ --- percona-server-5.6.24-72.2/cmake/build_configurations/compiler_options.cmake.orig 2015-05-06 12:38:47.000000000 +0200 +++ percona-server-5.6.24-72.2/cmake/build_configurations/compiler_options.cmake 2015-06-09 19:54:42.577790251 +0200 -@@ -30,8 +30,8 @@ +@@ -37,8 +37,8 @@ IF(WITH_VALGRIND) SET(COMMON_C_FLAGS "-fno-inline ${COMMON_C_FLAGS}") ENDIF() @@ -10,7 +10,7 @@ + SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-O3 ${CMAKE_C_FLAGS_RELWITHDEBINFO} ${COMMON_C_FLAGS}") ENDIF() IF(CMAKE_COMPILER_IS_GNUCXX) - SET(COMMON_CXX_FLAGS "-g -fabi-version=2 -fno-omit-frame-pointer -fno-strict-aliasing") + # GCC 6 has C++14 as default, set it explicitly to the old default. @@ -52,26 +52,26 @@ IF(UNIX) IF(WITH_VALGRIND) SET(COMMON_CXX_FLAGS "-fno-inline ${COMMON_CXX_FLAGS}") diff --git a/mysql-system-users.patch b/mysql-system-users.patch index 1c53b20..915e6a2 100644 --- a/mysql-system-users.patch +++ b/mysql-system-users.patch @@ -1,8 +1,8 @@ ---- 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; +--- percona-server-5.6.51-91.0/scripts/mysql_system_tables_data.sql~ 2021-02-02 15:20:34.000000000 +0100 ++++ percona-server-5.6.51-91.0/scripts/mysql_system_tables_data.sql 2021-06-30 09:18:45.855932271 +0200 +@@ -33,30 +33,24 @@ + -- a plain character + SELECT LOWER( REPLACE((SELECT REPLACE(@@hostname,'_','\_')),'%','\%') )INTO @current_hostname; - --- Fill "db" table with default grants for anyone to @@ -32,3 +32,12 @@ 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; + DROP TABLE tmp_user; + + CREATE TEMPORARY TABLE tmp_proxies_priv LIKE proxies_priv; +-INSERT INTO tmp_proxies_priv VALUES ('localhost', 'root', '', '', TRUE, '', now()); +-REPLACE INTO tmp_proxies_priv SELECT @current_hostname, 'root', '', '', TRUE, '', now() FROM DUAL WHERE LOWER (@current_hostname) != 'localhost'; ++INSERT INTO tmp_proxies_priv VALUES ('localhost', 'mysql', '', '', TRUE, '', now()); ++REPLACE INTO tmp_proxies_priv SELECT @current_hostname, 'mysql', '', '', TRUE, '', now() FROM DUAL WHERE LOWER (@current_hostname) != 'localhost'; + INSERT INTO proxies_priv SELECT * FROM tmp_proxies_priv WHERE @had_proxies_priv_table=0; + DROP TABLE tmp_proxies_priv; diff --git a/mysql.spec b/mysql.spec index 1e1d39f..4f1c252 100644 --- a/mysql.spec +++ b/mysql.spec @@ -31,7 +31,7 @@ %endif %define rel 1 -%define percona_rel 89.0 +%define percona_rel 91.0 Summary: MySQL: a very fast and reliable SQL database engine Summary(de.UTF-8): MySQL: ist eine SQL-Datenbank Summary(fr.UTF-8): MySQL: un serveur SQL rapide et fiable @@ -41,14 +41,14 @@ Summary(ru.UTF-8): MySQL - быстрый SQL-сервер Summary(uk.UTF-8): MySQL - швидкий SQL-сервер Summary(zh_CN.UTF-8): MySQL数据库服务器 Name: mysql -Version: 5.6.49 +Version: 5.6.51 Release: %{percona_rel}.%{rel} License: GPL + MySQL FLOSS Exception Group: Applications/Databases # Source0Download: http://dev.mysql.com/downloads/mysql/5.5.html#downloads # Source0: http://vesta.informatik.rwth-aachen.de/mysql/Downloads/MySQL-5.5/%{name}-%{version}.tar.gz Source0: http://www.percona.com/downloads/Percona-Server-5.6/LATEST/source/tarball/percona-server-%{version}-%{percona_rel}.tar.gz -# Source0-md5: 634db39b987bf413b0257b5aa1faee6b +# Source0-md5: 05f0f2fbba5dec1d78bb56998a6749c7 Source100: http://www.sphinxsearch.com/files/sphinx-2.2.11-release.tar.gz # Source100-md5: 5cac34f3d78a9d612ca4301abfcbd666 Source1: %{name}.init @@ -77,7 +77,7 @@ Patch7: mysql-nosystem-libhsclient.patch Patch9: %{name}-build.patch Patch11: %{name}-upgrade.patch Patch12: %{name}-config.patch -Patch14: %{name}-bug-43594.patch + Patch18: %{name}-sphinx.patch Patch19: %{name}-chain-certs.patch # from fedora @@ -119,7 +119,7 @@ Requires(pre): /bin/id Requires(pre): /usr/bin/getgid Requires(pre): /usr/sbin/groupadd Requires(pre): /usr/sbin/useradd -Requires(triggerpostun): sed >= 4.0 +Requires(postun): sed >= 4.0 Requires: %{name}-charsets = %{version}-%{release} Requires: %{name}-libs = %{version}-%{release} Requires: /usr/bin/setsid @@ -532,7 +532,7 @@ mv sphinx-*/mysqlse storage/sphinx %patch9 -p1 %patch11 -p1 %patch12 -p1 -%patch14 -p0 + %patch19 -p1 %patch20 -p1 -- 2.43.0