Bug#917303: Request for help with MariaDB 10.3 / libdbd-mysql-perl packaging

2019-01-08 Thread Georg Richter
Hi Otto,

it doesn't make sense to zero a pointer, if the container (or speaking of
C: structure) is freed afterwards. The documentation clearly states, that a
handle (which was previously freed by mysql_close() ) needs to be
initialized again.

The pull request fixes the perl test case, but it didn't fix perl itself,
which still abuses internal members of the connector, which are considered
to be opaque. (And being opaque is the goal for next major release).

/Georg


On Mon, Jan 7, 2019 at 8:40 PM Otto Kekäläinen  wrote:

> Hello!
>
> gregor herrmann  kirjoitti pe 4. tammikuuta 2019 klo
> 1.23:
>
>> On Thu, 03 Jan 2019 22:04:48 +0200, Otto Kekäläinen wrote:
>>
>> > Just checking: are you Georg or Gregor currently working on this
>> > issue, and do you have any estimate when we could expect either a
>> > patch to MariaDB Connector C or a new upload of DBD-mysql so this
>> > issue would be resolved?
>>
>> I had a look at DBD::mysql and DBD::MariaDB but without any success.
>> I hope that someone with a better understanding than me from the
>> Debian perl Group can try and find a solution.
>>
>> I've now pinged the upstream issue at:
>> https://github.com/perl5-dbi/DBD-mysql/issues/275
>
>
> Thanks Gregor for working with upstreams to fix this. Nice Eric Herman was
> also involved ;)
>
> Georg Richter, I hope you can review
> https://github.com/MariaDB/mariadb-connector-c/pull/95 shortly, thanks!
>
>
>>

-- 
Georg Richter, Senior Software Engineer
MariaDB Corporation Ab


Bug#917303: Request for help with MariaDB 10.3 / libdbd-mysql-perl packaging

2018-12-28 Thread Georg Richter
About the reconnect bug:

Latest code is setting the reconnect flag correctly via mysql_options
(instead of accessing internal member), so I need to  debug why it's
failing.

/Georg

On Fri, Dec 28, 2018 at 1:31 PM gregor herrmann  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


Bug#917303: Request for help with MariaDB 10.3 / libdbd-mysql-perl packaging

2018-12-28 Thread Georg Richter
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, ) 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  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