Re: undefined behaviour for sub-transactions?



On 11/14/05 21:52, "Tyler MacDonald" <tyler@xxxxxx> wrote:

> I'm looking through the DBI documentation and I can't find anything about
> sub transactions (eg; if you do a "begin_work" ... "commit/rollback" when
> begin_work has already been called).
>
> This seems to work under DBD::Pg. Under DBD::mysql, I'm not sure if the
> begin_work is just being ignored, or if creating sub-transactions is the
> cause of my woes. (see http://rt.cpan.org/NoAuth/Bug.html?id=15803).

MySQL doesn't have sub-transactions (nested transactions). You can set
savepoints within a transaction and roll back to a given savepoint and then
continue the transaction from there.

>
> I think some pod on the "Transactions" heading of the DBI manpage would be
> useful, telling us what to expect (even if it is the unexpected) when we use
> sub-transactions under DBI. If this is an engine-specific thing, could DBI
> be made to be capable of figuring out whether a particular engine supports
> sub-transactions? Then any sub-begin-works could just be ignored, and, say,
> attempting to "commit" when a "rollback" has already been called could cause
> a fatal error. Or is there already some way to take care of this? There's
> very little about transactions in the DBI documentation.
>
> Thanks,
> Tyler
>


.



Relevant Pages

  • Re: Trapping errors
    ... but currently do not utilize transactions in our coding. ... then log the DBI error on the server for review. ... > DBI perldocs suggest ...
    (perl.dbi.users)
  • Re: Transaction Errors
    ... I didn't realize that the DBI version was so ... >>I keep getting this error when attempting to utilize a database that has Innodb ... >>Transactions not supported by database at module..... ... >>until the commit is called, of if an error occurs, the rollback is called. ...
    (perl.dbi.users)
  • undefined behaviour for sub-transactions?
    ... or if creating sub-transactions is the ... I think some pod on the "Transactions" heading of the DBI manpage would be ... be made to be capable of figuring out whether a particular engine supports ...
    (perl.dbi.users)
  • Re: Trapping errors
    ... > but currently do not utilize transactions in our coding. ... Hardy Merrill ... then log the DBI error on the server for review. ...
    (perl.dbi.users)