Subject | Re: [firebird-support] Triggers/Stored procs and Locks |
---|---|
Author | Martijn Tonies |
Post date | 2006-06-22T06:09:06Z |
Hello Johannes,
performing
the table DML operation, the trigger get's "triggered".
See above. Everything is inside your transaction.
Row.
Selects don't lock normally. This is where "multi versioning" comes into
play.
at all ?
Martijn Tonies
Database Workbench - development tool for Firebird and more!
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com
> I have 2 topics with questionscommited ? Or can I assume that it
> ---------------------------
> A) Does triggers on the database only get triggers when the transaction is
> gets run inside of the transaction also.Triggers run in the transaction as well, at the exact moment you're
performing
the table DML operation, the trigger get's "triggered".
> If this is the case and if I call stored procedures inside those triggersmy program code. Does these stored procedures
> to perform certain function that will define the next step in logic in
> that is called via the databases before of after insert or update alsoexist inside my transaction ?
See above. Everything is inside your transaction.
> B) Locking of records. As previously explained with transaction and datastored on pages and then commited to database if all is fine etc.
> i) When a record is locked thanks to my transaction. Is it a rowlevel (record) or page level (all active ones on the cache page) lock ?
Row.
> ii) What will lock the record ? only updates , inserts and deletes ordoes normal selects also lock records ?
Selects don't lock normally. This is where "multi versioning" comes into
play.
> iii) If I only start a transaction and then commit it immediatelyafterwards with absolutely nothing between it. Does a database lock appear
at all ?
>no.
Martijn Tonies
Database Workbench - development tool for Firebird and more!
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com