From 5d87e23e83778b780ea870de884296569fd5b127 Mon Sep 17 00:00:00 2001 From: Marcin Krol Date: Thu, 5 Jun 2014 09:58:49 +0000 Subject: [PATCH] - PLD merge --- bug-44278.patch | 180 +++++++++++++++++++++++++++++ mysql-build.patch | 11 -- mysql-cmake.patch | 59 ++++++++++ mysql-config.patch | 15 ++- mysql-dubious-exports.patch | 2 +- mysql-no-default-secure-auth.patch | 98 ++++++++++++++++ mysql-readline.patch | 21 ++++ mysql-system-users.patch | 8 +- mysql-versioning.patch | 9 +- mysql.init | 12 +- mysql.spec | 161 ++++++++++++++++---------- mysqld.conf | 10 +- 12 files changed, 488 insertions(+), 98 deletions(-) create mode 100644 bug-44278.patch create mode 100644 mysql-cmake.patch create mode 100644 mysql-no-default-secure-auth.patch create mode 100644 mysql-readline.patch diff --git a/bug-44278.patch b/bug-44278.patch new file mode 100644 index 0000000..b5d680c --- /dev/null +++ b/bug-44278.patch @@ -0,0 +1,180 @@ +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 +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 +F3JFOFCQVDO13Q== + + +--===============1792034184==-- diff --git a/mysql-build.patch b/mysql-build.patch index 42014ac..ea45a7b 100644 --- a/mysql-build.patch +++ b/mysql-build.patch @@ -30,17 +30,6 @@ diff -urNbB mysql-5.0.13-rc.org/sql/mysqld.cc mysql-5.0.13-rc/sql/mysqld.cc #endif /* FALLOC_FL_PUNCH_HOLE */ next_mrec = index->online_log->head.block; ---- Percona-Server-5.6.13-rel61.0/sql/mysqld.cc~ 2013-10-15 18:33:37.000000000 +0200 -+++ Percona-Server-5.6.13-rel61.0/sql/mysqld.cc 2013-10-15 18:48:42.717336416 +0200 -@@ -6389,7 +6389,7 @@ - - #ifdef HAVE_LIBWRAP - { -- if (mysql_socket_getfd(sock) == mysql_socket_getfd(ip_sock)) -+ if (mysql_socket_getfd(sock) == mysql_socket_getfd(base_ip_sock)) - { - struct request_info req; - signal(SIGCHLD, SIG_DFL); --- 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 @@ 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-config.patch b/mysql-config.patch index a87be1b..ac61f8f 100644 --- a/mysql-config.patch +++ b/mysql-config.patch @@ -1,5 +1,5 @@ ---- Percona-Server-5.6.13-rel61.0/scripts/mysql_config.sh.orig 2013-10-07 10:25:25.000000000 +0000 -+++ Percona-Server-5.6.13-rel61.0/scripts/mysql_config.sh 2013-10-13 13:25:11.342999630 +0000 +--- Percona-Server-5.6.13-rel61.0/scripts/mysql_config.sh~ 2013-10-07 12:25:25.000000000 +0200 ++++ Percona-Server-5.6.13-rel61.0/scripts/mysql_config.sh 2013-10-15 18:17:41.547988430 +0200 @@ -124,23 +124,23 @@ for remove in DDBUG_OFF DSAFE_MUTEX DFORCE_INIT_OF_VARS \ DEXTRA_DEBUG DHAVE_purify O 'O[0-9]' 'xO[0-9]' 'W[-A-Za-z]*' \ @@ -10,9 +10,8 @@ # The first option we might strip will always have a space before it because # we set -I$pkgincludedir as the first option - cflags=`echo "$cflags"|sed -e "s/ -$remove */ /g"` -- cxxflags=`echo "$cxxflags"|sed -e "s/ -$remove */ /g"` -+ cflags=`echo "$cflags"|sed -e "s/ \(-$remove *\)\{1,\}/ /g"` -+ cxxflags=`echo "$cflags"|sed -e "s/ \(-$remove *\)\{1,\}/ /g"` ++ cflags=`echo "$cflags"|sed -e "s/ \(-$remove *\)\{1,\}/ /g"` + cxxflags=`echo "$cxxflags"|sed -e "s/ -$remove */ /g"` done cflags=`echo "$cflags"|sed -e 's/ *\$//'` cxxflags=`echo "$cxxflags"|sed -e 's/ *\$//'` @@ -25,9 +24,9 @@ - libs=`echo "$libs"|sed -e "s/ -$remove */ /g"` - libs_r=`echo "$libs_r"|sed -e "s/ -$remove */ /g"` - embedded_libs=`echo "$embedded_libs"|sed -e "s/ -$remove */ /g"` -+ libs=`echo "$libs"|sed -e "s/ \(-$remove *\)\{1,\}/ /g"` -+ libs_r=`echo "$libs_r"|sed -e "s/ \(-$remove *\)\{1,\}/ /g"` -+ embedded_libs=`echo "$embedded_libs"|sed -e "s/ \(-$remove *\)\{1,\}/ /g"` ++ libs=`echo "$libs"|sed -e "s/ \(-$remove *\)\{1,\}/ /g"` ++ libs_r=`echo "$libs_r"|sed -e "s/ \(-$remove *\)\{1,\}/ /g"` ++ embedded_libs=`echo "$embedded_libs"|sed -e "s/ \(-$remove *\)\{1,\}/ /g"` done # Strip trailing and ending space if any, and '+' (FIXME why?) diff --git a/mysql-dubious-exports.patch b/mysql-dubious-exports.patch index edac522..4166c52 100644 --- a/mysql-dubious-exports.patch +++ b/mysql-dubious-exports.patch @@ -43,7 +43,7 @@ diff -Naur mysql-5.5.8.orig/include/mysql_com.h mysql-5.5.8/include/mysql_com.h void my_net_local_init(NET *net); void net_end(NET *net); void net_clear(NET *net, my_bool check_buffer); -+#define net_realloc mysql_net_realloc /* namespace sanity */ ++#define net_realloc mysql_net_realloc /* namespace sanity */ my_bool net_realloc(NET *net, size_t length); my_bool net_flush(NET *net); my_bool my_net_write(NET *net,const unsigned char *packet, size_t len); diff --git a/mysql-no-default-secure-auth.patch b/mysql-no-default-secure-auth.patch new file mode 100644 index 0000000..26cf10c --- /dev/null +++ b/mysql-no-default-secure-auth.patch @@ -0,0 +1,98 @@ +--- 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-readline.patch b/mysql-readline.patch new file mode 100644 index 0000000..ed12c3a --- /dev/null +++ b/mysql-readline.patch @@ -0,0 +1,21 @@ +--- Percona-Server-5.6.15-rel63.0/client/mysql.cc.orig 2014-02-09 06:23:16.085128298 +0100 ++++ Percona-Server-5.6.15-rel63.0/client/mysql.cc 2014-02-09 06:38:54.561791068 +0100 +@@ -103,7 +103,9 @@ + #include + #else + #include ++#include + #define HAVE_READLINE ++#define USE_NEW_READLINE_INTERFACE + #define USE_POPEN + #endif + //int vidattr(long unsigned int attrs); // Was missing in sun curses +@@ -1107,7 +1109,7 @@ + } HIST_ENTRY; + #endif + +-extern "C" int add_history(const char *command); /* From readline directory */ ++extern "C" void add_history(const char *command); /* From readline directory */ + extern "C" int read_history(const char *command); + extern "C" int write_history(const char *command); + extern "C" HIST_ENTRY *history_get(int num); diff --git a/mysql-system-users.patch b/mysql-system-users.patch index cc7ecc5..d33b5e8 100644 --- a/mysql-system-users.patch +++ b/mysql-system-users.patch @@ -18,17 +18,17 @@ -- 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,'','','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,'','','N' FROM dual WHERE LOWER( @current_hostname) != 'localhost'; +-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,'','','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,'','','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,'','','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,'','','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,'','','N' FROM dual WHERE LOWER( @current_hostname) != 'localhost'; ++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,'','','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,'','','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,'','','N'); +INSERT INTO tmp_user VALUES ('localhost','mysql_sysadmin','','N','N','N','N','N','N','Y','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','','','','',0,0,0,0,'','','N'); -+REPLACE INTO tmp_user SELECT @current_hostname,'mysql_sysadmin','','N','N','N','N','N','N','Y','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','','','','',0,0,0,0,'','','N' FROM dual WHERE LOWER( @current_hostname) != 'localhost'; ++REPLACE INTO tmp_user SELECT @current_hostname,'mysql_sysadmin','','N','N','N','N','N','N','Y','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','','','','',0,0,0,0,'','','N' FROM dual WHERE @current_hostname != 'localhost'; +REPLACE INTO tmp_user VALUES ('127.0.0.1','mysql_sysadmin','','N','N','N','N','N','N','Y','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','','','','',0,0,0,0,'','','N'); +REPLACE INTO tmp_user VALUES ('::1','mysql_sysadmin','','N','N','N','N','N','N','Y','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','','','','',0,0,0,0,'','','N'); INSERT INTO tmp_user (host,user) VALUES ('localhost',''); - INSERT INTO tmp_user (host,user) SELECT @current_hostname,'' FROM dual WHERE LOWER(@current_hostname ) != 'localhost'; + INSERT INTO tmp_user (host,user) SELECT @current_hostname,'' FROM dual WHERE @current_hostname != 'localhost'; INSERT INTO user SELECT * FROM tmp_user WHERE @had_user_table=0; diff --git a/mysql-versioning.patch b/mysql-versioning.patch index 1a975ed..6d4ea8c 100644 --- a/mysql-versioning.patch +++ b/mysql-versioning.patch @@ -1,5 +1,5 @@ ---- Percona-Server-5.6.14-rel62.0//libmysql/libmysql.map~ 2013-10-22 09:42:41.000000000 +0200 -+++ Percona-Server-5.6.14-rel62.0//libmysql/libmysql.map 2013-10-30 17:14:14.270019272 +0100 +--- Percona-Server-5.6.14-rel62.0//libmysql/libmysql.map 2013-10-30 17:14:14.270019272 +0100 ++++ percona-server-5.6.16-64.1/libmysql/libmysql.map 2014-05-02 22:58:14.025317912 +0300 @@ -145,6 +145,7 @@ mysql_net_realloc; # PHP's mysqli.so requires this (via the ER() macro) @@ -8,3 +8,8 @@ # mydumper requires this (added by remi) my_net_read; }; +@@ -155,2 +156,4 @@ + get_tty_password; ++# for mysql-workbench 6.1 ++ mysql_options4; + }; diff --git a/mysql.init b/mysql.init index b4dd314..47db1a1 100755 --- a/mysql.init +++ b/mysql.init @@ -468,13 +468,13 @@ 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 + if [ -f /usr/share/percona-server/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" + " /usr/share/percona-server/mysqld.conf > "$MYSQL_CLUSTER_DIR/mysqld.conf" chown root:root "$MYSQL_CLUSTER_DIR/mysqld.conf" chmod 640 "$MYSQL_CLUSTER_DIR/mysqld.conf" fi @@ -487,8 +487,8 @@ mysqlinit() { 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) + $(cat /usr/share/percona-server/mysql_system_tables.sql) + $(sed -e "/@current_hostname/d" /usr/share/percona-server/mysql_system_tables_data.sql) EOF ok=0 @@ -502,7 +502,7 @@ EOF --tmpdir=$MYSQL_DATA_DIR \ --log-error=$MYSQL_ERRLOG \ < $MYSQL_DATA_DIR/mysql-init.sql && ok=1 - [ -f $MYSQL_DATA_DIR/mysql/host.frm ] || ok=0 + [ -f $MYSQL_DATA_DIR/mysql/user.frm ] || ok=0 if [ "$ok" = 1 ]; then rm -f $MYSQL_DATA_DIR/mysql-init.sql @@ -526,7 +526,7 @@ mysqladmin section. See the manual for more instructions. END_OF_MSG show "Filling help tables..." ok=0 - ( echo "use mysql;"; cat /usr/share/mysql/fill_help_tables.sql ) | \ + ( echo "use mysql;"; cat /usr/share/percona-server/fill_help_tables.sql ) | \ /usr/sbin/mysqld \ --defaults-file=$MYSQL_CLUSTER_DIR/mysqld.conf \ --bootstrap \ diff --git a/mysql.spec b/mysql.spec index a5e5251..521fa82 100644 --- a/mysql.spec +++ b/mysql.spec @@ -23,7 +23,8 @@ %bcond_with tests # FIXME: don't run correctly %bcond_with ndb # NDB is now a separate product, this here is broken, so disable it -%define percona_rel 62.0 +%define rel 3 +%define percona_rel 64.1 %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 @@ -34,14 +35,16 @@ Summary(ru.UTF-8): MySQL - быстрый SQL-сервер Summary(uk.UTF-8): MySQL - швидкий SQL-сервер Summary(zh_CN.UTF-8): MySQL数据库服务器 Name: mysql -Version: 5.6.14 -Release: 0.1 +Version: 5.6.16 +Release: %{percona_rel}.%{rel} License: GPL + MySQL FLOSS Exception Group: Applications/Databases -Source0: http://www.percona.com/redir/downloads/Percona-Server-5.6/LATEST/release-%{version}-%{percona_rel}/483/source/Percona-Server-%{version}-rel%{percona_rel}.tar.gz -# Source0-md5: 2e6b2ce44173784bb8990813e536cf3c -Source100: http://www.sphinxsearch.com/files/sphinx-2.1.2-release.tar.gz -# Source100-md5: 3e828fa58e2e6049f02aa6aef3009d48 +# 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: ba75fbcc530dc74ebb978cf450c011b3 +Source100: http://www.sphinxsearch.com/files/sphinx-2.1.6-release.tar.gz +# Source100-md5: f416c743c0e0f4e337b4549928d8494f Source1: %{name}.init Source2: %{name}.sysconfig Source3: %{name}.logrotate @@ -58,6 +61,7 @@ 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 @@ -71,18 +75,26 @@ Patch19: %{name}-chain-certs.patch Patch20: %{name}-dubious-exports.patch Patch21: bison3.patch Patch22: bug-66589.patch +Patch23: bug-44278.patch +Patch24: %{name}-cmake.patch +Patch25: %{name}-readline.patch URL: http://www.mysql.com/products/community/ BuildRequires: bison >= 1.875 BuildRequires: cmake >= 2.6 -BuildRequires: groff +BuildRequires: readline-devel >= 6.2 +%if "%{pld_release}" == "ac" +BuildRequires: libstdc++4-devel >= 5:4.0 +%else BuildRequires: libstdc++-devel >= 5:4.0 -BuildRequires: libtool +%endif +BuildRequires: automake %{?with_tcpd:BuildRequires: libwrap-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: readline-devel >= 4.2 +BuildRequires: python-modules BuildRequires: rpm-perlprov >= 4.1-13 BuildRequires: rpmbuild(macros) >= 1.597 BuildRequires: sed >= 4.0 @@ -112,6 +124,7 @@ 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 @@ -295,6 +308,7 @@ Summary(uk.UTF-8): MySQL клієнт Group: Applications/Databases Requires: %{name}-charsets = %{version}-%{release} Requires: %{name}-libs = %{version}-%{release} +Requires: readline >= 6.2 Obsoletes: MySQL-client %description client @@ -478,7 +492,12 @@ This package contains the standard MySQL NDB CPC Daemon. Ten pakiet zawiera standardowego demona MySQL NDB CPC. %prep -%setup -q -n Percona-Server-%{version}-rel%{percona_rel} %{?with_sphinx:-a100} +%setup -q -n percona-server-%{version}-%{percona_rel} %{?with_sphinx:-a100} + +# 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.* + %if %{with sphinx} # http://www.sphinxsearch.com/docs/manual-0.9.9.html#sphinxse-mysql51 mv sphinx-*/mysqlse storage/sphinx @@ -487,6 +506,7 @@ mv sphinx-*/mysqlse storage/sphinx %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch4 -p1 %patch6 -p1 @@ -498,6 +518,9 @@ mv sphinx-*/mysqlse storage/sphinx %patch20 -p1 %patch21 -p1 %patch22 -p1 +%patch23 -p1 +%patch24 -p1 +%patch25 -p1 # to get these files rebuild [ -f sql/sql_yacc.cc ] && rm sql/sql_yacc.cc @@ -513,11 +536,18 @@ cd build # (it defaults to first cluster but user may change it to whatever # cluster it wants) +%if "%{pld_release}" == "ac" +# add suffix, but allow ccache, etc in ~/.rpmmacros +%{expand:%%define __cc %(echo '%__cc' | sed -e 's,-gcc,-gcc4,')} +%{expand:%%define __cxx %(echo '%__cxx' | sed -e 's,-g++,-g++4,')} +%{expand:%%define __cpp %(echo '%__cpp' | sed -e 's,-gcc,-gcc4,')} +%endif + %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" \ - -DCOMPILATION_COMMENT="TLD Linux MySQL RPM" \ + -DCOMPILATION_COMMENT="PLD/Linux Distribution MySQL RPM" \ -DCURSES_INCLUDE_PATH=/usr/include/ncurses \ %{?with_systemtap:-DENABLE_DTRACE=ON} \ -DFEATURE_SET="community" \ @@ -526,18 +556,21 @@ cd build -DINSTALL_MYSQLTESTDIR_RPM="" \ -DINSTALL_PLUGINDIR=%{_libdir}/%{name}/plugin \ -DINSTALL_SQLBENCHDIR=%{_datadir} \ - -DINSTALL_SUPPORTFILESDIR=%{_datadir}/%{name}-support \ + -DINSTALL_SUPPORTFILESDIR=%{_datadir}/%{_orgname}-support \ -DMYSQL_UNIX_ADDR=/var/lib/%{name}/%{name}.sock \ %{?debug:-DWITH_DEBUG=ON} \ -DWITHOUT_EXAMPLE_STORAGE_ENGINE=1 \ -DWITH_FAST_MUTEXES=ON \ - -DWITH_LIBEDIT=OFF \ -DWITH_LIBWRAP=%{?with_tcpd:ON}%{!?with_tcpd:OFF} \ -DWITH_PAM=ON \ -DWITH_PERFSCHEMA_STORAGE_ENGINE=1 \ -DWITH_PIC=ON \ - -DWITH_READLINE=OFF \ + -DWITH_EDITLINE=system \ +%if "%{pld_release}" == "ac" + -DWITH_SSL=%{?with_ssl:bundled}%{!?with_ssl:no} \ +%else -DWITH_SSL=%{?with_ssl:system}%{!?with_ssl:no} \ +%endif -DWITH_UNIT_TESTS=%{?with_tests:ON}%{!?with_tests:OFF} \ -DWITH_ZLIB=system \ .. @@ -574,7 +607,7 @@ touch $RPM_BUILD_ROOT/var/log/%{name}/{mysqld,query,slow}.log cp mysqld.conf mysqld.tmp awk 'BEGIN { RS="\n\n" } !/bdb/ { printf("%s\n\n", $0) }' < mysqld.tmp > mysqld.conf -cp -a mysqld.conf $RPM_BUILD_ROOT%{_datadir}/%{name}/mysqld.conf +cp -a mysqld.conf $RPM_BUILD_ROOT%{_datadir}/%{_orgname}/mysqld.conf cp -a %{SOURCE13} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/mysql-client.conf ln -s mysql-client.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/my.cnf cp -a %{SOURCE14} $RPM_BUILD_ROOT/etc/skel/.my.cnf @@ -594,7 +627,7 @@ sed -i -e '/libs/s/$ldflags//' $RPM_BUILD_ROOT%{_bindir}/mysql_config sed -i -e '/libs/s/-lprobes_mysql//' $RPM_BUILD_ROOT%{_bindir}/mysql_config # remove known unpackaged files -%{__rm} -r $RPM_BUILD_ROOT%{_datadir}/mysql-support +%{__rm} -r $RPM_BUILD_ROOT%{_datadir}/%{_orgname}-support # rename not to be so generic name mv $RPM_BUILD_ROOT%{_bindir}/{,mysql_}resolve_stack_dump @@ -607,9 +640,9 @@ mv $RPM_BUILD_ROOT{%{_bindir},%{_sysconfdir}}/mysqlaccess.conf %{!?debug:%{__rm} $RPM_BUILD_ROOT%{_bindir}/mysql_resolve_stack_dump} %{!?debug:%{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/mysql_resolve_stack_dump.1} # generate symbols file, so one can generate backtrace using it -# mysql_resolve_stack_dump -s %{_datadir}/%{name}/mysqld.sym -n mysqld.stack. +# mysql_resolve_stack_dump -s %{_datadir}/%{_orgname}/mysqld.sym -n mysqld.stack. # http://dev.mysql.com/doc/refman/5.0/en/using-stack-trace.html -%{?debug:nm -n $RPM_BUILD_ROOT%{_sbindir}/mysqld > $RPM_BUILD_ROOT%{_datadir}/%{name}/mysqld.sym} +%{?debug:nm -n $RPM_BUILD_ROOT%{_sbindir}/mysqld > $RPM_BUILD_ROOT%{_datadir}/%{_orgname}/mysqld.sym} # do not clobber users $PATH mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/mysql_plugin @@ -628,10 +661,10 @@ 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%{_datadir}/%{_orgname}/mysql-log-rotate +#rm $RPM_BUILD_ROOT%{_datadir}/%{_orgname}/mysql.server +#rm $RPM_BUILD_ROOT%{_datadir}/%{_orgname}/binary-configure +%{__rm} $RPM_BUILD_ROOT%{_datadir}/%{_orgname}/errmsg-utf8.txt %{__rm} $RPM_BUILD_ROOT%{_bindir}/mysql_waitpid %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/mysql_waitpid.1* %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/mysql.server* @@ -746,7 +779,7 @@ for config in $(awk -F= '!/^#/ && /=/{print $1}' /etc/%{name}/clusters.conf); do fi if [ ! -f "$config_file" ]; then - echo >&2 "Lost myself! Please report this (with above errors, if any) to TLD Linux mailing lists." + echo >&2 "Lost myself! Please report this (with above errors, if any) to http://bugs.pld-linux.org/" exit 1 fi echo "Adding option old-passwords to config: $config_file" @@ -763,7 +796,7 @@ 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 + mysql -u mysql mysql < %{_datadir}/%{_orgname}/fill_help_tables.sql EOF #' @@ -785,7 +818,7 @@ for config in $(awk -F= '!/^#/ && /=/{print $1}' /etc/%{name}/clusters.conf); do 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." + echo >&2 "ERROR: Can't find real config file for $config! Please report this (with above errors, if any) to http://bugs.pld-linux.org/" continue fi configs="$configs $config_file" @@ -824,7 +857,7 @@ for config in $(awk -F= '!/^#/ && /=/{print $1}' /etc/%{name}/clusters.conf); do 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." + echo >&2 "ERROR: Can't find real config file for $config! Please report this (with above errors, if any) to http://bugs.pld-linux.org/" continue fi configs="$configs $config_file" @@ -903,7 +936,7 @@ done %if %{?debug:1}0 %attr(755,root,root) %{_bindir}/*resolve_stack_dump -%{_datadir}/%{name}/mysqld.sym +%{_datadir}/%{_orgname}/mysqld.sym %{_mandir}/man1/*resolve_stack_dump.1* %endif @@ -915,45 +948,45 @@ done %attr(640,mysql,mysql) %ghost /var/log/mysql/* # This is template for configuration file which is created after 'service mysql init' -%{_datadir}/%{name}/mysqld.conf -%{_datadir}/%{name}/mysql_security_commands.sql -%{_datadir}/%{name}/mysql_system_tables_data.sql -%{_datadir}/%{name}/mysql_system_tables.sql -%{_datadir}/%{name}/mysql_test_data_timezone.sql - -%{_datadir}/%{name}/english -%{_datadir}/%{name}/dictionary.txt -%{_datadir}/%{name}/fill_help_tables.sql -%{_datadir}/%{name}/innodb_memcached_config.sql -#%{_datadir}/%{name}/mysql_fix_privilege_tables.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}/%{_orgname}/mysqld.conf +%{_datadir}/%{_orgname}/mysql_security_commands.sql +%{_datadir}/%{_orgname}/mysql_system_tables_data.sql +%{_datadir}/%{_orgname}/mysql_system_tables.sql +%{_datadir}/%{_orgname}/mysql_test_data_timezone.sql + +%{_datadir}/%{_orgname}/english +%{_datadir}/%{_orgname}/dictionary.txt +%{_datadir}/%{_orgname}/fill_help_tables.sql +%{_datadir}/%{_orgname}/innodb_memcached_config.sql +#%{_datadir}/%{_orgname}/mysql_fix_privilege_tables.sql +%lang(bg) %{_datadir}/%{_orgname}/bulgarian +%lang(cs) %{_datadir}/%{_orgname}/czech +%lang(da) %{_datadir}/%{_orgname}/danish +%lang(de) %{_datadir}/%{_orgname}/german +%lang(el) %{_datadir}/%{_orgname}/greek +%lang(es) %{_datadir}/%{_orgname}/spanish +%lang(et) %{_datadir}/%{_orgname}/estonian +%lang(fr) %{_datadir}/%{_orgname}/french +%lang(hu) %{_datadir}/%{_orgname}/hungarian +%lang(it) %{_datadir}/%{_orgname}/italian +%lang(ja) %{_datadir}/%{_orgname}/japanese +%lang(ko) %{_datadir}/%{_orgname}/korean +%lang(nl) %{_datadir}/%{_orgname}/dutch +%lang(nb) %{_datadir}/%{_orgname}/norwegian +%lang(nn) %{_datadir}/%{_orgname}/norwegian-ny +%lang(pl) %{_datadir}/%{_orgname}/polish +%lang(pt) %{_datadir}/%{_orgname}/portuguese +%lang(ro) %{_datadir}/%{_orgname}/romanian +%lang(ru) %{_datadir}/%{_orgname}/russian +%lang(sr) %{_datadir}/%{_orgname}/serbian +%lang(sk) %{_datadir}/%{_orgname}/slovak +%lang(sv) %{_datadir}/%{_orgname}/swedish +%lang(uk) %{_datadir}/%{_orgname}/ukrainian %files charsets %defattr(644,root,root,755) -%dir %{_datadir}/mysql -%{_datadir}/%{name}/charsets +%dir %{_datadir}/%{_orgname} +%{_datadir}/%{_orgname}/charsets %files extras %defattr(644,root,root,755) diff --git a/mysqld.conf b/mysqld.conf index c4f7331..632ab02 100644 --- a/mysqld.conf +++ b/mysqld.conf @@ -3,7 +3,6 @@ # # One can use all long options that the mysqld supports. # Run mysqld with --help to get a whole list of available options -# $Id$ # This section must be the first! [mysqld] @@ -106,7 +105,14 @@ skip-networking # replication local log #max_relay_log_size=256M +# https://dev.mysql.com/doc/refman/5.6/en/log-destinations.html # global option where logs be written +# affects slow-query-log, general-log direcives +# Possible values: FILE, TABLE +# NOTE: when using table, you can switch to MyISAM, but the contents is still +# not replicated, also mysqldump will not dump data, only create table +# statements +#log-output = TABLE log-output = FILE # mysqld error log (stderr) @@ -199,7 +205,7 @@ myisam-recover # http://stackoverflow.com/questions/2646373/mysql-data-file-wont-shrink # http://dev.mysql.com/doc/refman/5.5/en/innodb-multiple-tablespaces.html -#innodb_file_per_table +innodb_file_per_table # these are actual defaults (as of 5.0.26) innodb_data_home_dir = @clusterdir@/mysqldb/db -- 2.46.0