diff options
author | Tom Willemse | 2024-06-11 14:45:50 -0700 |
---|---|---|
committer | Tom Willemse | 2024-06-11 14:45:50 -0700 |
commit | b76f3afb27702c990275708c2ea0d432f35c6df1 (patch) | |
tree | 0e400efdb9b123bbdc37f4a4e3ff4741f8a52e7b /locales/zh_CN | |
parent | a959a69a1dd781caa33829db161859c88455911d (diff) | |
download | scuttle-b76f3afb27702c990275708c2ea0d432f35c6df1.tar.gz scuttle-b76f3afb27702c990275708c2ea0d432f35c6df1.zip |
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 'locales/zh_CN')
0 files changed, 0 insertions, 0 deletions