Skip to content

Commit

Permalink
05dbcreate: make dsn point to correct server
Browse files Browse the repository at this point in the history
If the database test server was not on localhost and the test database
was not yet created, we would not correctly create the test database.

Reported by Vladimir Marek.
   (https://rt.cpan.org/Ticket/Display.html?id=112072)
  • Loading branch information
mbeijen committed Aug 19, 2016
1 parent 6341ff1 commit 138d73f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
Reported by Jitka Plesnikova @ Red Hat
(https://rt.cpan.org/Public/Bug/Display.html?id=116959)
(https://bugzilla.redhat.com/show_bug.cgi?id=1366773)
* If the database test server was not on localhost and the test database was
not yet created, we would not correctly create the test database.
Reported by Vladimir Marek.
(https://rt.cpan.org/Ticket/Display.html?id=112072)

2016-08-11 Patrick Galbraith, Michiel Beijen, DBI/DBD community (4.035_02)
* Test 56connattr.t failed when run when performance schema is enabled, but
Expand Down
5 changes: 4 additions & 1 deletion t/05dbcreate.t
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@ use vars qw($test_user $test_password $test_db $test_dsn);
use lib 't', '.';
require 'lib.pl';

# remove database from DSN
$test_dsn =~ s/^DBI:mysql:([^:]+):/DBI:mysql::/;

my $dbh;
eval {$dbh= DBI->connect('DBI:mysql:', $test_user, $test_password,
eval {$dbh= DBI->connect($test_dsn, $test_user, $test_password,
{ RaiseError => 1, PrintError => 1, AutoCommit => 0 });};
if ($@) {
diag $@;
Expand Down

0 comments on commit 138d73f

Please sign in to comment.