Skip Menu |
 

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

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

People
Owner: Nobody in particular
Requestors: vlmarek [...] volny.cz
Cc: pali [...] cpan.org
AdminCc:

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



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
Download (untitled) / with headers
text/plain 1.3k
On Pia Nov 18 10:24:43 2016, neuron wrote: Show quoted text
> 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
Looks like that regex does not handle semicolon. It needs to be fixed... What about this? $test_dsn =~ s/^DBI:mysql:([^:]+)([:;]?)/DBI:mysql:$2/;
RT-Send-CC: vlmarek [...] volny.cz
Download (untitled) / with headers
text/plain 1.5k
On Sat Nov 19 15:18:19 2016, PALI wrote: Show quoted text
> On Pia Nov 18 10:24:43 2016, neuron wrote:
> > 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
> > Looks like that regex does not handle semicolon. It needs to be > fixed... What about this? > > $test_dsn =~ s/^DBI:mysql:([^:]+)([:;]?)/DBI:mysql:$2/;
Hi! Can you test above rergex if it fixes your problem?
From: vlmarek [...] volny.cz
Download (untitled) / with headers
text/plain 209b
Sorry for the late reply. Here's what I am using: $test_dsn =~ s/^DBI:mysql:([^:;]+)([:;]?)/DBI:mysql:$2/; This would also work: $test_dsn =~ s/^DBI:mysql:([^:;]+)([:]?)/DBI:mysql:$2/; Thank you __ Vlad
Reopening, fix was reverted in 4.043.


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.