---- 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 @@
+diff -ruN mysql-5.7.21.orig/cmake/readline.cmake mysql-5.7.21/cmake/readline.cmake
+--- mysql-5.7.21.orig/cmake/readline.cmake 2017-12-28 04:46:26.000000000 +0100
++++ mysql-5.7.21/cmake/readline.cmake 2018-03-31 21:17:28.373826351 +0200
+@@ -110,23 +110,23 @@ ENDMACRO()
MACRO (FIND_SYSTEM_EDITLINE)
FIND_PATH(FOUND_EDITLINE_READLINE
)
MARK_AS_ADVANCED(EDITLINE_INCLUDE_DIR EDITLINE_LIBRARY)
-@@ -160,7 +160,7 @@
+@@ -139,7 +139,7 @@ MACRO (FIND_SYSTEM_EDITLINE)
SET(CMAKE_REQUIRED_LIBRARIES ${EDITLINE_LIBRARY})
CHECK_CXX_SOURCE_COMPILES("
#include <stdio.h>
int main(int argc, char **argv)
{
HIST_ENTRY entry;
-@@ -170,14 +170,13 @@
+@@ -149,14 +149,13 @@ MACRO (FIND_SYSTEM_EDITLINE)
CHECK_CXX_SOURCE_COMPILES("
#include <stdio.h>
+ rl_completion_matches(0,0);
+ return res ? 0 : 1;
}"
- EDITLINE_HAVE_COMPLETION)
+ EDITLINE_HAVE_COMPLETION_INT)
+@@ -168,7 +167,7 @@ MACRO (FIND_SYSTEM_EDITLINE)
+ typedef char* MYFunction(const char*, int);
+ MYFunction* myf= rl_completion_entry_function;
+ char *res= (myf)(NULL, 0);
+- completion_matches(0,0);
++ rl_completion_matches(0,0);
+ return res != NULL;
+ }"
+ EDITLINE_HAVE_COMPLETION_CHAR)
--- /dev/null
+diff -ruNp mysql-5.7.21.orig/client/mysql.cc mysql-5.7.21/client/mysql.cc
+--- mysql-5.7.21.orig/client/mysql.cc 2017-12-28 04:46:26.000000000 +0100
++++ mysql-5.7.21/client/mysql.cc 2018-03-31 21:37:27.879569060 +0200
+@@ -67,6 +67,7 @@
+ #else
+ #include <syslog.h>
+ #include <readline.h>
++#include <history.h>
+ #define HAVE_READLINE
+ #define USE_POPEN
+ #endif
+@@ -1126,22 +1127,6 @@ static const char *embedded_server_group
+ { "server", "embedded", "mysql_SERVER", 0 };
+
+ #ifdef HAVE_READLINE
+-/*
+- HIST_ENTRY is defined for libedit, but not for the real readline
+- Need to redefine it for real readline to find it
+-*/
+-#if !defined(HAVE_HIST_ENTRY)
+-typedef struct _hist_entry {
+- const char *line;
+- const char *data;
+-} HIST_ENTRY;
+-#endif
+-
+-extern "C" int 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);
+-extern "C" int history_length;
+ static int not_in_history(const char *line);
+ static void initialize_readline (char *name);
+ #endif /* HAVE_READLINE */
Summary(zh_CN.UTF-8): MySQL数据库服务器
Name: mysql
Version: 5.7.21
-Release: 2
+Release: 3
License: GPL + MySQL FLOSS Exception
Group: Applications/Databases
Source0: http://cdn.mysql.com/Downloads/MySQL-5.7/%{name}-%{version}.tar.gz
Patch19: %{name}-chain-certs.patch
Patch24: %{name}-cmake.patch
+Patch25: %{name}-readline.patch
Patch26: %{name}dumpslow-clusters.patch
URL: http://www.mysql.com/products/community/
%patch19 -p1
%patch24 -p1
+%patch25 -p1
%patch26 -p1
-DWITH_UNIT_TESTS=%{?with_tests:ON}%{!?with_tests:OFF} \
%{!?with_system_boost:-DWITH_BOOST="$(pwd)/$(ls -1d ../boost_*)"} \
-DWITH_ZLIB=system \
- -DWITH_READLINE=system \
+ -DWITH_EDITLINE=system \
-DWITH_MECAB=system \
-DTMPDIR=/var/tmp