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
MIME-Version: 1.0
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
Message-ID: <rt-4.0.18-16376-1479482683-633.0-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 1072
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
MIME-Version: 1.0
In-Reply-To: <rt-4.0.18-16376-1479482683-633.0-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <rt-4.0.18-16376-1479482683-633.0-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-3223-1479586699-31.118837-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 1366
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/;
MIME-Version: 1.0
In-Reply-To: <rt-4.0.18-3223-1479586699-31.118837-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <rt-4.0.18-16376-1479482683-633.0-0-0 [...] rt.cpan.org> <rt-4.0.18-3223-1479586699-31.118837-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-6858-1484749119-1825.118837-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
RT-Send-CC: vlmarek [...] volny.cz
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 1564
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?
MIME-Version: 1.0
In-Reply-To: <rt-4.0.18-6858-1484749119-1825.118837-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: API
References: <rt-4.0.18-16376-1479482683-633.0-0-0 [...] rt.cpan.org> <rt-4.0.18-3223-1479586699-31.118837-0-0 [...] rt.cpan.org> <rt-4.0.18-6858-1484749119-1825.118837-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-7418-1485433390-848.0-0-0 [...] rt.cpan.org>
Message-ID: <rt-4.0.18-7418-1485433390-597.118837-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
From: vlmarek [...] volny.cz
Content-Length: 209
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
MIME-Version: 1.0
In-Reply-To: <rt-4.0.18-16376-1479482683-633.0-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <rt-4.0.18-16376-1479482683-633.0-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-25261-1485762374-360.118837-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 95
MIME-Version: 1.0
In-Reply-To: <rt-4.0.18-25261-1485762374-360.118837-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <rt-4.0.18-16376-1479482683-633.0-0-0 [...] rt.cpan.org> <rt-4.0.18-25261-1485762374-360.118837-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-7011-1498900499-355.118837-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 37
Reopening, fix was reverted in 4.043.
X-RT-Interface: REST
MIME-Version: 1.0
X-Mailer: MIME-tools 5.504 (Entity 5.504)
RT-Message-ID: <rt-4.0.18-24810-1510732523-1167.118837-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Content-Disposition: inline
Content-Transfer-Encoding: binary
Content-Length: 78


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.