[packages/mysql/MYSQL_5_0] Fix mysqldump compatibility to be able to mysqldump from mysql 5.6
glen
glen at pld-linux.org
Fri Nov 27 16:08:24 CET 2020
commit 01be7cc6293f084fc9a6cdd82edacf267a254bba
Author: Elan Ruusamäe <glen at pld-linux.org>
Date: Fri Nov 27 17:04:14 2020 +0200
Fix mysqldump compatibility to be able to mysqldump from mysql 5.6
mysql.spec | 4 +++-
mysqldump-compat.patch | 36 ++++++++++++++++++++++++++++++++++++
2 files changed, 39 insertions(+), 1 deletion(-)
---
diff --git a/mysql.spec b/mysql.spec
index 20d7e58..d52de6b 100644
--- a/mysql.spec
+++ b/mysql.spec
@@ -28,7 +28,7 @@ Summary(uk.UTF-8): MySQL - швидкий SQL-сервер
Summary(zh_CN.UTF-8): MySQL数据库服务器
Name: mysql
Version: 5.0.96
-Release: 9
+Release: 10
License: GPL + MySQL FLOSS Exception
Group: Applications/Databases
# Source0Download: http://dev.mysql.com/downloads/mysql/5.0.html#source
@@ -82,6 +82,7 @@ Patch25: %{name}-sslchain.patch
Patch26: %{name}-yacc.patch
Patch27: community-mysql-dh1024.patch
Patch28: openssl.patch
+Patch29: mysqldump-compat.patch
# <percona patches, http://www.percona.com/percona-lab.html>
Patch100: %{name}-show_patches.patch
Patch101: %{name}-microslow_innodb.patch
@@ -585,6 +586,7 @@ mv sphinx-*/mysqlse sql/sphinx
%patch26 -p1
%patch27 -p1
%patch28 -p1
+%patch29 -p1
%{__sed} -i -e 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/' configure.in
diff --git a/mysqldump-compat.patch b/mysqldump-compat.patch
new file mode 100644
index 0000000..95607d9
--- /dev/null
+++ b/mysqldump-compat.patch
@@ -0,0 +1,36 @@
+SET OPTION is removed in mysql 5.6:
+
+- https://bugs.mysql.com/bug.php?id=66765
+- https://bugs.mysql.com/bug.php?id=67507
+- https://www.markotomic.com/mysqldump-mysql-5-6-problem-solved/
+
+The change works with mysql 5.0 server as well:
+
+Server version: 5.0.96-log MySQL Community Server (GPL)
+
+mysql> SET SQL_QUOTE_SHOW_CREATE=1;
+Query OK, 0 rows affected (0.00 sec)
+
+mysql> SET OPTION SQL_QUOTE_SHOW_CREATE=1;
+Query OK, 0 rows affected (0.00 sec)
+
+--- mysql-5.0.96/client/mysqldump.c~ 2020-11-27 15:09:05.000000000 +0200
++++ mysql-5.0.96/client/mysqldump.c 2020-11-27 15:14:43.247336010 +0200
+@@ -1708,7 +1708,7 @@
+ verbose_msg("-- Retrieving table structure for table %s...\n", table);
+
+ len= my_snprintf(query_buff, sizeof(query_buff),
+- "SET OPTION SQL_QUOTE_SHOW_CREATE=%d",
++ "SET SQL_QUOTE_SHOW_CREATE=%d",
+ (opt_quoted || opt_keywords));
+ if (!create_options)
+ strmov(query_buff+len,
+@@ -3753,7 +3753,7 @@
+ verbose_msg("-- Retrieving view structure for table %s...\n", table);
+
+ #ifdef NOT_REALLY_USED_YET
+- sprintf(insert_pat,"SET OPTION SQL_QUOTE_SHOW_CREATE=%d",
++ sprintf(insert_pat,"SET SQL_QUOTE_SHOW_CREATE=%d",
+ (opt_quoted || opt_keywords));
+ #endif
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/mysql.git/commitdiff/01be7cc6293f084fc9a6cdd82edacf267a254bba
More information about the pld-cvs-commit
mailing list