On 14.08.2007 16:54 Perrin Harkins wrote: >> $db->begin_work; # Start transaction >> die "Does it roll back?"; >> $db->commit; > > I don't see any rollback there. It's a common practice to put an
Well, my understandig was that if perl dies within a transaction it (or DBI) would do a rollback, from your answer I guess this is not the case. > automatic rollback in a cleanup handler when running mod_perl. do you have any pointer on how this is done (correctly)? >> Edit: It is even more mysterious: The saved records are only there as >> long as apache isn't restartet. I tried clearing the cache, calling the >> records in different ways, no matter they are there. After a restart >> they are not. It looks as if the rollback is not done at the "die" of >> the script but the 'kill' of the server ?!? > > That implies that they aren't committed either, and that you are > running with a "dirty read" isolation level that lets you see data > that hasn't been committed yet on other database connections. Either > that, or you are somehow using the same connection in multiple > processes, which would be very bad. How do I manipulate the "isolation level"? I thought the begin_work would set it as it should be. And to the second alternative, how do I have to setup RDBO with mod_perl to share a db (and dbh with it) for everything within one process/request but not across multiple processes? Many questions but this seems to be very essential stuff and I really want to learn how to get it right. So, if you have any pointers or even example code this would be more than welcome... Many Thanks - Michael ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Rose-db-object mailing list Rose-db-object@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rose-db-object