On Fri, 10 Nov 2000, Tim Sweetman wrote:
> > Would you be interested in adding support for resetting some of these to
> > Apache::DBI?  It's pretty easy to do, using PerlCleanupHandler like the
> > auto-rollback does.  It would be database-specific though, so you'd have
> > to find a way for people to explicitly request cleanups.
> 
> I suspect automating via DBI would be a major pain, because you'd have
> to be able to identify the "dangerous" changes in state. Probably
> requiring SQL to be parsed. :(

The current rollback cleanup doesn't parse SQL.  It knows that a rollback
won't do damage if there are no transactions to be cleaned up, so it's
safe to do every time.  If there are other things that work this way, you
could add them.  Probably wouldn't work for things like MySQL table locks
though.  People will have to do that themselves.

> In principle, you could probably have a ->do_not_reuse method which
> could be called before someone does something dangerous. As long as they
> remember.

But that would also mean no more persistent connection.  Maybe that would
work if you don't do it very often.

- Perrin

Reply via email to