utelle / apsw-sqlite3mc

Another Python SQLite wrapper bundled with SQLite3 Multiple Ciphers
https://utelle.github.io/SQLite3MultipleCiphers
Other
0 stars 0 forks source link

Full tests fail #5

Closed rogerbinns closed 1 month ago

rogerbinns commented 1 month ago

The mctests run in isolation run fine. However when run at the end of the APSW test suite there is an Corrupt Error returned.

A write to the database succeeds, but then the read gets that error.

rogerbinns commented 1 month ago

This is a bug in sqlite3 multiple ciphers

utelle commented 1 month ago

The mctests run in isolation run fine. However when run at the end of the APSW test suite there is an Corrupt Error returned.

At the moment I don't know why this error occurs. Does the APSW test suite make use of non-default config settings? Does it add a different VFS or change the default VFS?

A write to the database succeeds, but then the read gets that error.

Smells like the read buffer is somehow corrupted. But why? In https://github.com/utelle/SQLite3MultipleCiphers/issues/156 you mention the use of SQLITE_CONFIG_MMAP_SIZE. Is this parameter also modified in the APSW test suite? AFAIK memory mapped files are not used, if encryption is enabled.

Hopefully I will be able to reproduce the error in my development environment.

rogerbinns commented 1 month ago

The APSW test suite exercises every API and object in SQLite, multiple times. That includes VFS functionality, changing settings etc. The change I made in this project is to have the APSW test do this very small test after having run all the APSW stuff.

I got the corrupt error, but not if I ran the mctests solo. Then I reduced things to the smallest cause which was the MMAP issue which does not have anything to do with the APSW test suite. I'll continue this over on that issue.