summaryrefslogtreecommitdiffstatshomepage
path: root/Screenshot1.jpg
diff options
context:
space:
mode:
authorGravatar Tom Willemse2024-06-11 14:45:50 -0700
committerGravatar Tom Willemse2024-06-11 14:45:50 -0700
commitb76f3afb27702c990275708c2ea0d432f35c6df1 (patch)
tree0e400efdb9b123bbdc37f4a4e3ff4741f8a52e7b /Screenshot1.jpg
parenta959a69a1dd781caa33829db161859c88455911d (diff)
downloadscuttle-oni.tar.gz
scuttle-oni.zip
Support reentrant calls to ‘sql_db->sql_transaction’ for SQLiteHEADoni
SQLite transactions don't appear to be reentrant. So calling ‘BEGIN’ and then again ‘BEGIN’ is an error if there is no ‘COMMIT’ or ‘ROLLBACK’ in between. In order to pretend like this works (it doesn't) I keep track of the level of the number of transactions that have been created and only call the actual ‘BEGIN’ on the first call and ‘COMMIT’ and ‘ROLLBACK’ on the final one. This does mean that if any part of the code forgets to do a commit or rollback for any reason it'll maintain the transaction indefinitely. I want to change it to explicitly fail if this is attempted, but MySQL/MariaDB doesn't seem to have any problem with calling ‘BEGIN’ and ‘COMMIT’/‘ROLLBACK’ as many times as one wants.
Diffstat (limited to 'Screenshot1.jpg')
0 files changed, 0 insertions, 0 deletions