Skip Menu |

This queue is for tickets about the DBD-mysql CPAN distribution.

Report information
The Basics
Id: 71047
Status: resolved
Priority: 0/
Queue: DBD-mysql

People
Owner: Nobody in particular
Requestors: tadhgmaccarthy [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 4.020
Fixed in: 4.022



Subject: Undefined $DBI::errstr on execute fail on Windows-7-x64
Date: Sun, 18 Sep 2011 14:19:30 +0800
To: bug-DBD-mysql [...] rt.cpan.org
From: Tadhg MacCarthy <tadhgmaccarthy [...] gmail.com>
Hello, The following code: use warnings; use DBI; $h=DBI->connect('dbi:mysql:cq','root','password',{RaiseError=>0,PrintError=>0}) or die "Connection Failed: $DBI::errstr"; $s=$h->prepare("select * from does_not_exist"); $s->execute or die 'Execute Failed with error ['. $s->errstr . ']'; produces the output: Use of uninitialized value in concatenation (.) or string at testmysql.plline 15. Execute Failed with error [] at testmysql.pl line 5. The environment is: DBD-mysql 4.0.19 MySQL: Server version: 5.5.15 MySQL Community Server (GPL) Perl 5.14.1: This is perl 5, version 14, subversion 1 (v5.14.1) built for MSWin32-x64-multi-thread ActivePerl 5.14.1 Build 1401 (64-bit) Windows 7 Professional Sevice Pack 1 64 bit The code produces the expected output when the operating system is Windows XP 32-bit. Other information: See http://stackoverflow.com/questions/7432944/undefined-dbierrstr-using-dbi-perl-and-mysql-on-windows-7-x64for a discussion on StackOverflow Thanks in advance, Tadhg
Subject: AW: [rt.cpan.org #71047] Undefined $DBI::errstr on execute fail on Windows-7-x64
Date: Tue, 4 Oct 2011 17:51:55 +0200
To: <bug-DBD-mysql [...] rt.cpan.org>
From: "Neubauer, Ralf" <Ralf.Neubauer [...] wido.bv.aok.de>
Hi, I get the same behavior on WinXP (32 bit): C:\>perl -le "use strict; use warnings; use DBI; my $h = DBI->connect('dbi:mysql:xxx', 'yyy','zzz', {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;" Use of uninitialized value $DBI::errstr in concatenation (.) or string at -e line 1. Use of uninitialized value in die at -e line 1. DBI: sth: at -e line 1. Note exactly the same happens with RaiseError=1, i.e. RaiseError doesn't work: C:\>perl -le "use strict; use warnings; use DBI; my $h = DBI->connect('dbi:mysql:xxx', 'yyy','zzz', {RaiseError => 1, PrintError => 1}) 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;" Use of uninitialized value $DBI::errstr in concatenation (.) or string at -e line 1. Use of uninitialized value in die at -e line 1. DBI: sth: at -e line 1. C:\>perl --version This is perl 5, version 14, subversion 1 (v5.14.1) built for MSWin32-x86-multi-thread (with 1 registered patch, see perl -V for more detail) Copyright 1987-2011, Larry Wall Binary build 1401 [294969] provided by ActiveState http://www.ActiveState.com Built Jun 16 2011 18:54:40 MySQL is 5.1.44-community. DBI is 1.616 (the one coming with this ActivePerl build). DBD-mysql is 4.019 (the one from the ActiveState repository). Ralf
Subject: AW: [rt.cpan.org #71047] Undefined $DBI::errstr on execute fail on Windows-7-x64
Date: Wed, 5 Oct 2011 13:50:46 +0200
To: <bug-DBD-mysql [...] rt.cpan.org>
From: "Neubauer, Ralf" <Ralf.Neubauer [...] wido.bv.aok.de>
The combination WinXP, DBI 1.616, DBD-mysql 4.019, perl v5.10.1 ActiveState build 1006 is broken as well. WinXP DBI 1.607, DBD-mysql 4.017, perl v5.10.1 ActiveState build 1006 is ok. Win 2003 Server DBI 1.615, DBD-mysql 4.017, perl v5.10.1 ActiveState build 1006 is ok. DBD-mysql 4.020 isn't available as PPM yet, but I didn't find a corresponding changelog entry anyway.
Already posted to the dbi-users list, but to give it more a chance to be seen: There is a fix on the mysql mailing list: http://lists.mysql.com/perl/4415
For anyone else stuck on a broken DBD-mysql, you can get ActiveState's properly working 4.018 for 5.12 via this command: ppm install http://ppm4.activestate.com/MSWin32-x86/5.12/1205/C/CA/ CAPTTOFU/DBD-mysql-4.018.ppd For other versions you can try just changing the relevant parts in the URL.
Subject: Re: [rt.cpan.org #71047] Undefined $DBI::errstr on execute fail on Windows-7-x64
Date: Fri, 21 Oct 2011 14:50:09 +0800
To: bug-DBD-mysql [...] rt.cpan.org
From: Tadhg MacCarthy <tadhgmaccarthy [...] gmail.com>
Excellent - thanks Christian! I moved to 4.020 for 64bit Windows on ActiveState 5.14 via: ppm install http://ppm4.activestate.com/MSWin32-x64/5.14/1401/C/CA/CAPTTOFU/DBD-mysql-4.020.ppd and it's working nicely. :-) On Thu, Oct 20, 2011 at 9:05 PM, Christian Walde via RT < bug-DBD-mysql@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=71047 > > > For anyone else stuck on a broken DBD-mysql, you can get ActiveState's > properly working 4.018 for 5.12 via this command: > > ppm install http://ppm4.activestate.com/MSWin32-x86/5.12/1205/C/CA/ > CAPTTOFU/DBD-mysql-4.018.ppd > > For other versions you can try just changing the relevant parts in the > URL. >
Subject: AW: [rt.cpan.org #71047] Undefined $DBI::errstr on execute fail on Windows-7-x64
Date: Fri, 21 Oct 2011 16:07:02 +0200
To: <bug-DBD-mysql [...] rt.cpan.org>
From: "Neubauer, Ralf" <Ralf.Neubauer [...] wido.bv.aok.de>
careful, ActiveState got 4.020 to build on Tuesday, 2011-10-18, when they accepted my build fix, but that version was still broken. the rebuild with my patch from http://lists.mysql.com/perl/4415 finished today (2011-10-21), so if you happened to install 4.020 in the mean time, you have the running, but broken version. you have to uninstall DBD-mysql and install again to get the fix, as there is no secondary version/build number like with linux packages
Subject: Re: [rt.cpan.org #71047] Undefined $DBI::errstr on execute fail on Windows-7-x64
Date: Sat, 22 Oct 2011 07:43:51 +0800
To: bug-DBD-mysql [...] rt.cpan.org
From: Tadhg MacCarthy <tadhgmaccarthy [...] gmail.com>
On Fri, Oct 21, 2011 at 10:07 PM, Neubauer, Ralf via RT < bug-DBD-mysql@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=71047 > > > careful, ActiveState got 4.020 to build on Tuesday, 2011-10-18, when > they accepted my build fix, but that version was still broken. the > rebuild with my patch from http://lists.mysql.com/perl/4415 finished > today (2011-10-21), so if you happened to install 4.020 in the mean > time, you have the running, but broken version. you have to uninstall > DBD-mysql and install again to get the fix, as there is no secondary > version/build number like with linux packages >
Thanks Ralf - done.
This is finally merged here: https://github.com/perl5-dbi/DBD-mysql/commit/80e88e04a29bbec7ad593c1289b695d0d6270622 we'll have a new release with the fix out this week.