From 25cd076701ac95ccd5c8100704bd53b868e6f4b7 Mon Sep 17 00:00:00 2001 From: Marcin Krol Date: Mon, 26 Feb 2018 10:57:25 +0000 Subject: [PATCH] - Percona Server 5.7 from PLD, renamed back to MySQL --- bug-44278.patch | 180 ------- bug-66589.patch | 10 - bug-67402.patch | 14 - lz4.patch | 59 +++ mysql-bug-43594.patch | 30 -- mysql-build.patch | 59 --- mysql-cmake.patch | 59 +++ mysql-dubious-exports.patch | 18 +- mysql-no-default-secure-auth.patch | 98 ---- mysql-opt.patch | 41 ++ mysql-system-users.patch | 30 -- mysql.init | 113 ++--- mysql.spec | 789 ++++++++++++++--------------- mysqld.conf | 40 +- mysqlhotcopy-5.0-5.5.patch | 11 - 15 files changed, 608 insertions(+), 943 deletions(-) delete mode 100644 bug-44278.patch delete mode 100644 bug-66589.patch delete mode 100644 bug-67402.patch create mode 100644 lz4.patch delete mode 100644 mysql-bug-43594.patch delete mode 100644 mysql-build.patch create mode 100644 mysql-cmake.patch delete mode 100644 mysql-no-default-secure-auth.patch create mode 100644 mysql-opt.patch delete mode 100644 mysql-system-users.patch delete mode 100644 mysqlhotcopy-5.0-5.5.patch diff --git a/bug-44278.patch b/bug-44278.patch deleted file mode 100644 index b5d680c..0000000 --- a/bug-44278.patch +++ /dev/null @@ -1,180 +0,0 @@ -http://bugs.mysql.com/bug.php?id=44278 -http://lists.mysql.com/commits/80079?f=plain - -From: Jim Winstead -Date: August 4 2009 7:00pm -Subject: bzr commit into mysql-5.1-bugteam branch (jimw:3055) Bug#44278 -List-Archive: http://lists.mysql.com/commits/80079 -X-Bug: 44278 -MIME-Version: 1.0 -Content-Type: multipart/mixed; boundary="===============1792034184==" - ---===============1792034184== -MIME-Version: 1.0 -Content-Type: text/plain; charset="us-ascii" -Content-Transfer-Encoding: 7bit -Content-Disposition: inline - -#At file:///Users/jimw/my/mysql-5.1-fixes/ based on revid:jimw@stripped - - 3055 Jim Winstead 2009-08-04 - mysqlhotcopy did not handle the encoding of schema names in the filesystem, so - schemas with most non-alphanumeric characters in their name could not be - backed up. (Bug #44278). - - modified: - scripts/mysqlhotcopy.sh -=== modified file 'scripts/mysqlhotcopy.sh' ---- Percona-Server-5.6.14-rel62.0/scripts/mysqlhotcopy.sh~ 2013-12-20 14:56:59.000000000 +0200 -+++ Percona-Server-5.6.14-rel62.0/scripts/mysqlhotcopy.sh 2013-12-20 14:58:39.183005974 +0200 -@@ -222,7 +222,7 @@ my ($tgt_dirname, $to_other_database); - $to_other_database=0; - if (defined($tgt_name) && $tgt_name =~ m:^\w+$: && @db_desc <= 1) - { -- $tgt_dirname = "$datadir/$tgt_name"; -+ $tgt_dirname = "$datadir/" . encode_identifier_as_filename($tgt_name); - $to_other_database=1; - } - elsif (defined($tgt_name) && ($tgt_name =~ m:/: || $tgt_name eq '.')) { -@@ -285,7 +285,7 @@ foreach my $rdb ( @db_desc ) { - } - - ## get list of files to copy -- my $db_dir = "$datadir/$db"; -+ my $db_dir = "$datadir/" . encode_identifier_as_filename($db); - opendir(DBDIR, $db_dir ) - or die "Cannot open dir '$db_dir': $!"; - -@@ -353,7 +353,8 @@ if (defined($tgt_name) && length $tgt_na - elsif ($opt{method} =~ /^scp\b/) - { # we have to trust scp to hit the target - foreach my $rdb ( @db_desc ) { -- $rdb->{target} = "$tgt_dirname/$rdb->{src}"; -+ $rdb->{target} = "$tgt_dirname/" . -+ encode_identifier_as_filename($rdb->{src}); - } - } - else -@@ -361,7 +362,8 @@ if (defined($tgt_name) && length $tgt_na - die "Last argument ($tgt_dirname) is not a directory\n" - if (!(-e $tgt_dirname && -d $tgt_dirname ) ); - foreach my $rdb ( @db_desc ) { -- $rdb->{target} = "$tgt_dirname/$rdb->{src}"; -+ $rdb->{target} = "$tgt_dirname/" . -+ encode_identifier_as_filename($rdb->{src}); - } - } - } -@@ -369,7 +371,8 @@ else { - die "Error: expected \$opt{suffix} to exist" unless ( exists $opt{suffix} ); - - foreach my $rdb ( @db_desc ) { -- $rdb->{target} = "$datadir/$rdb->{src}$opt{suffix}"; -+ $rdb->{target} = "$datadir/" . -+ encode_identifier_as_filename("$rdb->{src}$opt{suffix}"); - } - } - -@@ -464,7 +464,8 @@ - else { - mkdir($tgt_dirpath, 0750) or die "Can't create '$tgt_dirpath': $!\n" - unless -d $tgt_dirpath; -- my @f_info= stat "$datadir/$rdb->{src}"; -+ my @f_info= stat "$datadir/" . -+ encode_identifier_as_filename($rdb->{src}); - chown $f_info[4], $f_info[5], $tgt_dirpath; - } - } -@@ -471,7 +475,9 @@ my @failed = (); - - foreach my $rdb ( @db_desc ) - { -- my @files = map { "$datadir/$rdb->{src}/$_" } @{$rdb->{files}}; -+ my @files = map { "$datadir/" . -+ encode_identifier_as_filename($rdb->{src}) . -+ "/$_" } @{$rdb->{files}}; - next unless @files; - - eval { copy_files($opt{method}, \@files, $rdb->{target}); }; -@@ -482,7 +488,8 @@ foreach my $rdb ( @db_desc ) - if ($rdb->{index}) - { - copy_index($opt{method}, \@files, -- "$datadir/$rdb->{src}", $rdb->{target} ); -+ "$datadir/" . encode_identifier_as_filename($rdb->{src}), -+ $rdb->{target} ); - } - - if ( $opt{checkpoint} ) { -@@ -794,6 +801,20 @@ sub quote_names { - return "`$db`.`$table`"; - } - -+# -+# In MySQL 5.1 and later, directory and table names are encoded on disk. -+# We use the server to figure out the encoded names, and just fall back -+# to the unencoded identifier if that fails. -+# -+sub encode_identifier_as_filename { -+ my ($ident)= @_; -+ my ($filename)= $dbh->selectrow_array( -+ "SELECT BINARY(CAST(? AS CHAR CHARACTER SET FILENAME))", -+ { RaiseError => 0 }, -+ $ident); -+ return $filename ? $filename : $ident; -+} -+ - __END__ - - =head1 DESCRIPTION - - ---===============1792034184== -MIME-Version: 1.0 -Content-Type: text/bzr-bundle; charset="us-ascii"; - name="bzr/jimw@stripped" -Content-Transfer-Encoding: 7bit -Content-Disposition: inline - -# Bazaar merge directive format 2 (Bazaar 0.90) -# revision_id: jimw@stripped -# target_branch: file:///Users/jimw/my/mysql-5.1-fixes/ -# testament_sha1: 21dd6f5b49582e2759b846d4abfe69e3f3c913d4 -# timestamp: 2009-08-04 12:00:08 -0700 -# source_branch: bzr+ssh://bk-internal.mysql.com/bzrroot/server/mysql-\ -# 5.1-bugteam/ -# base_revision_id: jimw@stripped -# -# Begin bundle -IyBCYXphYXIgcmV2aXNpb24gYnVuZGxlIHY0CiMKQlpoOTFBWSZTWVQztd0AApl/gEh4YiBdZ/// -+3c8oL////pQBe66qvPdunW5ninW21e3q7wJRCaDVPQmmNMgmCmzU1NqaG0aQaA02oZGmQSlNU/T -VPxU/SPRT9UAD1DIAAAAAyMJoA0E0mI1TANU9J6DU0eg0aajQMENPU0DPU9RGEkggTUeagAp+Knp -qYjTQGIAAA0BpoJJAjFGU9CMmkwjJmo000NGgyDQA0A0mS6qPShPOrHozAK/u3m/PNkFxceJjFUI -eeZll2Je5bSQGVrS28T/hEArxWufTLQxNx8bn6JY9QhKq5hmSWbk8FDt8mbMXN2xGG7lw8oh20qq -iGKG8LUUqtEUqKWZHY12j2jU30I406YoqJF8GPdvWIg8FXJjDZNevWm9j3HLZw4YWfCrDDhfI39Z -EiSM1RtNeUiz31sDmF/vrR8z5v3JMpqV0b4H3mDdfqoYNF987qMJVtA7p6n7vUAM89KZ54/HU6ms -+LwvhtXoUr58G5QluZGuVEPahJeoEg0FerIVxOQ3dXSYcHaIZ9sIDBciWHzTxdqLRxqKjo4WODm9 -nBsesFvCCgh+zoej50Q5NUOd7R/L1lsSPLbzuTUaIWrCoGBKLwooZpkox6kVplsWywJ7NqZs5EHC -IqA8LudPgLM5VJGEEEBEzjIkxmGA9FDqFgK4IsrvKOxQRIGcjD7EsFjKjwrq96FiiWTM5UVCZriq -RjOKRplgtmQXE0rsiIVXRApxwQVBQcCroEaQaCkQA+YD3NUzj7HyMuvYTkKwLhhy5i6LSlSVawE4 -LrLTKX8DxFgyKA7a5MRkR0BUhTdL0ww6Tx0jo1uUMbQQpt/KME26ZH6Cgs5l2Th1PL46Vrl5aVz3 -6i5i4hAhHWoMVHLSP/rGxbgrNaZivMGiGMYahyxFTZL5Z4FYERySJztqnqiRU5aBjvtLYJSSYULS -YSzSPEFtUMxWwfAgQDXDBY4xLsyLE+0pQJd4Xgb0tuLzruMJ81LKEQuarUshWziKNajVST0bjZZa -9hH1sc6oEk2qWYEPUnXb3g17q5AGF+UggTutbt/B9aRhIWaFweM7dhlWTlMON6ZFkz0YYLLa9wgN -OYspAbZJhIh8TARXdl5w5+kgExx3SPZzDo6mux8o0RYyAX5cXtfxZBIts2Fgsk3PvFIPDJkDnRY4 -xdE+37oAqlx5jnIPLtTPlfv9ZstVALN0FJcZ6fYzSfPpsvWwkRZpkL0pE2sGmmuMZVqFCBSNrxOe -1u8ZNRFYlpIJ8BUC3JVpDFZrOcFFCfLYQvgKDk1XnlNzbtoYWNnZnOdpd1xSIMNwGxvDP6DoOkw2 -pl5hM3b6mJBIIX60Y+1j4125WU3FTyoFp/jdLdXUzsrKqxVsI+qcja7ehndBBNJ+0H2QXLMZ3qBH -FAGAoUdOFHFxpvFI1G4vIl5QdjQOEJN9bCs0oCzt79cEwQIk5op3WF1axGUhk8sAXGlbb1y8g4LX -bmiyZEmcWa1wBzbEibDRjWTHw3CuUnINoRQfEcIfObkg0dkT7iLVyBfWvL1b8bLjSBwFqXSoha4w -GdVdwlqo1+O3KfgYi29khnSZaQ4DZEJdG6UidU923t5c7+djSySpCDzzCdQ0eWuT7KGEbLE+xnqa -QQo5ZtyZppSWgyyEdcTsbr5hDdryHDkn77hxB2NugTCzTtWyDBnj0X5IITKoGnpiQUY1zrCMUAzI -i5YoaO+QH6ULHPeeCi/kclxSRySB0wmuRQWk03igk2DoEimZCIPYV11pROQDVi9rSaDLLB4ZG+ks -rCmjodJw4TAnPDgyTCzpEd+jY8Wa3Ql4yVwEw+mvRcKqor1GECCy4uyopGRgGT2R9fMShRoIHZSW -TC23tYXz4vWnmUnAZq1JRn4TU1ySuF5QqhcjNY5oOAvw31oGIRPEh0yDZQnJkgEJTyiFxgSTBqhF -xDNuWFN4M70p7ZjEPCgWvXSM7ecSZW4fFxnHuCkSbHMM7LGmd1nUgqsouO2yLVoJUt4L93iAbYH1 -V+tRCexYKb/DwJS6RC09X4Wo1vczNejREo9zZcNonSclxRzlnBsEuCY7p2aOVElUORgRVRiM773/ -F3JFOFCQVDO13Q== - - ---===============1792034184==-- diff --git a/bug-66589.patch b/bug-66589.patch deleted file mode 100644 index fbf75e6..0000000 --- a/bug-66589.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- Percona-Server-5.5.33-rel31.1/scripts/mysqlhotcopy.sh~ 2013-10-02 20:29:57.000000000 +0300 -+++ Percona-Server-5.5.33-rel31.1/scripts/mysqlhotcopy.sh 2013-10-02 20:30:33.825747635 +0300 -@@ -268,6 +268,7 @@ - $sth_dbs->execute; - while ( my ($db_name) = $sth_dbs->fetchrow_array ) { - next if $db_name =~ m/^information_schema$/i; -+ next if $db_name =~ m/^performance_schema$/i; - push @db_desc, { 'src' => $db_name, 't_regex' => $t_regex } if ( $db_name =~ m/$opt{regexp}/o ); - } - } diff --git a/bug-67402.patch b/bug-67402.patch deleted file mode 100644 index 18bd2ee..0000000 --- a/bug-67402.patch +++ /dev/null @@ -1,14 +0,0 @@ - -Upstream-Bugtracker: http://bugs.mysql.com/67402 - ---- 5.5.27/scripts/mysqlhotcopy.sh~ 2012-10-28 21:20:46.000000000 +0200 -+++ 5.5.27/scripts/mysqlhotcopy.sh 2012-10-28 21:23:12.574442093 +0200 -@@ -895,7 +895,7 @@ - - CREATE TABLE log_pos ( - host varchar(60) NOT null, -- time_stamp timestamp(14) NOT NULL, -+ time_stamp timestamp NOT NULL, - log_file varchar(32) default NULL, - log_pos int(11) default NULL, - master_host varchar(60) NULL, 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 + #endif /* HAVE_FALLOC_PUNCH_HOLE_AND_KEEP_SIZE */ + +-#include ++#include + #include + + #ifdef UNIV_DEBUG +@@ -8435,7 +8435,7 @@ + #include "fil0fil.h" + #include "os0file.h" + +-#include ++#include + #include + + #include +--- 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 ++#include + #include "base/mutex.h" + #include + +--- 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 ++#include + #include + #include "gcs_logging.h" + #include 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 deleted file mode 100644 index ea45a7b..0000000 --- a/mysql-build.patch +++ /dev/null @@ -1,59 +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 diff --git a/mysql-cmake.patch b/mysql-cmake.patch new file mode 100644 index 0000000..7b7ae1c --- /dev/null +++ b/mysql-cmake.patch @@ -0,0 +1,59 @@ +--- Percona-Server-5.6.15-rel63.0/cmake/readline.cmake.orig 2013-12-18 10:52:13.000000000 +0100 ++++ Percona-Server-5.6.15-rel63.0/cmake/readline.cmake 2014-02-09 06:17:56.079619159 +0100 +@@ -131,23 +131,23 @@ + + MACRO (FIND_SYSTEM_EDITLINE) + FIND_PATH(FOUND_EDITLINE_READLINE +- NAMES editline/readline.h ++ NAMES readline/readline.h + ) + IF(FOUND_EDITLINE_READLINE) +- SET(EDITLINE_INCLUDE_DIR "${FOUND_EDITLINE_READLINE}/editline") ++ SET(EDITLINE_INCLUDE_DIR "${FOUND_EDITLINE_READLINE}/readline") + ELSE() + # Different path on FreeBSD + FIND_PATH(FOUND_EDIT_READLINE_READLINE + NAMES edit/readline/readline.h + ) + IF(FOUND_EDIT_READLINE_READLINE) +- SET(EDITLINE_INCLUDE_DIR "${FOUND_EDIT_READLINE_READLINE}/edit/readline") ++ SET(EDITLINE_INCLUDE_DIR "${FOUND_EDIT_READLINE_READLINE}/readline") + ENDIF() + ENDIF() + + FIND_LIBRARY(EDITLINE_LIBRARY + NAMES +- edit ++ readline + ) + MARK_AS_ADVANCED(EDITLINE_INCLUDE_DIR EDITLINE_LIBRARY) + +@@ -160,7 +160,7 @@ + SET(CMAKE_REQUIRED_LIBRARIES ${EDITLINE_LIBRARY}) + CHECK_CXX_SOURCE_COMPILES(" + #include +- #include ++ #include + int main(int argc, char **argv) + { + HIST_ENTRY entry; +@@ -170,14 +170,13 @@ + + CHECK_CXX_SOURCE_COMPILES(" + #include +- #include ++ #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) + diff --git a/mysql-dubious-exports.patch b/mysql-dubious-exports.patch index 4166c52..076167c 100644 --- a/mysql-dubious-exports.patch +++ b/mysql-dubious-exports.patch @@ -24,25 +24,23 @@ 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, -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); +--- percona-server-5.7.12-5/include/mysql.h.pp~ 2016-06-01 09:44:09.000000000 +0300 ++++ percona-server-5.7.12-5/include/mysql.h.pp 2016-06-20 09:12:25.119724253 +0300 +@@ -128,7 +128,7 @@ void net_end(NET *net); void net_clear(NET *net, my_bool check_buffer); + void net_claim_memory_ownership(NET *net); -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); +--- percona-server-5.7.12-5/include/mysql_com.h~ 2016-06-01 09:44:09.000000000 +0300 ++++ percona-server-5.7.12-5/include/mysql_com.h 2016-06-20 09:12:01.301815678 +0300 +@@ -509,6 +509,7 @@ void net_end(NET *net); void net_clear(NET *net, my_bool check_buffer); + void net_claim_memory_ownership(NET *net); +#define net_realloc mysql_net_realloc /* namespace sanity */ my_bool net_realloc(NET *net, size_t length); my_bool net_flush(NET *net); 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-opt.patch b/mysql-opt.patch new file mode 100644 index 0000000..c1a8298 --- /dev/null +++ b/mysql-opt.patch @@ -0,0 +1,41 @@ +--- percona-server-5.7.12-5/cmake/build_configurations/compiler_options.cmake~ 2016-06-19 22:55:34.000000000 +0300 ++++ percona-server-5.7.12-5/cmake/build_configurations/compiler_options.cmake 2016-06-19 22:58:00.531159698 +0300 +@@ -33,8 +33,8 @@ + IF(WITH_VALGRIND) + SET(COMMON_C_FLAGS "-fno-inline ${COMMON_C_FLAGS}") + ENDIF() +- SET(CMAKE_C_FLAGS_DEBUG "${COMMON_C_FLAGS}") +- SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-O3 -D_FORTIFY_SOURCE=2 ${COMMON_C_FLAGS}") ++ SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} ${COMMON_C_FLAGS}") ++ SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-O3 -D_FORTIFY_SOURCE=2 ${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") +@@ -42,20 +42,20 @@ + IF(WITH_VALGRIND) + SET(COMMON_CXX_FLAGS "-fno-inline ${COMMON_CXX_FLAGS}") + ENDIF() +- SET(CMAKE_CXX_FLAGS_DEBUG "${COMMON_CXX_FLAGS}") +- SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 -D_FORTIFY_SOURCE=2 ${COMMON_CXX_FLAGS}") ++ SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${COMMON_CXX_FLAGS}") ++ SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 -D_FORTIFY_SOURCE=2 ${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${COMMON_CXX_FLAGS}") + ENDIF() + + # Default Clang flags + IF(CMAKE_C_COMPILER_ID MATCHES "Clang") + SET(COMMON_C_FLAGS "-g -fno-omit-frame-pointer -fno-strict-aliasing") +- SET(CMAKE_C_FLAGS_DEBUG "${COMMON_C_FLAGS}") +- SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-O3 -D_FORTIFY_SOURCE=2 ${COMMON_C_FLAGS}") ++ SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} ${COMMON_C_FLAGS}") ++ SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-O3 -D_FORTIFY_SOURCE=2 ${CMAKE_C_FLAGS_RELWITHDEBINFO} ${COMMON_C_FLAGS}") + ENDIF() + IF(CMAKE_CXX_COMPILER_ID MATCHES "Clang") + SET(COMMON_CXX_FLAGS "-g -fno-omit-frame-pointer -fno-strict-aliasing") +- SET(CMAKE_CXX_FLAGS_DEBUG "${COMMON_CXX_FLAGS}") +- SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 -D_FORTIFY_SOURCE=2 ${COMMON_CXX_FLAGS}") ++ SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${COMMON_CXX_FLAGS}") ++ SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 -D_FORTIFY_SOURCE=2 ${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${COMMON_CXX_FLAGS}") + ENDIF() + + # Solaris flags + diff --git a/mysql-system-users.patch b/mysql-system-users.patch deleted file mode 100644 index 560597a..0000000 --- a/mysql-system-users.patch +++ /dev/null @@ -1,30 +0,0 @@ ---- percona-server-5.6.25-73.1/scripts/mysql_system_tables_data.sql 2015-07-24 16:36:44.949657351 +0000 -+++ percona-server-5.6.25-73.1/scripts/mysql_system_tables_data.sql 2015-07-24 17:28:29.695854307 +0000 -@@ -39,17 +39,21 @@ - -- 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','','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_sysadmin','','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_sysadmin','','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_sysadmin','','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 (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.init b/mysql.init index 59e41e7..5337ee4 100755 --- a/mysql.init +++ b/mysql.init @@ -27,13 +27,13 @@ fi if [ -f /etc/mysql/clusters.conf ]; then MYSQL_DB_CLUSTERS=$(awk -F= '!/^#/ && /=/{print $2}' /etc/mysql/clusters.conf) - if [ -z "$MYSQL_DB_CLUSTERS" ]; then + if [ -z "$MYSQL_DB_CLUSTERS" ]; then nls "Warning: there are no configured clusters." fi else nls "Warning: Missing clusters config file %s" /etc/mysql/clusters.conf - if [ -z "$MYSQL_DB_CLUSTERS" ]; then + if [ -z "$MYSQL_DB_CLUSTERS" ]; then nls "Warning: there are no configured clusters." nls "Using default cluster /var/lib/mysql (compatibility mode)" MYSQL_DB_CLUSTERS=/var/lib/mysql @@ -51,6 +51,8 @@ else exit 0 fi +sharedir=/usr/share/mysql + action="$1" # any db cluster as command line argument? @@ -123,7 +125,7 @@ mysqlstatus() { fi if [ "$mode" = "start" ]; then - MYSQL_GREP_PID=$(grep -lE "^/usr/sbin/mysqld.*${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 @@ -358,6 +360,11 @@ mysqlstop() { # report slave status # uses MYSQL_SOCKET - path to mysql socket slave_status() { + if [ ! -x /usr/bin/mysql ]; then + echo >&2 "Slave status not available: 'mysql' program not installed." + return + fi + # see if slave status can be reported local err=0 slave_status=$(mysql --defaults-file="$MYSQL_CONFIG" --socket="$MYSQL_SOCKET" -e 'show slave status\G') if [ -z "$slave_status" ]; then @@ -448,7 +455,7 @@ mysqlinit() { MYSQL_CONFIG="$MYSQL_CLUSTER_DIR/mysqld.conf" fi - show "Initializing cluster %s" "$clusterdir"; started + show "Initializing MySQL cluster %s" "$clusterdir"; started # Check if not exist init database if [ -d "$MYSQL_DATA_DIR/mysql" ]; then @@ -468,97 +475,59 @@ mysqlinit() { 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 /usr/share/mysql/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; - " /usr/share/mysql/mysqld.conf > "$MYSQL_CLUSTER_DIR/mysqld.conf" - chown root:root "$MYSQL_CLUSTER_DIR/mysqld.conf" - chmod 640 "$MYSQL_CLUSTER_DIR/mysqld.conf" + 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/mysqld.conf > "$MYSQL_CLUSTER_DIR/mysqld.conf" + chown root:root "$MYSQL_CLUSTER_DIR/mysqld.conf" + chmod 640 "$MYSQL_CLUSTER_DIR/mysqld.conf" fi - 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 - - cat > $MYSQL_DATA_DIR/mysql-init.sql <<-EOF - CREATE DATABASE mysql; - use mysql; - $(cat /usr/share/mysql/mysql_system_tables.sql) - $(sed -e "/@current_hostname/d" /usr/share/mysql/mysql_system_tables_data.sql) -EOF - ok=0 /usr/sbin/mysqld \ --defaults-file=$MYSQL_CLUSTER_DIR/mysqld.conf \ - --bootstrap \ + --initialize-insecure \ --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/mysql-init.sql && ok=1 + --log-error=$MYSQL_ERRLOG && ok=1 [ -f $MYSQL_DATA_DIR/mysql/user.frm ] || ok=0 if [ "$ok" = 1 ]; then - rm -f $MYSQL_DATA_DIR/mysql-init.sql ok cat << END_OF_MSG -PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL USERS! -This is done, after starting database, in the order shown, +PLEASE REMEMBER TO SET A PASSWORD FOR THE mysql USERS! +This is done, after starting database, in the order shown below, with: -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 +Add 'mysql_sysadmin' user (RELOAD and SHUTDOWN privileges): +echo "CREATE USER 'mysql_sysadmin'@'localhost' IDENTIFIED BY 'SOME_RANDOM_PASSWORD'; FLUSH PRIVILEGES;" | mysql --ssl-mode=DISABLED -u root -S $MYSQL_SOCKET +echo "GRANT RELOAD, SHUTDOWN ON *.* TO 'mysql_sysadmin'@'localhost'; FLUSH PRIVILEGES;" | mysql --ssl-mode=DISABLED -u root -S $MYSQL_SOCKET -For 'mysql' user (ALL privileges, DB admin): -echo "update mysql.user set password=password('newpassword') where user='mysql'; FLUSH PRIVILEGES;" | mysql -u mysql -S $MYSQL_SOCKET +Set password for root user (ALL privileges, DB admin): +echo "ALTER USER 'root'@'localhost' IDENTIFIED BY 'newpassword'; FLUSH PRIVILEGES;" | mysql --ssl-mode=DISABLED -u root -S $MYSQL_SOCKET NOTE: 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) END_OF_MSG - show "Filling help tables..." - ok=0 - ( echo "use mysql;"; cat /usr/share/mysql/fill_help_tables.sql ) | \ - /usr/sbin/mysqld \ - --defaults-file=$MYSQL_CLUSTER_DIR/mysqld.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/mysql-init.sql - -Examine the logs in /var/log/mysql for more information. You can +Examine the logs in /var/log/mysql for more information. You can also try to start the mysqld daemon with: /usr/sbin/mysqld --skip-grant & @@ -566,23 +535,33 @@ also try to start the mysqld daemon with: You can use the command line tool mysql to connect to the mysql database and look at the grant tables: -shell> mysql -u mysql mysql +shell> mysql -u root mysql mysql> show tables Try 'mysqld --help' if you have problems with paths. Setting on logging in $MYSQL_DATA_DIR/mysqld.conf gives you a log in /var/log/mysql/query.log that may be helpful. The latest information about MySQL is available on the -web at http://www.mysql.com/. +web at https://www.percona.com/software/mysql-database/mysql. -Please check PLD Linux ftp site for newer versions of this package. +Please check TLD Linux ftp site for newer versions of this package. Please consult the MySQL manual section: 'Problems running mysql_install_db', and the manual section that describes problems on -your OS. Another information source is the MySQL email archive. +your OS. Another information source is the MySQL email archive. END_OF_MSG exit 1 fi + + # if it's first server, register as default + 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/mysql/mysqld.conf ]; then + mv "$MYSQL_CLUSTER_DIR/mysqld.conf" /etc/mysql/mysqld.conf + fi } # @@ -712,7 +691,7 @@ case "$action" in ;; flush-logs) for mysqldir in $DB_CLUSTERS; do - mysqlgetconfig "$mysqldir" + mysqlgetconfig "$mysqldir" # just if mysqld is really running if /usr/bin/mysqladmin --defaults-file="$MYSQL_CONFIG" --socket="$MYSQL_SOCKET" ping >/dev/null 2>&1; then /usr/bin/mysqladmin --defaults-file="$MYSQL_CONFIG" --socket="$MYSQL_SOCKET" flush-logs diff --git a/mysql.spec b/mysql.spec index 5fc8005..b38b30d 100644 --- a/mysql.spec +++ b/mysql.spec @@ -9,6 +9,16 @@ # - segfaults on select from non-mysql user (caused by builder environment): # https://bugs.launchpad.net/pld-linux/+bug/381904 # (profiling disabled temporaily to workaround this) +# - unpackaged files: +# /usr/COPYING.AGPLv3 +# /usr/COPYING.GPLv2 +# /usr/PATENTS +# /usr/README.md +# /usr/bin/mysqlxtest +# /usr/include/backup.h +# 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. # # Conditional build: %bcond_with autodeps # BR packages needed only for resolving deps @@ -17,14 +27,24 @@ %bcond_without federated # Federated storage engine support %bcond_without raid # RAID support %bcond_without ssl # OpenSSL support -%bcond_without systemtap # systemtap/dtrace probes +%bcond_with systemtap # systemtap/dtrace probes %bcond_without tcpd # libwrap (tcp_wrappers) support -%bcond_without sphinx # Sphinx storage engine support +%bcond_with sphinx # Sphinx storage engine support +%bcond_without tokudb # TokuDB +%bcond_without rocksdb # RocksDB +# 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 +# tokudb is only supported on x86_64 +%ifnarch %{x8664} +%undefine with_rocksdb +%undefine with_tokudb +%endif + %define rel 1 -%define percona_rel 76.2 +%define percona_rel 20 %include /usr/lib/rpm/macros.perl Summary: MySQL: a very fast and reliable SQL database engine Summary(de.UTF-8): MySQL: ist eine SQL-Datenbank @@ -35,18 +55,22 @@ Summary(ru.UTF-8): MySQL - быстрый SQL-сервер Summary(uk.UTF-8): MySQL - швидкий SQL-сервер Summary(zh_CN.UTF-8): MySQL数据库服务器 Name: mysql -Version: 5.6.29 +Version: 5.7.21 Release: %{percona_rel}.%{rel} License: GPL + MySQL FLOSS Exception Group: Applications/Databases -Source0: http://www.percona.com/downloads/Percona-Server-5.6/LATEST/source/tarball/percona-server-%{version}-%{percona_rel}.tar.gz -# Source0-md5: 8a0e3327e5b850852af6b9ca614d6bd7 -Source100: http://www.sphinxsearch.com/files/sphinx-2.2.10-release.tar.gz -# Source100-md5: dda52b24d8348fc09e26d8a649a231d2 +Source0: https://www.percona.com/downloads/Percona-Server-5.7/LATEST/source/tarball/%{name}-%{version}-%{percona_rel}.tar.gz +# Source0-md5: e5cf31dd63d268e78c247ffd3bde0164 +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 -Source4: %{name}d.conf +Source4: mysqld.conf Source5: %{name}-clusters.conf Source7: %{name}-ndb.init Source8: %{name}-ndb.sysconfig @@ -56,35 +80,36 @@ Source11: %{name}-ndb-cpc.init Source12: %{name}-ndb-cpc.sysconfig Source13: %{name}-client.conf Source14: my.cnf -Patch1: %{name}-versioning.patch -Patch2: %{name}hotcopy-5.0-5.5.patch -Patch3: bug-67402.patch -Patch4: %{name}-no-default-secure-auth.patch -# from fedora -Patch6: %{name}-system-users.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 +Patch0: mysql-opt.patch +Patch1: mysql-versioning.patch + +Patch7: lz4.patch + +Patch11: mysql-upgrade.patch +Patch12: mysql-config.patch +Patch18: mysql-sphinx.patch +Patch19: mysql-chain-certs.patch # from fedora -Patch20: %{name}-dubious-exports.patch -Patch21: bug-66589.patch -Patch22: bug-44278.patch -URL: http://www.mysql.com/products/community/ +Patch20: mysql-dubious-exports.patch + +Patch24: mysql-cmake.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: curl-devel BuildRequires: readline-devel >= 6.2 BuildRequires: libstdc++-devel >= 5:4.0 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 %{?with_autodeps:BuildRequires: perl-DBI} BuildRequires: perl-devel >= 1:5.6.1 +BuildRequires: protobuf-devel BuildRequires: python-modules BuildRequires: rpm-perlprov >= 4.1-13 BuildRequires: rpmbuild(macros) >= 1.597 @@ -115,111 +140,115 @@ Obsoletes: mysql-server Conflicts: logrotate < 3.8.0 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) -%define _orgname percona-server %define _libexecdir %{_sbindir} %define _localstatedir /var/lib/mysql -%define _mysqlhome /home/services/mysql +%define _mysqlhome /home/services/%{name} %description -MySQL is a true multi-user, multi-threaded SQL (Structured Query -Language) database server. SQL is the most popular database language -in the world. MySQL is a client/server implementation that consists of -a server daemon mysqld and many different client programs/libraries. - -The main goals of MySQL are speed, robustness and easy to use. MySQL -was originally developed because we at Tcx needed a SQL server that -could handle very big databases with magnitude higher speed than what -any database vendor could offer to us. We have now been using MySQL -since 1996 in a environment with more than 40 databases, 10,000 -tables, of which more than 500 have more than 7 million rows. This is -about 50G of mission critical data. - -The base upon which MySQL is built is a set of routines that have been -used in a highly demanding production environment for many years. -While MySQL is still in development, it already offers a rich and -highly useful function set. +MySQL is a true multi-user, multi-threaded SQL (Structured +Query Language) database server. SQL is the most popular database +language in the world. MySQL is a client/server +implementation that consists of a server daemon mysqld and many +different client programs/libraries. + +The main goals of MySQL are speed, robustness and easy to +use. MySQL was originally developed because we at Tcx needed +a SQL server that could handle very big databases with magnitude +higher speed than what any database vendor could offer to us. We have +now been using MySQL since 1996 in a environment with more +than 40 databases, 10,000 tables, of which more than 500 have more +than 7 million rows. This is about 50G of mission critical data. + +The base upon which MySQL is built is a set of routines that +have been used in a highly demanding production environment for many +years. While MySQL is still in development, it already offers +a rich and highly useful function set. %description -l fr.UTF-8 -MySQL est un serveur de bases de donnees SQL vraiment multi-usagers et -multi-taches. Le langage SQL est le langage de bases de donnees le -plus populaire au monde. MySQL est une implementation client/serveur -qui consiste en un serveur (mysqld) et differents -programmes/bibliotheques clientes. - -Les objectifs principaux de MySQL sont: vitesse, robustesse et -facilite d'utilisation. MySQL fut originalement developpe parce que -nous, chez Tcx, avions besoin d'un serveur SQL qui pouvait gerer de -tres grandes bases de donnees avec une vitesse d'un ordre de magnitude -superieur a ce que n'importe quel vendeur pouvait nous offrir. Nous -utilisons MySQL depuis 1996 dans un environnement avec plus de 40 -bases de donnees, 10000 tables, desquelles plus de 500 ont plus de 7 -millions de lignes. Ceci represente environ 50G de donnees critiques. - -A la base de la conception de MySQL, on retrouve une serie de routines -qui ont ete utilisees dans un environnement de production pendant -plusieurs annees. Meme si MySQL est encore en developpement, il offre -deja une riche et utile serie de fonctions. +MySQL est un serveur de bases de donnees SQL vraiment +multi-usagers et multi-taches. Le langage SQL est le langage de bases +de donnees le plus populaire au monde. MySQL est une +implementation client/serveur qui consiste en un serveur (mysqld) et +differents programmes/bibliotheques clientes. + +Les objectifs principaux de MySQL sont: vitesse, robustesse +et facilite d'utilisation. MySQL fut originalement developpe +parce que nous, chez Tcx, avions besoin d'un serveur SQL qui pouvait +gerer de tres grandes bases de donnees avec une vitesse d'un ordre de +magnitude superieur a ce que n'importe quel vendeur pouvait nous +offrir. Nous utilisons MySQL depuis 1996 dans un +environnement avec plus de 40 bases de donnees, 10000 tables, +desquelles plus de 500 ont plus de 7 millions de lignes. Ceci +represente environ 50G de donnees critiques. + +A la base de la conception de MySQL, on retrouve une serie de +routines qui ont ete utilisees dans un environnement de production +pendant plusieurs annees. Meme si MySQL est encore en +developpement, il offre deja une riche et utile serie de fonctions. %description -l pl.UTF-8 -MySQL to prawdziwie wieloużytkownikowy, wielowątkowy serwer baz danych -SQL. SQL jest najpopularniejszym na świecie językiem używanym do baz -danych. MySQL to implementacja klient/serwer składająca się z demona -mysqld i wielu różnych programów i bibliotek klienckich. - -Głównymi celami MySQL-a są szybkość, potęga i łatwość użytkowania. -MySQL oryginalnie był tworzony, ponieważ autorzy w Tcx potrzebowali -serwera SQL do obsługi bardzo dużych baz danych z szybkością o wiele -większą, niż mogli zaoferować inni producenci baz danych. Używają go -od 1996 roku w środowisku z ponad 40 bazami danych, 10 000 tabel, z -których ponad 500 zawiera ponad 7 milionów rekordów - w sumie około -50GB krytycznych danych. - -Baza, na której oparty jest MySQL, składa się ze zbioru procedur, -które były używane w bardzo wymagającym środowisku produkcyjnym przez -wiele lat. Pomimo, że MySQL jest ciągle rozwijany, już oferuje bogaty -i użyteczny zbiór funkcji. +MySQL to prawdziwie wieloużytkownikowy, wielowątkowy serwer +baz danych SQL. SQL jest najpopularniejszym na świecie językiem +używanym do baz danych. MySQL to implementacja klient/serwer +składająca się z demona mysqld i wielu różnych programów i bibliotek +klienckich. + +Głównymi celami MySQL-a są szybkość, potęga i łatwość +użytkowania. MySQL oryginalnie był tworzony, ponieważ autorzy +w Tcx potrzebowali serwera SQL do obsługi bardzo dużych baz danych z +szybkością o wiele większą, niż mogli zaoferować inni producenci baz +danych. Używają go od 1996 roku w środowisku z ponad 40 bazami danych, +10 000 tabel, z których ponad 500 zawiera ponad 7 milionów rekordów - +w sumie około 50GB krytycznych danych. + +Baza, na której oparty jest MySQL, składa się ze zbioru +procedur, które były używane w bardzo wymagającym środowisku +produkcyjnym przez wiele lat. Pomimo, że MySQL jest ciągle +rozwijany, już oferuje bogaty i użyteczny zbiór funkcji. %description -l de.UTF-8 -MySQL ist eine SQL-Datenbank. Allerdings ist sie im Gegensatz zu -Oracle, DB2 oder PostgreSQL keine relationale Datenbank. Die Daten +MySQL ist eine SQL-Datenbank. Allerdings ist sie im Gegensatz +zu Oracle, DB2 oder PostgreSQL keine relationale Datenbank. Die Daten werden zwar in zweidimensionalen Tabellen gespeichert und können mit einem Primärschlüssel versehen werden. Es ist aber keine Definition eines Fremdschlüssels möglich. Der Benutzer ist somit bei einer -MySQL-Datenbank völlig allein für die (referenzielle) Integrität der -Daten verantwortlich. Allein durch die Nutzung externer +MySQL-Datenbank völlig allein für die (referenzielle) +Integrität der Daten verantwortlich. Allein durch die Nutzung externer Tabellenformate, wie InnoDB bzw Berkeley DB wird eine Relationalität -ermöglicht. Diese Projekte sind aber getrennt von MySQL zu betrachten. +ermöglicht. Diese Projekte sind aber getrennt von MySQL zu +betrachten. %description -l pt_BR.UTF-8 -O MySQL é um servidor de banco de dados SQL realmente multiusuário e -multi-tarefa. A linguagem SQL é a mais popular linguagem para banco de -dados no mundo. O MySQL é uma implementação cliente/servidor que -consiste de um servidor chamado mysqld e diversos -programas/bibliotecas clientes. Os principais objetivos do MySQL são: -velocidade, robustez e facilidade de uso. O MySQL foi originalmente -desenvolvido porque nós na Tcx precisávamos de um servidor SQL que -pudesse lidar com grandes bases de dados e com uma velocidade muito -maior do que a que qualquer vendedor podia nos oferecer. Estamos -usando o MySQL desde 1996 em um ambiente com mais de 40 bases de dados -com 10.000 tabelas, das quais mais de 500 têm mais de 7 milhões de -linhas. Isto é o equivalente a aproximadamente 50G de dados críticos. -A base da construção do MySQL é uma série de rotinas que foram usadas -em um ambiente de produção com alta demanda por muitos anos. Mesmo o -MySQL estando ainda em desenvolvimento, ele já oferece um conjunto de +O MySQL é um servidor de banco de dados SQL realmente +multiusuário e multi-tarefa. A linguagem SQL é a mais popular +linguagem para banco de dados no mundo. O MySQL é uma +implementação cliente/servidor que consiste de um servidor chamado +mysqld e diversos programas/bibliotecas clientes. Os principais +objetivos do MySQL são: velocidade, robustez e facilidade de +uso. O MySQL foi originalmente desenvolvido porque nós na Tcx +precisávamos de um servidor SQL que pudesse lidar com grandes bases de +dados e com uma velocidade muito maior do que a que qualquer vendedor +podia nos oferecer. Estamos usando o MySQL desde 1996 em um +ambiente com mais de 40 bases de dados com 10.000 tabelas, das quais +mais de 500 têm mais de 7 milhões de linhas. Isto é o equivalente a +aproximadamente 50G de dados críticos. A base da construção do Percona +Server é uma série de rotinas que foram usadas em um ambiente de +produção com alta demanda por muitos anos. Mesmo o MySQL +estando ainda em desenvolvimento, ele já oferece um conjunto de funções muito ricas e úteis. Veja a documentação para maiores informações. %description -l ru.UTF-8 -MySQL - это SQL (Structured Query Language) сервер базы данных. MySQL -была написана Michael'ом (monty) Widenius'ом. См. файл CREDITS в -дистрибутиве на предмет других участников проекта и прочей информации -о MySQL. +MySQL - это SQL (Structured Query Language) сервер базы +данных. MySQL была написана Michael'ом (monty) Widenius'ом. +См. файл CREDITS в дистрибутиве на предмет других участников проекта и +прочей информации о MySQL. %description -l uk.UTF-8 -MySQL - це SQL (Structured Query Language) сервер бази даних. MySQL -було написано Michael'ом (monty) Widenius'ом. Див. файл CREDITS в -дистрибутиві для інформації про інших учасників проекту та іншої -інформації. +MySQL - це SQL (Structured Query Language) сервер бази даних. +MySQL було написано Michael'ом (monty) Widenius'ом. Див. файл +CREDITS в дистрибутиві для інформації про інших учасників проекту та +іншої інформації. %package charsets Summary: MySQL - character sets definitions @@ -234,32 +263,6 @@ and server. Ten pakiet zawiera definicje kodowań znaków potrzebne dla serwera i klienta. -%package -n mysqlhotcopy -Summary: mysqlhotcopy - A MySQL database backup program -Summary(pl.UTF-8): mysqlhotcopy - program do tworzenia kopii zapasowych baz MySQL -Group: Applications/Databases -Requires: perl-DBD-mysql - -%description -n mysqlhotcopy -mysqlhotcopy uses LOCK TABLES, FLUSH TABLES, and cp or scp to make a -database backup quickly. It is the fastest way to make a backup of the -database or single tables, but it can be run only on the same machine -where the database directories are located. mysqlhotcopy works only -for backing up MyISAM and ARCHIVE tables. - -See innobackup package to backup InnoDB tables. - -%description -n mysqlhotcopy -l pl.UTF-8 -mysqlhotcopy wykorzystuje LOCK TABLES, FLUSH TABLES oraz cp i scp do -szybkiego tworzenia kopii zapasowych baz danych. Jest to najszybszy -sposób wykonania kopii zapasowej bazy danych lub pojedynczych tabel, -ale może działać tylko na maszynie, na której znajdują się katalogi z -bazą danych. mysqlhotcopy działa tylko dla tabel typu MyISAM i -ARCHIVE. - -Narzędzie do tworzenia kopii tabel InnoDB znajduje się w pakiecie -innobackup. - %package extras Summary: MySQL additional utilities Summary(pl.UTF-8): Dodatkowe narzędzia do MySQL @@ -268,21 +271,19 @@ Requires: %{name}-client = %{version}-%{release} Requires: %{name}-libs = %{version}-%{release} %description extras -MySQL additional utilities except Perl scripts (they may be found in -%{name}-extras-perl package). +MySQL additional utilities except Perl scripts (they may be +found in %{name}-extras-perl package). %description extras -l pl.UTF-8 -Dodatkowe narzędzia do MySQL - z wyjątkiem skryptów Perla (które są w -pakiecie %{name}-extras-perl). +Dodatkowe narzędzia do MySQL - z wyjątkiem skryptów Perla +(które są w pakiecie %{name}-extras-perl). %package extras-perl Summary: MySQL additional utilities written in Perl Summary(pl.UTF-8): Dodatkowe narzędzia do MySQL napisane w Perlu Group: Applications/Databases Requires: %{name}-extras = %{version}-%{release} -# this is just for the sake of smooth upgrade, not to break systems -Requires: mysqlhotcopy = %{version}-%{release} -Requires: perl(DBD::mysql) +Requires: perl-DBD-mysql %description extras-perl MySQL additional utilities written in Perl. @@ -341,10 +342,11 @@ Summary(ru.UTF-8): MySQL - хедеры и библиотеки разработ Summary(uk.UTF-8): MySQL - хедери та бібліотеки програміста Group: Development/Libraries Requires: %{name}-libs = %{version}-%{release} -%{?with_ssl:Requires: openssl-devel} +%{?with_ssl:Requires: openssl-devel} Requires: zlib-devel Obsoletes: MySQL-devel Obsoletes: libmysql10-devel +Obsoletes: webscalesql-devel %description devel This package contains the development header files and other files @@ -361,7 +363,8 @@ klienckich MySQL. %description devel -l pt_BR.UTF-8 Este pacote contém os arquivos de cabeçalho (header files) e -bibliotecas necessárias para desenvolver aplicações clientes do MySQL. +bibliotecas necessárias para desenvolver aplicações clientes do +MySQL. %description devel -l ru.UTF-8 Этот пакет содержит хедеры и библиотеки разработчика, необходимые для @@ -413,14 +416,16 @@ This package contains MySQL benchmark scripts and data. Programy testujące szybkość serwera MySQL. %description bench -l pt_BR.UTF-8 -Este pacote contém medições de desempenho de scripts e dados do MySQL. +Este pacote contém medições de desempenho de scripts e dados do +MySQL. %description bench -l ru.UTF-8 Этот пакет содержит скрипты и данные для оценки производительности MySQL. %description bench -l uk.UTF-8 -Цей пакет містить скрипти та дані для оцінки продуктивності MySQL. +Цей пакет містить скрипти та дані для оцінки продуктивності Percona +Server. %package doc Summary: MySQL manual @@ -440,7 +445,8 @@ Group: Applications/Databases Requires: %{name}-libs = %{version}-%{release} %description ndb -This package contains the standard MySQL NDB Storage Engine Daemon. +This package contains the standard MySQL NDB Storage Engine +Daemon. %description ndb -l pl.UTF-8 Ten pakiet zawiera standardowego demona silnika przechowywania danych @@ -465,10 +471,12 @@ Group: Applications/Databases Requires: %{name}-libs = %{version}-%{release} %description ndb-mgm -This package contains the standard MySQL NDB Management Daemon. +This package contains the standard MySQL NDB Management +Daemon. %description ndb-mgm -l pl.UTF-8 -Ten pakiet zawiera standardowego demona zarządzającego MySQL NDB. +Ten pakiet zawiera standardowego demona zarządzającego MySQL +NDB. %package ndb-cpc Summary: MySQL - NDB CPC Daemon @@ -483,11 +491,9 @@ This package contains the standard MySQL NDB CPC Daemon. Ten pakiet zawiera standardowego demona MySQL NDB CPC. %prep -%setup -q -n percona-server-%{version}-%{percona_rel} %{?with_sphinx:-a100} +%setup -q -n percona-server-%{version}-%{percona_rel} %{?with_sphinx:-a100} %{!?with_system_boost:-a101} -# we want to use old, mysql compatible client library name -find . -name CMakeLists.txt -exec sed -i -e 's#perconaserverclient#mysqlclient#g' "{}" ";" -sed -i -e 's#perconaserverclient#mysqlclient#g' libmysql/libmysql.{ver.in,map} scripts/mysql_config.* +%patch0 -p1 %if %{with sphinx} # http://www.sphinxsearch.com/docs/manual-0.9.9.html#sphinxse-mysql51 @@ -495,27 +501,20 @@ mv sphinx-*/mysqlse storage/sphinx %patch18 -p1 %endif %patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch6 -p1 +%patch7 -p1 -%patch9 -p1 -%patch11 -p1 -%patch12 -p1 -%patch14 -p0 %patch19 -p1 %patch20 -p1 -%patch21 -p1 -%patch22 -p1 + +%patch24 -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 +[ -f sql/sql_yacc.cc ] && %{__rm} sql/sql_yacc.cc +[ -f sql/sql_yacc.h ] && %{__rm} sql/sql_yacc.h # map has more sane versioning that default "global everything" in ver.in -cp -p libmysql/libmysql.map libmysql/libmysql.ver.in +#cp -p libmysql/libmysql.map libmysql/libmysql.ver.in %build install -d build @@ -524,10 +523,13 @@ cd build # (it defaults to first cluster but user may change it to whatever # cluster it wants) -%cmake \ +CPPFLAGS="%{rpmcppflags}" \ +%cmake .. \ -DCMAKE_BUILD_TYPE=%{!?debug:RelWithDebInfo}%{?debug:Debug} \ - -DCMAKE_C_FLAGS_RELEASE="%{rpmcflags} -DNDEBUG -fno-omit-frame-pointer -fno-strict-aliasing" \ - -DCMAKE_CXX_FLAGS_RELEASE="%{rpmcxxflags} -DNDEBUG -fno-omit-frame-pointer -fno-strict-aliasing" \ + -DCMAKE_C_FLAGS_DEBUG="-fno-omit-frame-pointer -fno-strict-aliasing -Wimplicit-fallthrough=0" \ + -DCMAKE_CXX_FLAGS_DEBUG="-fno-omit-frame-pointer -fno-strict-aliasing -Wimplicit-fallthrough=0" \ + -DCMAKE_C_FLAGS_RELWITHDEBINFO="%{rpmcflags} -DNDEBUG -fno-omit-frame-pointer -fno-strict-aliasing -Wimplicit-fallthrough=0" \ + -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="%{rpmcxxflags} -DNDEBUG -fno-omit-frame-pointer -fno-strict-aliasing -Wimplicit-fallthrough=0" \ -DCOMPILATION_COMMENT="TLD Linux MySQL RPM" \ -DCURSES_INCLUDE_PATH=/usr/include/ncurses \ %{?with_systemtap:-DENABLE_DTRACE=ON} \ @@ -535,10 +537,12 @@ cd build -DINSTALL_LAYOUT=RPM \ -DINSTALL_LIBDIR=%{_lib} \ -DINSTALL_MYSQLTESTDIR_RPM="" \ - -DINSTALL_PLUGINDIR=%{_libdir}/%{name}/plugin \ + -DINSTALL_PLUGINDIR=%{_lib}/%{name}/plugin \ -DINSTALL_SQLBENCHDIR=%{_datadir} \ - -DINSTALL_SUPPORTFILESDIR=%{_datadir}/%{name}-support \ - -DMYSQL_UNIX_ADDR=/var/lib/%{name}/%{name}.sock \ + -DINSTALL_SUPPORTFILESDIR=share/%{name}-support \ + -DINSTALL_MYSQLSHAREDIR=share/%{name} \ + -DINSTALL_SECURE_FILE_PRIVDIR="" \ + -DMYSQL_UNIX_ADDR=/var/lib/mysql/mysql.sock \ %{?debug:-DWITH_DEBUG=ON} \ -DWITHOUT_EXAMPLE_STORAGE_ENGINE=1 \ -DWITH_FAST_MUTEXES=ON \ @@ -546,13 +550,21 @@ cd build -DWITH_PAM=ON \ -DWITH_PERFSCHEMA_STORAGE_ENGINE=1 \ -DWITH_PIC=ON \ - -DWITH_READLINE=system \ + -DWITH_SCALABILITY_METRICS=ON \ -DWITH_SSL=%{?with_ssl:system}%{!?with_ssl:no} \ - -DWITHOUT_TOKUDB=1 \ - -DWITHOUT_TOKUDB_STORAGE_ENGINE=1 \ -DWITH_UNIT_TESTS=%{?with_tests:ON}%{!?with_tests:OFF} \ + %{!?with_tokudb:-DWITHOUT_TOKUDB=ON} \ + %{!?with_rocksdb:-DWITHOUT_ROCKSDB=ON} \ +%if %{without system_boost} + %{!?with_system_boost:-DWITH_BOOST="$(pwd)/$(ls -1d ../boost_*)"} \ +%endif -DWITH_ZLIB=system \ - .. + -DWITH_READLINE=system \ + -DWITH_LZ4=system \ + -DWITH_LIBEVENT=system \ + -DWITH_PROTOBUF=system \ + -DWITH_MECAB=system \ + -DTMPDIR=/var/tmp %{__make} @@ -560,17 +572,17 @@ cd build %install rm -rf $RPM_BUILD_ROOT -install -d $RPM_BUILD_ROOT/etc/{logrotate.d,rc.d/init.d,sysconfig,mysql,skel} \ - $RPM_BUILD_ROOT/var/{log/{archive,}/mysql,lib/mysql} \ +install -d $RPM_BUILD_ROOT/etc/{logrotate.d,rc.d/init.d,sysconfig,%{name},skel} \ + $RPM_BUILD_ROOT/var/{log/{archive,}/%{name},lib/mysql} \ $RPM_BUILD_ROOT%{_mysqlhome} \ $RPM_BUILD_ROOT%{_libdir} %{__make} -C build install \ DESTDIR=$RPM_BUILD_ROOT -install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql -cp -a %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/mysql -cp -a %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/mysql +install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name} +cp -a %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name} +cp -a %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/%{name} # This is template for configuration file which is created after 'service mysql init' cp -a %{SOURCE4} mysqld.conf cp -a %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/clusters.conf @@ -593,12 +605,12 @@ cp -a %{SOURCE14} $RPM_BUILD_ROOT/etc/skel/.my.cnf # NDB %if %{with ndb} -install -p %{SOURCE7} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql-ndb -cp -a %{SOURCE8} $RPM_BUILD_ROOT/etc/sysconfig/mysql-ndb -install -p %{SOURCE9} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql-ndb-mgm -cp -a %{SOURCE10} $RPM_BUILD_ROOT/etc/sysconfig/mysql-ndb-mgm -install -p %{SOURCE11} $RPM_BUILD_ROOT/etc/rc.d/init.d/mysql-ndb-cpc -cp -a %{SOURCE12} $RPM_BUILD_ROOT/etc/sysconfig/mysql-ndb-cpc +install -p %{SOURCE7} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}-ndb +cp -a %{SOURCE8} $RPM_BUILD_ROOT/etc/sysconfig/%{name}-ndb +install -p %{SOURCE9} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}-ndb-mgm +cp -a %{SOURCE10} $RPM_BUILD_ROOT/etc/sysconfig/%{name}-ndb-mgm +install -p %{SOURCE11} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}-ndb-cpc +cp -a %{SOURCE12} $RPM_BUILD_ROOT/etc/sysconfig/%{name}-ndb-cpc %endif sed -i -e 's,/usr//usr,%{_prefix},g' $RPM_BUILD_ROOT%{_bindir}/mysql_config @@ -613,7 +625,7 @@ mv $RPM_BUILD_ROOT%{_bindir}/{,mysql_}resolve_stack_dump mv $RPM_BUILD_ROOT%{_mandir}/man1/{,mysql_}resolve_stack_dump.1 # move to _sysconfdir -mv $RPM_BUILD_ROOT{%{_bindir},%{_sysconfdir}}/mysqlaccess.conf +#mv $RPM_BUILD_ROOT{%{_bindir},%{_sysconfdir}}/mysqlaccess.conf # not useful without -debug build %{!?debug:%{__rm} $RPM_BUILD_ROOT%{_bindir}/mysql_resolve_stack_dump} @@ -630,6 +642,7 @@ mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/innochecksum mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/myisamchk mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/myisamlog mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/myisampack +#mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/mysql_fix_privilege_tables mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/my_print_defaults sed -i -e 's#/usr/bin/my_print_defaults#%{_sbindir}/my_print_defaults#g' $RPM_BUILD_ROOT%{_bindir}/mysql_install_db mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/mysqlcheck @@ -639,9 +652,12 @@ mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/mysqlcheck %{__rm} $RPM_BUILD_ROOT%{_bindir}/mysqld_safe %{__rm} $RPM_BUILD_ROOT%{_bindir}/mysqld_multi %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/mysqld_{multi,safe}* +#rm $RPM_BUILD_ROOT%{_datadir}/%{name}/mysql-log-rotate +#rm $RPM_BUILD_ROOT%{_datadir}/%{name}/mysql.server +#rm $RPM_BUILD_ROOT%{_datadir}/%{name}/binary-configure %{__rm} $RPM_BUILD_ROOT%{_datadir}/%{name}/errmsg-utf8.txt -%{__rm} $RPM_BUILD_ROOT%{_bindir}/mysql_waitpid -%{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/mysql_waitpid.1* +#%{__rm} $RPM_BUILD_ROOT%{_bindir}/mysql_waitpid +#%{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/mysql_waitpid.1* %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/mysql.server* %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/mysqlman.1* %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/comp_err.1* @@ -672,13 +688,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 @@ -689,186 +705,54 @@ 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 %postun libs -p /sbin/ldconfig -%triggerpostun -- mysql < 4.0.20-2.4 -# For clusters in /etc/%{name}/clusters.conf -if [ -f /etc/sysconfig/mysql ]; then - . /etc/sysconfig/mysql - if [ -n "$MYSQL_DB_CLUSTERS" ]; then - for i in "$MYSQL_DB_CLUSTERS"; do - echo "$i/mysqld.conf=$i" >> /etc/%{name}/clusters.conf - done - echo "# Do not use **obsolete** option MYSQL_DB_CLUSTERS" >> /etc/sysconfig/mysql - echo "# USE /etc/%{name}/clusters.conf instead" >> /etc/sysconfig/mysql - echo "Converted clusters from MYSQL_DB_CLUSTERS to /etc/%{name}/clusters.conf." - echo "You NEED to fix your /etc/sysconfig/mysql and verify /etc/%{name}/clusters.conf." - fi -fi - -%triggerpostun -- mysql < 4.1.1 -# For better compatibility with prevoius versions: -for config in $(awk -F= '!/^#/ && /=/{print $1}' /etc/%{name}/clusters.conf); do - if echo "$config" | grep -q '^/'; then - config_file="$config" - elif [ -f "/etc/%{name}/$config" ]; then - config_file=/etc/%{name}/$config - else - clusterdir=$(awk -F= "/^$config/{print \$2}" /etc/%{name}/clusters.conf) - if [ -z "$clusterdir" ]; then - echo >&2 "Can't find cluster dir for $config!" - echo >&2 "Please remove extra (leading) spaces from /etc/%{name}/clusters.conf" - exit 1 - fi - config_file="$clusterdir/mysqld.conf" - fi - - if [ ! -f "$config_file" ]; then - echo >&2 "Lost myself! Please report this (with above errors, if any) to TLD Linux mailing lists." - exit 1 - fi - echo "Adding option old-passwords to config: $config_file" - echo "If you want to use new, better passwords - remove it" - - # sed magic to add 'old-passwords' to [mysqld] section - sed -i -e '/./{H;$!d;};x;/\[mysqld\]/{ - a - a; Compatibility options: - aold-passwords - } - ' $config_file -done - -%banner -e %{name}-4.1.x <<-EOF - If you want to use new help tables in MySQL 4.1.x then You'll need to import the help data: - mysql -u mysql mysql < %{_datadir}/%{name}/fill_help_tables.sql -EOF -#' - -%triggerpostun -- mysql < 5.1.0 -configs="" -for config in $(awk -F= '!/^#/ && /=/{print $1}' /etc/%{name}/clusters.conf); do - if echo "$config" | grep -q '^/'; then - config_file="$config" - elif [ -f "/etc/%{name}/$config" ]; then - config_file=/etc/%{name}/$config - else - clusterdir=$(awk -F= "/^$config/{print \$2}" /etc/%{name}/clusters.conf) - if [ -z "$clusterdir" ]; then - echo >&2 "Can't find cluster dir for $config!" - echo >&2 "Please remove extra (leading) spaces from /etc/%{name}/clusters.conf" - exit 1 - fi - config_file="$clusterdir/mysqld.conf" - fi - - if [ ! -f "$config_file" ]; then - echo >&2 "ERROR: Can't find real config file for $config! Please report this (with above errors, if any) to TLD Linux mailing lists." - continue - fi - configs="$configs $config_file" -done - -( -echo 'You should run MySQL upgrade script *after* restarting MySQL server for all MySQL clusters.' -echo 'Thus, you should invoke:' -for config in $configs; do - sed -i -e ' - s/set-variable\s*=\s* // - # use # as comment in config - s/^;/#/ - ' $config - - datadir=$(awk -F= '!/^#/ && $1 ~ /datadir/{print $2}' $config | xargs) - echo "# mysql_upgrade --datadir=$datadir" -done -) | %banner -e %{name}-5.1 - -%triggerpostun -- mysql < 5.5.0 -configs="" -for config in $(awk -F= '!/^#/ && /=/{print $1}' /etc/%{name}/clusters.conf); do - if echo "$config" | grep -q '^/'; then - config_file="$config" - elif [ -f "/etc/%{name}/$config" ]; then - config_file=/etc/%{name}/$config - else - clusterdir=$(awk -F= "/^$config/{print \$2}" /etc/%{name}/clusters.conf) - if [ -z "$clusterdir" ]; then - echo >&2 "Can't find cluster dir for $config!" - echo >&2 "Please remove extra (leading) spaces from /etc/%{name}/clusters.conf" - exit 1 - fi - config_file="$clusterdir/mysqld.conf" - fi - - if [ ! -f "$config_file" ]; then - echo >&2 "ERROR: Can't find real config file for $config! Please report this (with above errors, if any) to TLD Linux mailing lists." - continue - fi - configs="$configs $config_file" -done - -( -echo 'You should run MySQL upgrade script *after* restarting MySQL server for all MySQL clusters.' -echo 'Thus, you should invoke:' -for config in $configs; do - sed -i -e ' - s/^language *= *polish/lc-messages = pl_PL/i - s/set-variable\s*=\s* // - s/^skip-locking/skip-external-locking/ - # this is not valid for server. it is client option - s/^default-character-set/# client-config: &/ - # use # as comment in config - s/^;/#/ - ' $config - - socket=$(awk -F= '!/^#/ && $1 ~ /socket/{print $2}' $config | xargs) - echo "# mysql_upgrade ${socket:+--socket=$socket}" -done -) | %banner -e %{name}-5.5 - %files %defattr(644,root,root,755) -%doc build/support-files/*.cnf +%doc build-ps/rpm/*.cnf %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name} %attr(754,root,root) /etc/rc.d/init.d/%{name} %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name} %attr(640,root,mysql) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/clusters.conf +%attr(755,root,root) %{_bindir}/ps_mysqld_helper +%attr(755,root,root) %{_bindir}/ps_tokudb_admin +%attr(755,root,root) %{_bindir}/ps-admin %attr(755,root,root) %{_sbindir}/innochecksum %attr(755,root,root) %{_sbindir}/my_print_defaults %attr(755,root,root) %{_sbindir}/myisamchk %attr(755,root,root) %{_sbindir}/myisamlog %attr(755,root,root) %{_sbindir}/myisampack +#%attr(755,root,root) %{_sbindir}/mysql_fix_privilege_tables %attr(755,root,root) %{_sbindir}/mysql_plugin %attr(755,root,root) %{_sbindir}/mysql_upgrade %attr(755,root,root) %{_sbindir}/mysqlcheck @@ -877,30 +761,89 @@ done %dir %{_libdir}/%{name}/plugin %attr(755,root,root) %{_libdir}/%{name}/plugin/adt_null.so %attr(755,root,root) %{_libdir}/%{name}/plugin/audit_log.so -%attr(755,root,root) %{_libdir}/%{name}/plugin/auth.so -%attr(755,root,root) %{_libdir}/%{name}/plugin/auth_pam.so %attr(755,root,root) %{_libdir}/%{name}/plugin/auth_pam_compat.so +%attr(755,root,root) %{_libdir}/%{name}/plugin/auth_pam.so +%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/authentication_ldap_sasl_client.so +%attr(755,root,root) %{_libdir}/%{name}/plugin/connection_control.so %attr(755,root,root) %{_libdir}/%{name}/plugin/dialog.so +%attr(755,root,root) %{_libdir}/%{name}/plugin/group_replication.so +#%attr(755,root,root) %{_libdir}/%{name}/plugin/ha_archive.so +#%attr(755,root,root) %{_libdir}/%{name}/plugin/ha_blackhole.so +#%attr(755,root,root) %{_libdir}/%{name}/plugin/ha_federated.so +#%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/keyring_vault.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 +%attr(755,root,root) %{_libdir}/%{name}/plugin/libtest_framework.so +%attr(755,root,root) %{_libdir}/%{name}/plugin/libtest_services.so +%attr(755,root,root) %{_libdir}/%{name}/plugin/libtest_services_threaded.so +%attr(755,root,root) %{_libdir}/%{name}/plugin/libtest_session_detach.so +%attr(755,root,root) %{_libdir}/%{name}/plugin/libtest_session_info.so +%attr(755,root,root) %{_libdir}/%{name}/plugin/libtest_session_in_thd.so +%attr(755,root,root) %{_libdir}/%{name}/plugin/libtest_sql_2_sessions.so +%attr(755,root,root) %{_libdir}/%{name}/plugin/libtest_sql_all_col_types.so +%attr(755,root,root) %{_libdir}/%{name}/plugin/libtest_sql_cmds_1.so +%attr(755,root,root) %{_libdir}/%{name}/plugin/libtest_sql_commit.so +%attr(755,root,root) %{_libdir}/%{name}/plugin/libtest_sql_complex.so +%attr(755,root,root) %{_libdir}/%{name}/plugin/libtest_sql_errors.so +%attr(755,root,root) %{_libdir}/%{name}/plugin/libtest_sql_lock.so +%attr(755,root,root) %{_libdir}/%{name}/plugin/libtest_sql_processlist.so +%attr(755,root,root) %{_libdir}/%{name}/plugin/libtest_sql_replication.so +%attr(755,root,root) %{_libdir}/%{name}/plugin/libtest_sql_shutdown.so +%attr(755,root,root) %{_libdir}/%{name}/plugin/libtest_sql_sqlmode.so +%attr(755,root,root) %{_libdir}/%{name}/plugin/libtest_sql_stored_procedures_functions.so +%attr(755,root,root) %{_libdir}/%{name}/plugin/libtest_sql_views_triggers.so +%attr(755,root,root) %{_libdir}/%{name}/plugin/libtest_x_sessions_deinit.so +%attr(755,root,root) %{_libdir}/%{name}/plugin/libtest_x_sessions_init.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 +%attr(755,root,root) %{_libdir}/%{name}/plugin/query_response_time.so +%attr(755,root,root) %{_libdir}/%{name}/plugin/replication_observers_example_plugin.so +%attr(755,root,root) %{_libdir}/%{name}/plugin/rewrite_example.so +%attr(755,root,root) %{_libdir}/%{name}/plugin/rewriter.so %attr(755,root,root) %{_libdir}/%{name}/plugin/scalability_metrics.so %attr(755,root,root) %{_libdir}/%{name}/plugin/semisync_master.so %attr(755,root,root) %{_libdir}/%{name}/plugin/semisync_slave.so +%attr(755,root,root) %{_libdir}/%{name}/plugin/test_security_context.so +%attr(755,root,root) %{_libdir}/%{name}/plugin/test_udf_services.so %attr(755,root,root) %{_libdir}/%{name}/plugin/validate_password.so +%attr(755,root,root) %{_libdir}/%{name}/plugin/version_token.so %if %{with sphinx} %attr(755,root,root) %{_libdir}/%{name}/plugin/ha_sphinx.so %endif +%if %{with tokudb} +%attr(755,root,root) %{_bindir}/tokuft_logprint +%attr(755,root,root) %{_bindir}/tokuftdump +%attr(755,root,root) %{_libdir}/%{name}/plugin/ha_tokudb.so +%attr(755,root,root) %{_libdir}/%{name}/plugin/tokudb_backup.so +%attr(755,root,root) %{_libdir}/libHotBackup.so +%endif +%if %{with rocksdb} +%attr(755,root,root) %{_bindir}/ldb +%attr(755,root,root) %{_bindir}/mysql_ldb +%attr(755,root,root) %{_bindir}/sst_dump +%attr(755,root,root) %{_libdir}/%{name}/plugin/ha_rocksdb.so +%endif # for plugins -%attr(755,root,root) %{_libdir}/libmysqlservices.so +#%attr(755,root,root) %{_libdir}/libmysqlservices.so %{_mandir}/man1/innochecksum.1* %{_mandir}/man1/my_print_defaults.1* %{_mandir}/man1/myisamchk.1* %{_mandir}/man1/myisamlog.1* %{_mandir}/man1/myisampack.1* +#%{_mandir}/man1/mysql_fix_privilege_tables.1* %{_mandir}/man1/mysql_plugin.1* %{_mandir}/man1/mysql_upgrade.1* %{_mandir}/man1/mysqlcheck.1* @@ -915,44 +858,50 @@ done %attr(700,mysql,mysql) %{_mysqlhome} # root:root is proper here for mysql.rpm while mysql:mysql is potential security hole %attr(751,root,root) /var/lib/mysql -%attr(750,mysql,mysql) %dir /var/log/mysql -%attr(750,mysql,mysql) %dir /var/log/archive/mysql -%attr(640,mysql,mysql) %ghost /var/log/mysql/* +%attr(750,mysql,mysql) %dir /var/log/%{name} +%attr(750,mysql,mysql) %dir /var/log/archive/%{name} +%attr(640,mysql,mysql) %ghost /var/log/%{name}/* # This is template for configuration file which is created after 'service mysql init' %{_datadir}/%{name}/mysqld.conf +%{_datadir}/%{name}/install_rewriter.sql %{_datadir}/%{name}/mysql_security_commands.sql -%{_datadir}/%{name}/mysql_system_tables_data.sql +%{_datadir}/%{name}/mysql_sys_schema.sql %{_datadir}/%{name}/mysql_system_tables.sql +%{_datadir}/%{name}/mysql_system_tables_data.sql %{_datadir}/%{name}/mysql_test_data_timezone.sql +%{_datadir}/%{name}/uninstall_rewriter.sql %{_datadir}/%{name}/english %{_datadir}/%{name}/dictionary.txt %{_datadir}/%{name}/fill_help_tables.sql %{_datadir}/%{name}/innodb_memcached_config.sql -%lang(bg) %{_datadir}/%{name}/bulgarian -%lang(cs) %{_datadir}/%{name}/czech -%lang(da) %{_datadir}/%{name}/danish -%lang(de) %{_datadir}/%{name}/german -%lang(el) %{_datadir}/%{name}/greek -%lang(es) %{_datadir}/%{name}/spanish -%lang(et) %{_datadir}/%{name}/estonian -%lang(fr) %{_datadir}/%{name}/french -%lang(hu) %{_datadir}/%{name}/hungarian -%lang(it) %{_datadir}/%{name}/italian -%lang(ja) %{_datadir}/%{name}/japanese -%lang(ko) %{_datadir}/%{name}/korean -%lang(nl) %{_datadir}/%{name}/dutch -%lang(nb) %{_datadir}/%{name}/norwegian -%lang(nn) %{_datadir}/%{name}/norwegian-ny -%lang(pl) %{_datadir}/%{name}/polish -%lang(pt) %{_datadir}/%{name}/portuguese -%lang(ro) %{_datadir}/%{name}/romanian -%lang(ru) %{_datadir}/%{name}/russian -%lang(sr) %{_datadir}/%{name}/serbian -%lang(sk) %{_datadir}/%{name}/slovak -%lang(sv) %{_datadir}/%{name}/swedish -%lang(uk) %{_datadir}/%{name}/ukrainian +#%{_datadir}/%{name}/mysql_fix_privilege_tables.sql +# Don't mark these with %%lang. These are used depending +# on database client settings. +%{_datadir}/%{name}/bulgarian +%{_datadir}/%{name}/czech +%{_datadir}/%{name}/danish +%{_datadir}/%{name}/german +%{_datadir}/%{name}/greek +%{_datadir}/%{name}/spanish +%{_datadir}/%{name}/estonian +%{_datadir}/%{name}/french +%{_datadir}/%{name}/hungarian +%{_datadir}/%{name}/italian +%{_datadir}/%{name}/japanese +%{_datadir}/%{name}/korean +%{_datadir}/%{name}/dutch +%{_datadir}/%{name}/norwegian +%{_datadir}/%{name}/norwegian-ny +%{_datadir}/%{name}/polish +%{_datadir}/%{name}/portuguese +%{_datadir}/%{name}/romanian +%{_datadir}/%{name}/russian +%{_datadir}/%{name}/serbian +%{_datadir}/%{name}/slovak +%{_datadir}/%{name}/swedish +%{_datadir}/%{name}/ukrainian %files charsets %defattr(644,root,root,755) @@ -961,7 +910,7 @@ done %files extras %defattr(644,root,root,755) -%attr(755,root,root) %{_bindir}/msql2mysql +#%attr(755,root,root) %{_bindir}/msql2mysql %attr(755,root,root) %{_bindir}/myisam_ftdump %attr(755,root,root) %{_bindir}/mysql_install_db %attr(755,root,root) %{_bindir}/mysql_secure_installation @@ -969,7 +918,7 @@ done %attr(755,root,root) %{_bindir}/perror %attr(755,root,root) %{_bindir}/replace %attr(755,root,root) %{_bindir}/resolveip -%{_mandir}/man1/msql2mysql.1* +#%{_mandir}/man1/msql2mysql.1* %{_mandir}/man1/myisam_ftdump.1* %{_mandir}/man1/mysql_install_db.1* %{_mandir}/man1/mysql_secure_installation.1* @@ -978,58 +927,61 @@ done %{_mandir}/man1/replace.1* %{_mandir}/man1/resolveip.1* -%files -n mysqlhotcopy -%defattr(644,root,root,755) -%attr(755,root,root) %{_bindir}/mysqlhotcopy -%{_mandir}/man1/mysqlhotcopy.1* - %files extras-perl %defattr(644,root,root,755) -%attr(755,root,root) %{_bindir}/mysql_convert_table_format -%attr(755,root,root) %{_bindir}/mysql_find_rows -%attr(755,root,root) %{_bindir}/mysql_fix_extensions -%attr(755,root,root) %{_bindir}/mysql_setpermission -%attr(755,root,root) %{_bindir}/mysql_zap -%attr(755,root,root) %{_bindir}/mysqlaccess +#%attr(755,root,root) %{_bindir}/mysql_convert_table_format +#%attr(755,root,root) %{_bindir}/mysql_find_rows +#%attr(755,root,root) %{_bindir}/mysql_fix_extensions +#%attr(755,root,root) %{_bindir}/mysql_setpermission +#%attr(755,root,root) %{_bindir}/mysql_zap +#%attr(755,root,root) %{_bindir}/mysqlaccess %attr(755,root,root) %{_bindir}/mysqldumpslow -%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mysqlaccess.conf -%{_mandir}/man1/mysql_convert_table_format.1* -%{_mandir}/man1/mysql_find_rows.1* -%{_mandir}/man1/mysql_fix_extensions.1* -%{_mandir}/man1/mysql_setpermission.1* -%{_mandir}/man1/mysql_zap.1* -%{_mandir}/man1/mysqlaccess.1* +#%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mysqlaccess.conf +#%{_mandir}/man1/mysql_convert_table_format.1* +#%{_mandir}/man1/mysql_find_rows.1* +#%{_mandir}/man1/mysql_fix_extensions.1* +#%{_mandir}/man1/mysql_setpermission.1* +#%{_mandir}/man1/mysql_zap.1* +#%{_mandir}/man1/mysqlaccess.1* %{_mandir}/man1/mysqldumpslow.1* %files client %defattr(644,root,root,755) %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/skel/.my.cnf +%attr(755,root,root) %{_bindir}/lz4_decompress %attr(755,root,root) %{_bindir}/mysql +%attr(755,root,root) %{_bindir}/mysql_config_editor +%attr(755,root,root) %{_bindir}/mysql_ssl_rsa_setup %attr(755,root,root) %{_bindir}/mysqladmin %attr(755,root,root) %{_bindir}/mysqlbinlog -%attr(755,root,root) %{_bindir}/mysqlbug -%attr(755,root,root) %{_bindir}/mysql_config_editor +#%attr(755,root,root) %{_bindir}/mysqlbug %attr(755,root,root) %{_bindir}/mysqldump %attr(755,root,root) %{_bindir}/mysqlimport +%attr(755,root,root) %{_bindir}/mysqlpump %attr(755,root,root) %{_bindir}/mysqlshow +%attr(755,root,root) %{_bindir}/zlib_decompress +%{_mandir}/man1/lz4_decompress.1* %{_mandir}/man1/mysql.1* +%{_mandir}/man1/mysql_config_editor.1* +%{_mandir}/man1/mysql_ssl_rsa_setup.1* %{_mandir}/man1/mysqladmin.1* %{_mandir}/man1/mysqlbinlog.1* -%{_mandir}/man1/mysqlbug.1* -%{_mandir}/man1/mysql_config_editor.1* +#%{_mandir}/man1/mysqlbug.1* %{_mandir}/man1/mysqldump.1* %{_mandir}/man1/mysqlimport.1* +%{_mandir}/man1/mysqlpump.1* %{_mandir}/man1/mysqlshow.1* +%{_mandir}/man1/zlib_decompress.1* %files libs %defattr(644,root,root,755) -%attr(751,root,root) %dir %{_sysconfdir}/mysql +%attr(751,root,root) %dir %{_sysconfdir}/%{name} %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/mysql-client.conf %{_sysconfdir}/%{name}/my.cnf -%attr(755,root,root) %{_libdir}/libmysqlclient.so.*.*.* -%attr(755,root,root) %ghost %{_libdir}/libmysqlclient.so.18 -%attr(755,root,root) %{_libdir}/libmysqlclient_r.so.*.*.* -%attr(755,root,root) %ghost %{_libdir}/libmysqlclient_r.so.18 +%attr(755,root,root) %{_libdir}/libperconaserverclient.so.*.*.* +%attr(755,root,root) %ghost %{_libdir}/libperconaserverclient.so.20 +#%attr(755,root,root) %{_libdir}/libperconaserverclient_r.so.*.*.* +#%attr(755,root,root) %ghost %{_libdir}/libperconaserverclient_r.so.18 %if %{with ndb} %attr(755,root,root) %{_libdir}/libndbclient.so.*.*.* %attr(755,root,root) %ghost %{_libdir}/libndbclient.so.3 @@ -1038,21 +990,24 @@ done %files devel %defattr(644,root,root,755) %attr(755,root,root) %{_bindir}/mysql_config -%attr(755,root,root) %{_libdir}/libmysqlclient.so -%attr(755,root,root) %{_libdir}/libmysqlclient_r.so +%attr(755,root,root) %{_libdir}/libperconaserverclient.so +#%attr(755,root,root) %{_libdir}/libperconaserverclient_r.so +%{_pkgconfigdir}/perconaserverclient.pc %if %{with ndb} %attr(755,root,root) %{_libdir}/libndbclient.so %endif +#%{_includedir}/backup.h # static-only so far %{_libdir}/libmysqld.a +%{_libdir}/libmysqlservices.a %{_includedir}/mysql %{_aclocaldir}/mysql.m4 %{_mandir}/man1/mysql_config.1* %files static %defattr(644,root,root,755) -%{_libdir}/libmysqlclient.a -%{_libdir}/libmysqlclient_r.a +%{_libdir}/libperconaserverclient.a +#%{_libdir}/libperconaserverclient_r.a %if %{with ndb} %{_libdir}/libndbclient.a %endif @@ -1061,19 +1016,23 @@ done %defattr(644,root,root,755) %attr(755,root,root) %{_bindir}/mysqlslap %attr(755,root,root) %{_bindir}/mysqltest -%dir %{_datadir}/sql-bench -%{_datadir}/sql-bench/[CDRl]* -%attr(755,root,root) %{_datadir}/sql-bench/[bcgirst]* +#%dir %{_datadir}/sql-bench +#%{_datadir}/sql-bench/[CDRl]* +#%attr(755,root,root) %{_datadir}/sql-bench/[bcgirst]* %{_mandir}/man1/mysqlslap.1* %{_mandir}/man1/mysqltest.1* %{_mandir}/man1/mysqltest_embedded.1* +#%files doc +#%defattr(644,root,root,755) +#%doc Docs/manual.html Docs/manual_toc.html + %if %{with ndb} %files ndb %defattr(644,root,root,755) %attr(755,root,root) %{_sbindir}/ndbd -%attr(754,root,root) /etc/rc.d/init.d/mysql-ndb -%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mysql-ndb +%attr(754,root,root) /etc/rc.d/init.d/%{name}-ndb +%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}-ndb %{_mandir}/man1/ndbd_redo_log_reader.1* %{_mandir}/man8/ndbd.8* @@ -1116,14 +1075,14 @@ done %files ndb-mgm %defattr(644,root,root,755) %attr(755,root,root) %{_sbindir}/ndb_mgmd -%attr(754,root,root) /etc/rc.d/init.d/mysql-ndb-mgm -%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mysql-ndb-mgm +%attr(754,root,root) /etc/rc.d/init.d/%{name}-ndb-mgm +%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}-ndb-mgm %{_mandir}/man8/ndb_mgmd.8* %files ndb-cpc %defattr(644,root,root,755) %attr(755,root,root) %{_sbindir}/ndb_cpcd %attr(754,root,root) /etc/rc.d/init.d/mysql-ndb-cpc -%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/mysql-ndb-cpc +%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}-ndb-cpc %{_mandir}/man1/ndb_cpcd.1* %endif diff --git a/mysqld.conf b/mysqld.conf index ce56802..c9da04d 100644 --- a/mysqld.conf +++ b/mysqld.conf @@ -22,8 +22,17 @@ user = mysql #collation-server=latin2_general_ci #skip-character-set-client-handshake -# Use passwords compatible with old 4.0 mysqld -#old-passwords +# This variable controls the password hashing method used by the PASSWORD() +# function. It also influences password hashing performed by CREATE USER and +# GRANT statements that specify a password using an IDENTIFIED BY clause. +# http://dev.mysql.com/doc/refman/5.6/en/server-system-variables.html#sysvar_old_passwords +# Value | Password Hashing Method | Associated Authentication Plugin +# 0 | MySQL 4.1 native hashing | mysql_native_password +# 1 | Pre-4.1 ("old") hashing | mysql_old_password +# 2 | SHA-256 hashing | sha256_password +# If you set old_passwords=2, follow the instructions for using the sha256_password plugin at +# http://dev.mysql.com/doc/refman/5.6/en/sha256-authentication-plugin.html +#old-passwords=0 # Don't use system locking skip-external-locking @@ -31,10 +40,6 @@ skip-external-locking # Disabling symbolic-links is recommended to prevent assorted security risks symbolic-links=0 -# Default storage engine is InnoDB since 5.5.5 -# You may revert to previous behaviour by specifiying MyISAM here -#default-storage-engine=InnoDB - # Don't listen on a TCP/IP port at all. This is a security enhancement, # if all processes that need to connect to mysqld run on the same host. # All interaction with mysqld must be made via Unix sockets. @@ -49,7 +54,9 @@ skip-networking # Emergency option. Use only if you really need this. #skip-grant-tables -# http://dev.mysql.com/doc/refman/5.5/en/server-options.html#option_mysqld_default-storage-engine +# http://dev.mysql.com/doc/refman/5.6/en/server-options.html#option_mysqld_default-storage-engine +# Default storage engine is InnoDB since 5.5.5 +# You may revert to previous behaviour by specifiying MyISAM here #default-storage-engine=MyISAM # Replication Master Server (default) @@ -121,7 +128,7 @@ log-warnings = 2 # Log slow queries slow-query-log -slow-query-log_file = /var/log/mysql/slow.log +slow-query-log-file = /var/log/mysql/slow.log # Log connections and queries. It slows down MySQL so it's disabled by default #general-log @@ -171,8 +178,8 @@ explicit_defaults_for_timestamp = true #max_heap_table_size=32M #thread_cache_size=16 #thread_stack=65536 -# Try number of CPU's*2 -#thread_concurrency=8 +# http://www.mysqlperformanceblog.com/2012/06/04/thread_concurrency-doesnt-do-what-you-expect/ +# thread_concurrency is deprecated, removed in 5.6.1 and works on old Solaris versions < 9 #wait_timeout=28800 #query_cache_size=8M #query_cache_limit=1M @@ -193,7 +200,8 @@ explicit_defaults_for_timestamp = true #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 @@ -215,7 +223,6 @@ innodb_file_per_table # these are actual defaults (as of 5.0.26) innodb_data_home_dir = @clusterdir@/mysqldb/db innodb_data_file_path = ibdata1:10M:autoextend -innodb_mirrored_log_groups=1 innodb_log_group_home_dir = @clusterdir@/mysqldb/db innodb_log_files_in_group=2 innodb_log_file_size=5M @@ -229,12 +236,7 @@ innodb_log_buffer_size=1M #innodb_file_io_threads=4 #innodb_lock_wait_timeout=50 -# used for logs rotation -[mysqladmin] +# used for logs rotation or status check for replications +[client] user = mysql_sysadmin password = - -# used by initscript to fetch slave status -[mysql] -user = mysql -password = diff --git a/mysqlhotcopy-5.0-5.5.patch b/mysqlhotcopy-5.0-5.5.patch deleted file mode 100644 index 3382da2..0000000 --- a/mysqlhotcopy-5.0-5.5.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- ./scripts/mysqlhotcopy.sh~ 2013-03-19 11:30:02.000000000 +0200 -+++ ./scripts/mysqlhotcopy.sh 2013-05-10 00:42:25.986175909 +0300 -@@ -789,7 +789,7 @@ - - eval { - my ($file,$position) = get_row( $dbh, "show master status" ); -- die "master status is undefined" if !defined $file || !defined $position; -+ warn "master status is undefined" if !defined $file || !defined $position; - - my $row_hash = get_row_hash( $dbh, "show slave status" ); - my ($master_host, $log_file, $log_pos ); -- 2.37.3