On Jan 13, 2006, at 10:17 PM, Perrin Harkins wrote:
This shouldn't be an issue in an Apache::DBI situation either, if you didn't start out with AutoCommit = 1. When you have AutoCommit turned off, it will do a rollback automatically at the end of every request. You could manually push that cleanup handler, or you could connect with AutoCommit = 0 and switch it to 1 after. Look at the Apache::DBI code to see the details.

well yeah. its just a really weird situation that is easy to get into and not really documented. i'm kind of surprised this didn't happen to anyone else. maybe i'm just doing things REALLY wrong :)

Sure, you can catch it like any other exception. I think you'll find that when it dies it goes back to the original settings, i.e. AutoCommit 0. I thought it would also do a rollback on an error, but maybe not.

I thought/assumed it would/did too :(

spent hours combing through my code thinking that i was explicitly committing things, and then was all 'oh. thats a tacit commit. from the reconnect. ugh' the reconnect flip on the autocommit is indeed the handle going back to the original settings.

Reply via email to