MathJax

SyntaxHighlighter

Highlight

Custom CSS

Tuesday, May 25, 2010

Transaction behavior in Firefox 3.0 SQLite API

Small gotcha if you are writing a Firefox 3.0 extension: while SQLite lets you do nested transactions, multiple concurrent transactions, and checkpoints, the Firefox API doesn't fully support those. The beginTransaction, commitTransaction, and rollbackTransaction methods in mozIStorageConnection fully expect only one transaction to be active at a time (you'll get an exception if you try to nest transactions by beginning a transaction while another is active).

Update

For 3.5, it looks like this is still true; there is even a note that says the underlying engine does not support nested transactions (possibly an older version of SQLite is in use.. darn).
Post a Comment