I would tend to think that such a ping would be a special case, but I agree 
with you to keep it as is:

Simply because overloading ping() with a complete eval'ed select statement 
would be trivial. And the opposite isn't.

---
Henri Asseily
henri.tel

On Nov 5, 2012, at 4:35 PM, Charles Jardine <c...@cam.ac.uk> wrote:

> On 05/11/12 02:47, Greg Sabino Mullane wrote:
> 
> 
>>> Also by the time an application does execute some SQL, the the
>>> connection/node/server/network could have dropped and so the application
>>> 'will have to check & recover from write failures at that point anyway."
>> 
>> This is a bit of a red herring. You could say that about any database action,
>> anytime ever. I personally think a simple select is better than relying
>> on a low-level library call, as it does a more complete end-to-end check
>> that is almost certainly closer to what the caller is going to use the
>> connection for.
> 
> I rather strongly disagree. It is possible to do useful work over a connection
> in situations when a 'simple select' is not possible. My production
> Oracle database is protected by a physical standby database. This
> database is, in Oracle terms, mounted but not open. A user with the SYSADMIN
> privilege can connect to the database. It is possible use virtual views to
> monitor the database and ALTER SYSTEM commands to change its state. However
> it is not possible to select from any table. SELECT 1 FROM DUAL will fail.
> 
> I would like to see $dbh->ping to continue to return a true values in cases
> like this.
> 
> -- 
> Charles Jardine - Computing Service, University of Cambridge
> c...@cam.ac.uk    Tel: +44 1223 334506, Fax: +44 1223 334679

Reply via email to