From: Marcin Krol <hawk@tld-linux.org>
Date: Wed, 28 Aug 2019 19:11:00 +0000 (+0200)
Subject: - protobuf > 3.8.0 fix from PLD
X-Git-Url: https://git.tld-linux.org/?a=commitdiff_plain;h=a493b021b29c483c5c23a81f1b5192bff3f0d55f;p=packages%2Fmysql.git

- protobuf > 3.8.0 fix from PLD
---

diff --git a/mysql-protobuf.patch b/mysql-protobuf.patch
new file mode 100644
index 0000000..cce64d4
--- /dev/null
+++ b/mysql-protobuf.patch
@@ -0,0 +1,12 @@
+--- mysql-5.7.27/rapid/plugin/x/ngs/include/ngs_common/protocol_protobuf.h.orig	2019-06-10 16:43:20.000000000 +0200
++++ mysql-5.7.27/rapid/plugin/x/ngs/include/ngs_common/protocol_protobuf.h	2019-07-29 19:19:29.421629353 +0200
+@@ -29,7 +29,9 @@
+ #include <google/protobuf/io/tokenizer.h>
+ #include <google/protobuf/io/zero_copy_stream.h>
+ #include <google/protobuf/wire_format_lite.h>
++#if GOOGLE_PROTOBUF_VERSION < 3008000
+ #include <google/protobuf/wire_format_lite_inl.h>
++#endif
+ #include <google/protobuf/dynamic_message.h>
+ 
+ #include "mysqlx_connection.pb.h"
diff --git a/mysql.spec b/mysql.spec
index 7631450..deb8be5 100644
--- a/mysql.spec
+++ b/mysql.spec
@@ -43,7 +43,7 @@
 %undefine	with_tokudb
 %endif
 
-%define		rel	1
+%define		rel	2
 %define		percona_rel	30
 %include	/usr/lib/rpm/macros.perl
 Summary:	MySQL: a very fast and reliable SQL database engine
@@ -87,6 +87,7 @@ Patch3:		mysql-chain-certs.patch
 # from fedora
 Patch4:		mysql-dubious-exports.patch
 Patch5:		mysql-cmake.patch
+Patch6:		mysql-protobuf.patch
 URL:		https://www.percona.com/software/mysql-database/percona-server
 BuildRequires:	bison >= 1.875
 BuildRequires:	cmake >= 2.8.2
@@ -501,6 +502,7 @@ mv sphinx-*/mysqlse storage/sphinx
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
+%patch6 -p1
 
 # to get these files rebuild
 [ -f sql/sql_yacc.cc ] && %{__rm} sql/sql_yacc.cc