1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00

In the sqlite3BtreeIndexMoveto() last-page optimization, make sure to return

SQLITE_CORRUPT if corruption is detected.

FossilOrigin-Name: 4ef19ba9b5cbda435c0bb9f2faddf8f7fac5d51399ff69bd049571c2ca3d9357
This commit is contained in:
drh
2022-03-10 22:54:32 +00:00
parent fde3043200
commit 463edb6275
3 changed files with 8 additions and 7 deletions

View File

@@ -5832,6 +5832,7 @@ int sqlite3BtreeIndexMoveto(
&& (c = indexCellCompare(pCur, pCur->ix, pIdxKey, xRecordCompare))<=0
){
*pRes = c;
if( pIdxKey->errCode ) return SQLITE_CORRUPT_BKPT;
return SQLITE_OK; /* Cursor already pointing at the correct spot */
}
if( pCur->iPage>0