1
0
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:
dan
2019-02-04 16:25:40 +00:00
parent 3f83f59154
commit 83a635a267
6 changed files with 241 additions and 12 deletions

View File

@@ -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);
}
}
}