This queue is for tickets about the DBIx-Class CPAN distribution.

Report information
The Basics
Id:
108741
Status:
patched
Priority:
Low/Low
Queue:

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

BugTracker
Severity:
(no value)
Broken in:
(no value)
Fixed in:
(no value)



Subject: Use of uninitialized value if connection fails
Date: Wed, 11 Nov 2015 14:52:45 +0000
To: bug-DBIx-Class@rt.cpan.org
From: Gareth Tunley <gjtunley@gmail.com>
Hi,

Not sure if this is a bug with DBD::mysql or with DBIx::Class so raising against DBIx::Class first due to the warnings mentioning DBIx::Class::Storage::DBI::mysql

Using DBIx::Class 0.082820 and DBD::mysql 4.033 get the following warnings if DBIx::Class cannot connect to the destination server (in this case because I mistyped the IP address in the connection string):

Use of uninitialized value $mysql_ver in numeric lt (<) at /usr/local/share/perl/5.18.2/DBIx/Class/Storage/DBI/mysql.pm line 117.
Use of uninitialized value $mysql_ver in numeric lt (<) at /usr/local/share/perl/5.18.2/DBIx/Class/Storage/DBI/mysql.pm line 117.
DBIx::Class::Storage::DBI::catch {...} (): DBI Connection failed: DBI connect('database=xyz;host=x.x.x.x','x',...) failed: Can't connect to MySQL server on 'x.x.x.x' (111) at /usr/local/share/perl/5.18.2/DBIx/Class/Storage/DBI.pm line 1489. at ./my_script.pl line 123

Thanks

Gareth

--
Gareth Tunley - gjtunley@gmail.com
Subject: Re: [rt.cpan.org #108741] Use of uninitialized value if connection fails
Date: Wed, 11 Nov 2015 15:55:10 +0100
To: bug-DBIx-Class@rt.cpan.org
From: Peter Rabbitson <ribasushi@cpan.org>
On 11/11/2015 03:52 PM, Gareth Tunley via RT wrote:
Show quoted text
> Wed Nov 11 09:52:56 2015: Request 108741 was acted upon. > Transaction: Ticket created by gjtunley@gmail.com > Queue: DBIx-Class > Subject: Use of uninitialized value if connection fails > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: gjtunley@gmail.com > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=108741 > > > > Hi, > > Not sure if this is a bug with DBD::mysql or with DBIx::Class so raising > against DBIx::Class first due to the warnings mentioning > DBIx::Class::Storage::DBI::mysql
Yes, this is due to DBIx::Class internals. Thanks for reporting!


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.