List:General Discussion« Previous MessageNext Message »
From:Chris Nolan Date:January 16 2004 12:22pm
Subject:Re: Multi Level Transaction (InnoDB)
View as plain text  
Depending on your language, you might be able to "fudge" this up to work
for yourself. In C/C++ I have a function that automagically decides
whether I am beginning a new transaction when I am calling it or whether
I want Oracle-style nested transaction functionality. My rollback
function is aware of this also.

The only thing that you can't do with this approach that Oracle can do
with it's nested transaction functionality is (to my knowledge) alter
the isolation level at each SAVEPOINT. For reasons unknown to me, Oracle
allows this although I can not actually think of an application for it.

Regards,

Chris

On Fri, 2004-01-16 at 18:18, Dan Nelson wrote:
> In the last episode (Dec 31), Harta Teo said:
> > Just wondor how InnoDB handle Multi Level Transaction, For example,
> > 
> > BEGIN  
> > DELETE FORM table1 WHERE id = 123
> > BEGIN    <---- New Transaction Level 2
> > DELETE FROM table1 WHERE id = 234
> > COMMIT <--- Level2
> > ROLLBACK <---Level1
> 
> The manual ( http://www.mysql.com/doc/en/Implicit_commit.html ) says:
> 
>   The following commands implicitly end a transaction (as if you had
>   done a COMMIT before executing the command): ... BEGIN ...
> 
> If you want multiple rollback levels, take a look at the SAVEPOINT
> command:  http://www.mysql.com/doc/en/Savepoints.html
> 
> -- 
> 	Dan Nelson
> 	dnelson@stripped

Thread
Multi Level Transaction (InnoDB)Harta Teo16 Jan
  • Re: Multi Level Transaction (InnoDB)Dan Nelson16 Jan
    • Re: Multi Level Transaction (InnoDB)Chris Nolan16 Jan