Thanks for your reply.

Another related question, during rollback, would triggers be called?

For example, for a transaction, I may do a bunch of inserts, which in turn
called some triggers. During rollback, those inserts are reverted. Would
according delete triggers be called?

Thanks!

-Simon


Igor Tandetnik wrote:
> 
> "Simon Chen" <[email protected]>
> wrote in message news:[email protected]
>> I guess if the trigger contains database operations, they would be
>> rolled-back as well.
>> The question is, if the trigger externalizes some internal state, how
>> can a rollback revoke that?
> 
> It can't of course. At this point, it's your problem, not SQLite's.
> 
>> A stupid example would be, a trigger sends out an email saying "a
>> inserted", but this transaction actually fails. The email recipient
>> then is in a wrong state...
> 
> So, don't do that.
> 
> Igor Tandetnik
> 
> 
> 
> _______________________________________________
> sqlite-users mailing list
> [email protected]
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
> 
> 

-- 
View this message in context: 
http://www.nabble.com/trigger-with-transaction-tp22959986p22964648.html
Sent from the SQLite mailing list archive at Nabble.com.

_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to