1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-12-07 20:22:20 +03:00

On unix, for certain error codes of read()/pread() return

SQLITE_IOERR_CORRUPTFS instead of SQLITE_IOERR_READ.  And then convert this
error into SQLITE_CORRUPT prior to returning back to the application.

FossilOrigin-Name: 9538ea8447e7b07c05197d6ff2208d3e97b45798736c85b63e8f0c7a3a98c1f3
This commit is contained in:
drh
2020-11-18 12:48:48 +00:00
parent aff1a57f4d
commit 5a07d10fd1
5 changed files with 46 additions and 18 deletions

View File

@@ -504,6 +504,7 @@ int sqlite3_exec(
#define SQLITE_IOERR_COMMIT_ATOMIC (SQLITE_IOERR | (30<<8))
#define SQLITE_IOERR_ROLLBACK_ATOMIC (SQLITE_IOERR | (31<<8))
#define SQLITE_IOERR_DATA (SQLITE_IOERR | (32<<8))
#define SQLITE_IOERR_CORRUPTFS (SQLITE_IOERR | (33<<8))
#define SQLITE_LOCKED_SHAREDCACHE (SQLITE_LOCKED | (1<<8))
#define SQLITE_LOCKED_VTAB (SQLITE_LOCKED | (2<<8))
#define SQLITE_BUSY_RECOVERY (SQLITE_BUSY | (1<<8))