archrelease: copy trunk to extra-x86_64
[arch-packages.git] / perl-dbd-mysql / trunk / mariadb-10.3.13-zerofill.patch
blobce6eb859912c178605d8a613fc2d77c5c8cc181c
1 From 19734814ed4beeebd48180ad4c123047e3743ff2 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Dani=C3=ABl=20van=20Eeden?= <git@myname.nl>
3 Date: Tue, 5 Mar 2019 16:24:17 +0100
4 Subject: [PATCH] Fix for MariaDB 10.3.13 with zerofil
6 Issue: #304
7 ---
8 dbdimp.c | 6 +++++-
9 1 file changed, 5 insertions(+), 1 deletion(-)
11 diff --git a/dbdimp.c b/dbdimp.c
12 index a9c37cf..0cea5c8 100644
13 --- a/dbdimp.c
14 +++ b/dbdimp.c
15 @@ -4055,9 +4055,13 @@ int dbd_describe(SV* sth, imp_sth_t* imp_sth)
16 break;
18 default:
19 -#if MYSQL_VERSION_ID > 100300
20 +#if (MYSQL_VERSION_ID > 100300) && (MYSQL_VERSION_ID < 10313)
21 // https://jira.mariadb.org/browse/MDEV-18143
22 buffer->buffer_length= fields[i].max_length ? fields[i].max_length : 2;
23 +#elif MYSQL_VERSION_ID > 100312
24 + // https://jira.mariadb.org/browse/MDEV-18823
25 + buffer->buffer_length= fields[i].max_length ? fields[i].max_length + 1 : 2;
26 + buffer->buffer_length= fields[i].length > fields[i].max_length ? fields[i].length + 1 : 2;
27 #else
28 buffer->buffer_length= fields[i].max_length ? fields[i].max_length : 1;
29 #endif