Subject | Re: [Firebird-Architect] Autonomous Transaction Routines |
---|---|
Author | Vlad Khorsun |
Post date | 2007-11-10T10:22:01Z |
>> > If yes, do we have a field in mon$transactions to indicate their specialLets look :
>> > nature?
>>
>> ID of "parent" transaction ? I like it
>
> How do you tell which is the parent and which is the child? How do you tell
> the difference between a normal txn that spawned two autonomous txn and a
> normal txn that spawned an auto txn that in turn spawned another auto txn?
// here we work in user transaction context
...
BEGIN AUTONOMOUS
// here we work in 1st autonomous tx context
...
BEGIN AUTONOMOUS
// here we work in 2nd autonomous tx context
...
END
// here we work in 1st autonomous tx context
...
END
// here we work in user tx context again
...
BEGIN AUTONOMOUS
// here we work in 3rd autonomous tx context
...
END
// here we work in user tx context again
You see - all this transactions organized in kind of stack and at each stage
we worked at one transaction context which is clearly determined by syntax
> Can the code running inside an auto txn start a normal txn? I ask to be sureIt can't do it right now but will do it when external engines implementation would
> since we don't allow SET TRANSACTION in DML.
be committed. I can live if transactions started by external SP wouldn't have "parent"
transaction set.
Regards,
Vlad