Skip Menu |
 

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

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

People
Owner: Nobody in particular
Requestors: w.phillip.moore [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 4.029
Fixed in: 4.030_01



Subject: DBD-mysql 4.029 can no longer be tested against a remote database
Download (untitled) / with headers
text/plain 1016b
For years (literally, well over a decade) I have been building DBD-mysql on multiple platforms for multiple perl compilers, and always used a centrally managed testdb that I set up and maintain for precisely this purpose. I have been doing this for all of the DBD::* drivers I build and support: you configure a test resource and then configure each build to use it. I've been doing this for MySQL, Sybase, Oracle, DB2, etc. The latest release (4.029) includes a change that has broken this: * Added fix to tests to create test database if not exists (contstant failure on Travis) (CaptTofu) This is implemented in t/05dbcreate.t, and it attempts to connect to the database WITHOUT using the auto-generated $test_dsn variable, like almost all of the other uses of DBI->connect throughout the test suite. This assumes that the database is on the localhost, and as a result, the entire test suite bails because it can't connect. The attached patch simply makes 05dbcreate.t use $test_dsn, and fixes the issue.
Subject: 05dbcreate.t.patch
Download 05dbcreate.t.patch
text/x-diff 994b
diff -rc ../DBD-mysql-4.029-orig/t/05dbcreate.t ./t/05dbcreate.t *** ../DBD-mysql-4.029-orig/t/05dbcreate.t 2014-12-08 08:56:52.000000000 -0500 --- ./t/05dbcreate.t 2015-02-06 09:21:45.362117233 -0500 *************** *** 8,19 **** use vars qw($mdriver); $|= 1; ! use vars qw($test_user $test_password $test_db); use lib 't', '.'; require 'lib.pl'; my $dbh; ! eval {$dbh= DBI->connect('DBI:mysql:information_schema', $test_user, $test_password, { RaiseError => 1, PrintError => 1, AutoCommit => 0 });}; if ($@) { # https://rt.cpan.org/Ticket/Display.html?id=31823 --- 8,19 ---- use vars qw($mdriver); $|= 1; ! use vars qw($test_user $test_password $test_db $test_dsn); use lib 't', '.'; require 'lib.pl'; my $dbh; ! eval {$dbh= DBI->connect($test_dsn, $test_user, $test_password, { RaiseError => 1, PrintError => 1, AutoCommit => 0 });}; if ($@) { # https://rt.cpan.org/Ticket/Display.html?id=31823
Download (untitled) / with headers
text/plain 1014b
Thanks for your bug report! On Fri Feb 06 09:26:07 2015, WPMOORE wrote: Show quoted text
> For years (literally, well over a decade) I have been building DBD- > mysql on multiple platforms for multiple perl compilers, and always > used a centrally managed testdb that I set up and maintain for > precisely this purpose. I have been doing this for all of the DBD::* > drivers I build and support: you configure a test resource and then > configure each build to use it. I've been doing this for MySQL, > Sybase, Oracle, DB2, etc. > > The latest release (4.029) includes a change that has broken this:
Actually this is already fixed in the 4.030_1 test release which was put on cpan about a week ago: https://metacpan.org/release/CAPTTOFU/DBD-mysql-4.030_01 You can install it with your cpan client if you specify it explicitly: cpan CAPTTOFU/mysql-4.030_01.tar.gz or if you use cpanm, using the --dev switch: cpanm --dev DBD::mysql Sorry for the annoyance! We'll release a 'proper' 4.031 in a few weeks. -- Michiel


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

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