Subject: | Support for already running database for tests broken again in t/05dbcreate.t |
Hi,
This might be entirely my fault at the end, but I am not sure. I am happy to be told
I do stupid things :)
my DSN is 'DBI:mysql:test;mysql_socket=//tmp/dbd-mysql-test.9EetYa/socket'
The current regex does:
$test_dsn = 'DBI:mysql:test;mysql_socket=//tmp/dbd-mysql-test.9EetYa/socket';
$test_dsn =~ s/^DBI:mysql:([^:]+)(:?)/DBI:mysql:$2/;
print "$test_dsn\n";
print "\$1: $1\n";
print "\$2: $2\n";
which output is:
DBI:mysql:
$1: test;mysql_socket=//tmp/dbd-mysql-test.9EetYa/socket
$2:
the resulting 'DBI:mysql:' obviously can't connect to my existing socket.
The previous regex did not match, so:
$test_dsn = 'DBI:mysql:test;mysql_socket=//tmp/dbd-mysql-test.9EetYa/socket';
$test_dsn =~ s/^DBI:mysql:([^:]+):/DBI:mysql::/;
print "$test_dsn\n";
print "\$1: $1\n";
print "\$2: $2\n";
the output:
DBI:mysql:test;mysql_socket=//tmp/dbd-mysql-test.9EetYa/socket
$1:
$2:
I have sneaky suspicion that I should specify my DSN in a different way. For
the moment I have reverted your change locally.
Thanks for any help and thanks for DBD::MySQL!
__
Vlad