1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-02 17:26:44 +03:00

Fix another crash in the recover extension triggered by a corrupt database.

FossilOrigin-Name: d125377378916fb3147612a536fde15ee955176eea9ea6eaa4a2ee5f1e8e1cbe
This commit is contained in:
dan
2022-10-27 20:27:45 +00:00
parent 10f5525410
commit 676d1cda92
5 changed files with 139 additions and 13 deletions

View File

@ -490,7 +490,7 @@ static sqlite3_stmt *recoverPreparePrintf(
*/
static sqlite3_stmt *recoverReset(sqlite3_recover *p, sqlite3_stmt *pStmt){
int rc = sqlite3_reset(pStmt);
if( rc!=SQLITE_OK && p->errCode==SQLITE_OK ){
if( rc!=SQLITE_OK && rc!=SQLITE_CONSTRAINT && p->errCode==SQLITE_OK ){
recoverDbError(p, sqlite3_db_handle(pStmt));
}
return pStmt;