[arch-commits] Commit in perl-dbd-mysql/trunk (2 files)

Evangelos Foutras foutrelis at archlinux.org
Sat May 25 10:34:34 UTC 2019


    Date: Saturday, May 25, 2019 @ 10:34:34
  Author: foutrelis
Revision: 354170

Fix for MariaDB 10.3.13 with zerofill

Added:
  perl-dbd-mysql/trunk/mariadb-10.3.13-zerofill.patch
Modified:
  perl-dbd-mysql/trunk/PKGBUILD

--------------------------------+
 PKGBUILD                       |   13 +++++++++++--
 mariadb-10.3.13-zerofill.patch |   29 +++++++++++++++++++++++++++++
 2 files changed, 40 insertions(+), 2 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2019-05-25 09:51:46 UTC (rev 354169)
+++ PKGBUILD	2019-05-25 10:34:34 UTC (rev 354170)
@@ -14,9 +14,18 @@
 makedepends=('perl-devel-checklib')
 checkdepends=('mariadb' 'perl-test-deep')
 options=('!emptydirs')
-source=(http://search.cpan.org/CPAN/authors/id/D/DV/DVEEDEN/DBD-mysql-${pkgver}.tar.gz)
-sha512sums=('910f5b4ba7a7890d50a79f37d04ec8971a4f62acd0fe30bf3ab634f66e3128f0cd6513e5c9da8c807a0f4477d0cc766682ea8dd0d8072d02821b78df51f37879')
+source=(https://search.cpan.org/CPAN/authors/id/D/DV/DVEEDEN/DBD-mysql-${pkgver}.tar.gz
+        mariadb-10.3.13-zerofill.patch)
+sha512sums=('910f5b4ba7a7890d50a79f37d04ec8971a4f62acd0fe30bf3ab634f66e3128f0cd6513e5c9da8c807a0f4477d0cc766682ea8dd0d8072d02821b78df51f37879'
+            '090039d383d05958c5d0cf23f13b8062ba89158583ca6dad9ce7c72b28bc3eccc039d4f815aef13592ea35a57662c80156b25aaa04ace171d64a15f5ac489a09')
 
+prepare() {
+  cd DBD-mysql-$pkgver
+
+  # https://github.com/perl5-dbi/DBD-mysql/issues/304
+  patch -Np1 -i ../mariadb-10.3.13-zerofill.patch
+}
+
 build() {
   cd DBD-mysql-$pkgver
   perl Makefile.PL INSTALLDIRS=vendor --testsocket=/tmp/socket.mysql

Added: mariadb-10.3.13-zerofill.patch
===================================================================
--- mariadb-10.3.13-zerofill.patch	                        (rev 0)
+++ mariadb-10.3.13-zerofill.patch	2019-05-25 10:34:34 UTC (rev 354170)
@@ -0,0 +1,29 @@
+From 19734814ed4beeebd48180ad4c123047e3743ff2 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Dani=C3=ABl=20van=20Eeden?= <git at myname.nl>
+Date: Tue, 5 Mar 2019 16:24:17 +0100
+Subject: [PATCH] Fix for MariaDB 10.3.13 with zerofil
+
+Issue: #304
+---
+ dbdimp.c | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/dbdimp.c b/dbdimp.c
+index a9c37cf..0cea5c8 100644
+--- a/dbdimp.c
++++ b/dbdimp.c
+@@ -4055,9 +4055,13 @@ int dbd_describe(SV* sth, imp_sth_t* imp_sth)
+         break;
+ 
+       default:
+-#if MYSQL_VERSION_ID > 100300
++#if (MYSQL_VERSION_ID > 100300) && (MYSQL_VERSION_ID < 10313)
+         // https://jira.mariadb.org/browse/MDEV-18143
+         buffer->buffer_length= fields[i].max_length ? fields[i].max_length : 2;
++#elif MYSQL_VERSION_ID > 100312
++        // https://jira.mariadb.org/browse/MDEV-18823
++        buffer->buffer_length= fields[i].max_length ? fields[i].max_length + 1 : 2;
++        buffer->buffer_length= fields[i].length > fields[i].max_length ? fields[i].length + 1 : 2;
+ #else
+         buffer->buffer_length= fields[i].max_length ? fields[i].max_length : 1;
+ #endif



More information about the arch-commits mailing list