SQLite Forum

[detect-corrupt-fs] Why to convert SQLITE_IOERR_CORRUPTFS into SQLITE_CORRUPT?
Login

[detect-corrupt-fs] Why to convert SQLITE_IOERR_CORRUPTFS into SQLITE_CORRUPT?

(1) By anonymous on 2020-11-18 23:30:50 [link] [source]

Checkins on branch detect-corrupt-fs add SQLITE_IOERR_CORRUPTFS error code, but it is converted into SQLITE_CORRUPT before returning to the app.
Why not just return the SQLITE_IOERR_CORRUPTFS? And why is it converted into a plain SQLITE_CORRUPT instead of some extended error code?

(2) By Richard Hipp (drh) on 2020-11-18 23:46:47 in reply to 1 [source]

Some of the intermediate processing (logic that occurs in between the read() return and the return to the application) expects an SQLITE_IOERR only from read(). This has previously come up with SQLITE_IOERR_NOMEM.