Re: DBD::mysql Re: Why is selectrow_hashref complaining about a fetch without execute?

Tim Bunce <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.dbi.sybase.devel
Message-ID <[email protected]>
On Sun, Jul 19, 2015 at 06:39:59PM -0700, David E. Wheeler wrote:
> On Jul 19, 2015, at 7:41 AM, Tim Bunce <[email protected]> wrote:
> 
> > Internally the DBI has a DBIc_ROW_COUNT(sth) macro that has an IV type.
> > That's a signed int that would be 64 bits on most modern systems.
> > On many of those systems the plain int type might be 32 bits.
> > 
> > I've just pushed an experimental change that might help in general
> > https://github.com/perl5-dbi/dbi/commit/29f6b9b76e9c637be31cb80f1a262ff68b42ef43#diff-cb6af96fe009d6f8d9d682415e1ab755
> > but probably wouldn't in your case.
> 
> Huh. Why not?

That change just adds a warning.

> > At the moment I'd view this as a DBD::mysql bug.

The assignment of signed values to unsigned types in DBD::mysql ought to
be fixed.

> > p.s. These open DBD::mysql issues might also be more or less related:
> > https://rt.cpan.org/Public/Bug/Display.html?id=48158
> > https://rt.cpan.org/Public/Bug/Display.html?id=80394
> > https://rt.cpan.org/Public/Bug/Display.html?id=75570
> 
> Given that these have had exactly 0 activity in three years, how should we go about getting thins on the maintaners’ radar?

I don't know. The repo is managed by the perl5-dbi org on github.
https://github.com/perl5-dbi/DBD-mysql so in theory any of the team
members https://github.com/orgs/perl5-dbi/people could commit patches.
Patrick Galbraith, the primary maintainer (CC'd) seems fairly active at
the moment so I'd start by asking Patrick for his thoughts.

> Also, is there something I can do in Sqitch to work around this issue?

I'm not sure. It's possible that a HandleSetError handler could help
https://metacpan.org/pod/DBI#HandleSetErr

(It's also possible that I'm misreading the cause as I'm not clear how
the -2 becomes a -1 but I gave up looking further after seeing the
problems with the current DBD::mysql code.)

Tim.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.