<div dir="ltr"><div dir="ltr"><div>Hi,</div><div><br></div><div>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.</div><div><br></div><div>Perl seems to retrieve the information from metadata after mysql_stmt_store_result() call. According to the documentation (<a href="https://dev.mysql.com/doc/refman/8.0/en/mysql-stmt-attr-set.html" target="_blank">https://dev.mysql.com/doc/refman/8.0/en/mysql-stmt-attr-set.html</a>) 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.</div><div><br></div><div>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"</div><div><br></div><div>/Georg<br></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Fri, Dec 28, 2018 at 1:31 PM gregor herrmann <<a href="mailto:gregoa@debian.org" target="_blank">gregoa@debian.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Fri, 28 Dec 2018 11:27:04 +0200, Otto Kekäläinen wrote:<br>
<br>
> pe 28. jouluk. 2018 klo 11.09 Georg Richter (<a href="mailto:georg@mariadb.com" target="_blank">georg@mariadb.com</a>) kirjoitti:<br>
> > no clue about dbd-mysql - we reported several bugs (and sent<br>
> > fixes), but didn't get feedback since more than a year. Why don't<br>
> > you ship DBD-mariadb instead?<br>
> Gregor Hermann, do you want to switch to DBD-mariadb instead?<br>
<br>
DBD-mariadb is in the archive since a couple of months:<br>
<a href="https://tracker.debian.org/libdbd-mariadb-perl" rel="noreferrer" target="_blank">https://tracker.debian.org/libdbd-mariadb-perl</a><br>
<br>
Unfortunately, it's not a 1:1 replacement for DBD-mysql and many user<br>
will want to continue using the latter in their existing codebase.<br>
<br>
Georg, maybe you can give us pointers to the bugs and fixes you<br>
mentioned above?<br>
<br>
<br>
Cheers,<br>
gregor<br>
<br>
-- <br>
 .''`.  <a href="https://info.comodo.priv.at" rel="noreferrer" target="_blank">https://info.comodo.priv.at</a> -- Debian Developer <a href="https://www.debian.org" rel="noreferrer" target="_blank">https://www.debian.org</a><br>
 : :' : OpenPGP fingerprint D1E1 316E 93A7 60A8 104D  85FA BB3A 6801 8649 AA06<br>
 `. `'  Member VIBE!AT & SPI Inc. -- Supporter Free Software Foundation Europe<br>
   `-   NP: Penelope Swales: Turning Point<br>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail-m_2107769351267671768gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Georg Richter, Senior Software Engineer<br></div><div>MariaDB Corporation Ab<br></div></div></div></div></div>