On Thu, Jan 24, 2002 at 04:21:49PM +0000, Simon Oliver wrote: > Tim Bunce wrote: > > > > Sigh. > > > > No one need ever call finish except when they know that they have not > > fetched all their data. > > Yes, according to the DBI docs, but in practice I have found that sometimes it > is necessary to issue $sth->finish prior to $dbh->disconnect even though all > data from a statement handle has been retreived. The error is something like > disconnect invalidates active statement handle. > > I guess this is a problem with individual DBD's and may have been fixed > recently (I can't actually reproduce this error today or I would give an > example - lame?). I seem to remember it always happening with one or both of > DBD::Pg and DBD::MySQL.
Old versions of DBD::mysql had a bug. Maybe DBD::Pg has as well. But the "disconnect invalidates active statement handles" warnings can also indicate logic problems in your own code (unless your using RaiseError) which slapping in finish() calls will simply mask. Tim.
