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
9 1 file changed, 5 insertions(+), 1 deletion(-)
11 diff --git a/dbdimp.c b/dbdimp.c
12 index a9c37cf..0cea5c8 100644
15 @@ -4055,9 +4055,13 @@ int dbd_describe(SV* sth, imp_sth_t* imp_sth)
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;
28 buffer->buffer_length= fields[i].max_length ? fields[i].max_length : 1;