mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
Fix problems with SAVEPOINT and related commands within transactions on a corrupt database that include fts5 or some other virtual tables.
FossilOrigin-Name: b0da6e0dd1f9a9ba7646ee6bb3c14945e570303c9a42d20fa8a653570e12c3f9
This commit is contained in:
@@ -1001,6 +1001,7 @@ int sqlite3VtabSavepoint(sqlite3 *db, int op, int iSavepoint){
|
||||
const sqlite3_module *pMod = pVTab->pMod->pModule;
|
||||
if( pVTab->pVtab && pMod->iVersion>=2 ){
|
||||
int (*xMethod)(sqlite3_vtab *, int);
|
||||
sqlite3VtabLock(pVTab);
|
||||
switch( op ){
|
||||
case SAVEPOINT_BEGIN:
|
||||
xMethod = pMod->xSavepoint;
|
||||
@@ -1016,6 +1017,7 @@ int sqlite3VtabSavepoint(sqlite3 *db, int op, int iSavepoint){
|
||||
if( xMethod && pVTab->iSavepoint>iSavepoint ){
|
||||
rc = xMethod(pVTab->pVtab, iSavepoint);
|
||||
}
|
||||
sqlite3VtabUnlock(pVTab);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user