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

Enhance the sqlite3VdbeRecordCompare() routines so that if they encounter

database corruption, they will set the UnpackedRecord.isCorrupt field and
return 0.  The sqlite3BtreeMovetoUnpacked() routine detects this and returns
SQLITE_CORRUPT, causing the corruption to be reported back to the top-level.

FossilOrigin-Name: 7fa85eaaaf6d211378620d728a759fdfe30a15b0
This commit is contained in:
drh
2014-03-28 03:12:48 +00:00
parent 27de5c5cb6
commit a1f7c0a21c
9 changed files with 43 additions and 33 deletions

View File

@@ -1627,6 +1627,7 @@ struct UnpackedRecord {
KeyInfo *pKeyInfo; /* Collation and sort-order information */
u16 nField; /* Number of entries in apMem[] */
i8 default_rc; /* Comparison result if keys are equal */
u8 isCorrupt; /* Corruption detected by xRecordCompare() */
Mem *aMem; /* Values */
int r1; /* Value to return if (lhs > rhs) */
int r2; /* Value to return if (rhs < lhs) */