1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-01 06:27:03 +03:00

In SQLITE_ENABLE_BATCH_ATOMIC_WRITE builds on F2FS file-systems, invoke

SQLITE_FCNTL_ROLLBACK_ATOMIC_WRITE if an SQLITE_FCNTL_COMMIT_ATOMIC_WRITE call
fails. Also, do not use an atomic transaction to create the initial database.
This is because if an error occurs while writing to the db file, any changes
to the file-size do not seem to be rolled back automatically. The only time
this matters is when the file was 0 bytes in size to start with.

FossilOrigin-Name: b3122db1545aeb48b7c28d480534b4b0fe04e83d5336225714c3cad926e5960e
This commit is contained in:
dan
2018-01-23 14:01:51 +00:00
parent 8d7f163015
commit b8fff29c68
7 changed files with 99 additions and 79 deletions

View File

@ -27,6 +27,17 @@ if {!$MEMDEBUG} {
return
}
# Do not run these tests if F2FS batch writes are supported. In this case,
# it is possible for a single DML statement in an implicit transaction
# to fail with SQLITE_NOMEM, but for the transaction to still end up
# committed to disk. Which confuses the tests in this module.
#
if {[atomic_batch_write test.db]} {
puts "Skipping malloc3 tests: atomic-batch support"
finish_test
return
}
# Do not run these tests with an in-memory journal.
#