Skip to content

Commit

Permalink
Remove non-functional part of ::Storage::DBI::Sybase::_ping
Browse files Browse the repository at this point in the history
This code has existed in one form or another since about 322b7a6, and failed
multiple levels of review and later was left as-is due to a lack of a testing
rig :/

It seems that the simple change is sufficient, but more testing with more
obscure Sybase driver combinations is certainly needed
  • Loading branch information
ribasushi committed Sep 13, 2016
1 parent 7305f6f commit 82c5f91
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 21 deletions.
1 change: 1 addition & 0 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ Revision history for DBIx::Class
- Fix corner case of stringify-only overloaded objects being used in
create()/populate()
- Fix spurious warning on MSSQL cursor invalidation retries (RT#102166)
- Fix incorrect ::Storage->_ping() behavior under Sybase (RT#114214)
- Fix several corner cases with Many2Many over custom relationships
- Fix corner cases of C3 composition being broken on OLD_MRO (5.8.x)
only: https://github.com/frioux/DBIx-Class-Helpers/issues/61
Expand Down
25 changes: 4 additions & 21 deletions lib/DBIx/Class/Storage/DBI/Sybase.pm
Original file line number Diff line number Diff line change
Expand Up @@ -76,27 +76,10 @@ sub _ping {
local $dbh->{RaiseError} = 1;
local $dbh->{PrintError} = 0;

# FIXME if the main connection goes stale, does opening another for this statement
# really determine anything?
# FIXME (2) THIS MAKES 0 SENSE!!! Need to test later
if ($dbh->{syb_no_child_con}) {
return dbic_internal_try {
$self->_connect->do('select 1');
1;
}
catch {
0;
};
}

return (
(dbic_internal_try {
$dbh->do('select 1');
1;
})
? 1
: 0
);
( dbic_internal_try { $dbh->do('select 1'); 1 } )
? 1
: 0
;
}

sub _set_max_connect {
Expand Down

1 comment on commit 82c5f91

@mrmuskrat
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That looks good to me!

Please sign in to comment.