Accepting request 542060 from home:pmonrealgonzalez:branches:devel:languages:perl

- Fixed build with libmariadb [bsc#1067882]
- Added patch:
  * perl-DBD-mysql-4.043-Fix-build-failures-for-MariaDB.patch

OBS-URL: https://build.opensuse.org/request/show/542060
OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-DBD-mysql?expand=0&rev=58
This commit is contained in:
Pedro Monreal Gonzalez 2017-11-15 14:07:56 +00:00 committed by Git OBS Bridge
parent a945f9ec41
commit 4669e23263
3 changed files with 48 additions and 0 deletions

View File

@ -0,0 +1,38 @@
diff --git a/dbdimp.c b/dbdimp.c
index 9b8b313..fa628b0 100644
--- a/dbdimp.c
+++ b/dbdimp.c
@@ -1979,6 +1979,9 @@ MYSQL *mysql_dr_connect(
if (result)
{
+#if MYSQL_VERSION_ID >= 50013
+ my_bool reconnect=1;
+#endif
#if MYSQL_VERSION_ID >=SERVER_PREPARE_VERSION
/* connection succeeded. */
/* imp_dbh == NULL when mysql_dr_connect() is called from mysql.xs
@@ -1997,7 +2000,11 @@ MYSQL *mysql_dr_connect(
we turn off Mysql's auto reconnect and handle re-connecting ourselves
so that we can keep track of when this happens.
*/
+#if MYSQL_VERSION_ID >= 50013
+ mysql_options(result, MYSQL_OPT_RECONNECT, &reconnect);
+#else
result->reconnect=0;
+#endif
}
else {
/*
diff --git a/dbdimp.h b/dbdimp.h
index 935256e..3a5fcaa 100644
--- a/dbdimp.h
+++ b/dbdimp.h
@@ -20,6 +20,7 @@
#include <DBIXS.h> /* installed by the DBI module */
#include <mysql.h> /* Comes with MySQL-devel */
#include <mysqld_error.h> /* Comes MySQL */
+#include <mysql_version.h> /* For MYSQL_VERSION_ID */
#include <errmsg.h> /* Comes with MySQL-devel */

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Tue Nov 14 17:12:32 UTC 2017 - pmonrealgonzalez@suse.com
- Fixed build with libmariadb [bsc#1067882]
- Added patch:
* perl-DBD-mysql-4.043-Fix-build-failures-for-MariaDB.patch
-------------------------------------------------------------------
Mon Jul 17 11:16:13 UTC 2017 - pmonrealgonzalez@suse.com

View File

@ -28,6 +28,8 @@ Source0: https://cpan.metacpan.org/authors/id/M/MI/MICHIELB/%{cpan_name}-
Source1: cpanspec.yml
# PATCH-FIX-UPSTREAM CVE-2017-10788 bsc#1047095 pmonrealgonzalez@suse.com - DoS or possibly RCE through use-after-free
Patch1: perl-DBD-mysql-4.043-CVE-2017-10788.patch
# bsc#1067882 perl-DBD-mysql-4.043-Fix-build-failures-for-MariaDB.patch
Patch2: perl-DBD-mysql-4.043-Fix-build-failures-for-MariaDB.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: perl
BuildRequires: perl-macros
@ -52,6 +54,7 @@ no-one ever requested them. :-)
%setup -q -n %{cpan_name}-%{version}
find . -type f ! -name \*.pl -print0 | xargs -0 chmod 644
%patch1 -p1
%patch2 -p1
%build
%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"