Skip to content

Commit

Permalink
Fix for MariaDB 10.3.13 with zerofil
Browse files Browse the repository at this point in the history
  • Loading branch information
dveeden committed Mar 6, 2019
1 parent 8ea3668 commit 8b5ba5f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion dbdimp.c
Expand Up @@ -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 < 100313)
// 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
Expand Down

0 comments on commit 8b5ba5f

Please sign in to comment.