Fix for DBD-mysql failing to die on errors on windows

"Christian Walde" <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.dbi.general
Message-ID <op.v3lysra4n4yvrm@xenpad>
On Oct 4, 11:51 am, [email protected] ("Martin J. Evans") wrote:

> Seems to work fine for me:
>perl -le 'use strict; use warnings; use DBI; my $h = DBI->connect("dbi:mysql:database=test", "xxx","yyy", {RaiseError => 0, PrintError => 0}) or die $DBI::errstr; my $s = $h->prepare(q/select * from does_not_exist/) or die $DBI::errstr; $s->execute or die "DBI:" . $DBI::errstr . " sth:", $s->errstr;'
>DBI:Table 'test.does_not_exist' doesn't exist sth:Table 'test.does_not_exist' doesn't exist at -e line 1.

I'm getting the same behavior. This code:

     use DBI;
     my $d = DBI->connect( "DBI:mysql:database=cpanstats", 'root', 'passwordhere', { RaiseError => 1 } );
     $d->do( 'this should die' );

runs through, instead of dieing like it should.

This is with:
DBD-mysql 4.0.20 (installed via ppm)
DBI 1.616 (comes with ActivePerl)
ActivePerl 5.12.4
Windows XP

Thanks to Jan Dubois pointing it out to me on ActivePerl's bug tracker, this was apparently posted to the mysql mailing list as well, where a fix came up:

http://lists.mysql.com/perl/4415

Since windows users currently have no way of backing out to an earlier working version it would be very nice if this could be integrated and released quickly. :)

-- 
With regards,
Christian Walde
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.