Skip Menu |

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

Report information
The Basics
Id: 58769
Status: resolved
Worked: 30 min
Priority: 0/
Queue: DBD-Multi

People
Owner: Dan [...] DWright.Org
Requestors: NCLEATON [...] cpan.org
Cc:
AdminCc:

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



Subject: no failover if a coderef data source fails to connect
Hi, If a dsource is a coderef and it fails to connect to its database server and returns a false value, then execution drops off the end of this block in _connect_dsource(), which then goes on to break when it tries to use the coderef as an arrayref: # Support code-refs which return handles if (ref $dsource eq 'CODE') { my $handle = $dsource->(); return $handle if UNIVERSAL::isa($handle, 'DBI::db'); } This prevents failover to other data sources if the first one tried is unavailable at connect time.
I'm interested to see this get fixed as well.
Hi, Just writing to acknowledge the receipt of the bug report. I'm currently working on regression tests to reproduce the error, and then I'll be able to commit a patch. I don't expect this to take long. Thanks, -Dan
Just uploaded DBD::Multi 0.15 to PAUSE. Should fix the problems. Please let me know if it doesn't. Thanks, -Dan