Re: mod_perl/Apache::DBI
[prev]
[thread]
[next]
[Date index for 2005/04/06]
Perrin Harkins wrote:
>On Wed, 2005-04-06 at 18:35 -0400, Vince Veselosky wrote:
>
>
>>Apache::DBI can tell when the handle goes stale IFF the DBD implements
>>the 'ping' method.
>>
>>
>
>Not unless you override db_Main. Otherwise Apache::DBI's ping will
>never get called after the first connect. Ima::DBI will do the ping
>instead, which is okay as long as you didn't need the automatic rollback
>stuff that Apache::DBI does.
>
>
>
If you say so. I cannot swear as to which module is doing the ping, but
it does get done. It would not surprise me if it were in fact Ima::DBI,
because after implementing it and watching the SQL logs I thought there
were a lot more pings than I expected from Apache::DBI. Anyway, it works.
>> The standard MySQL driver apparently does not
>>implement said method
>>
>>
>
>Yes it does. According to the changelog it was added 6 years ago. You
>have an old version of Apache::DBI.
>
>
>
Hmm. I'm running Debian Sarge, so whatever they provide as .deb is what
I have. I can promise you there was no ping in DBD/mysql.pm before I
implemented it. My version (of DBD::mysql) claims to be 2.9003.
According to the CPAN archive that's from October 2003, less than 6
years ago. I do see that the changelog mentions ping in 1998. Perhaps it
was removed some time after that and not mentioned in the changelog?
That note in the Apache::DBI doc is in the current version, BTW,
although it does not mention MySQL explicitly.
-Vince
|
(message missing)
|