Hi, the zerofill test fails, since dbd-mysql binds a buffer with buffer_length=1, so MariaDB Connector/C can't add leading zeros and just returns 1.
Perl seems to retrieve the information from metadata after mysql_stmt_store_result() call. According to the documentation ( https://dev.mysql.com/doc/refman/8.0/en/mysql-stmt-attr-set.html) you have to call mysql_stmt_attr_set(stmt, STMT_ATTR_UPDATE_MAX_LENGTH, &value) to force mysql_stmt_store_result to update the max_length value in metadata - however its not set and therefore Connector/C doesn't return expected value. The correct behavior would be to check the metadata after mysql_stmt_prepare() and calculate the buffer_size or to force Connector/C to calculate the size via STMT_ATTR_UPDATE_MAX_LENGTH. I would prefer the latter one, since in some cases metadata after prepare can't be calculated correctly, e.g. for a "SELECT ? FROM DUAL" /Georg On Fri, Dec 28, 2018 at 1:31 PM gregor herrmann <gre...@debian.org> wrote: > On Fri, 28 Dec 2018 11:27:04 +0200, Otto Kekäläinen wrote: > > > pe 28. jouluk. 2018 klo 11.09 Georg Richter (ge...@mariadb.com) > kirjoitti: > > > no clue about dbd-mysql - we reported several bugs (and sent > > > fixes), but didn't get feedback since more than a year. Why don't > > > you ship DBD-mariadb instead? > > Gregor Hermann, do you want to switch to DBD-mariadb instead? > > DBD-mariadb is in the archive since a couple of months: > https://tracker.debian.org/libdbd-mariadb-perl > > Unfortunately, it's not a 1:1 replacement for DBD-mysql and many user > will want to continue using the latter in their existing codebase. > > Georg, maybe you can give us pointers to the bugs and fixes you > mentioned above? > > > Cheers, > gregor > > -- > .''`. https://info.comodo.priv.at -- Debian Developer > https://www.debian.org > : :' : OpenPGP fingerprint D1E1 316E 93A7 60A8 104D 85FA BB3A 6801 8649 > AA06 > `. `' Member VIBE!AT & SPI Inc. -- Supporter Free Software Foundation > Europe > `- NP: Penelope Swales: Turning Point > -- Georg Richter, Senior Software Engineer MariaDB Corporation Ab