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

Fix problems related to savepoint rollback and fts3.

FossilOrigin-Name: ff69f823f23e6fb6e8b2857c4576d9c0732d9572
This commit is contained in:
dan
2011-04-27 12:08:04 +00:00
parent a311b80392
commit d9495cd0c6
7 changed files with 128 additions and 53 deletions

View File

@@ -2580,6 +2580,14 @@ case OP_Savepoint: {
}else{
nName = sqlite3Strlen30(zName);
/* This call is Ok even if this savepoint is actually a transaction
** savepoint (and therefore should not prompt xSavepoint()) callbacks.
** If this is a transaction savepoint being opened, it is guaranteed
** that the db->aVTrans[] array is empty. */
assert( db->autoCommit==0 || db->nVTrans==0 );
rc = sqlite3VtabSavepoint(db, SAVEPOINT_BEGIN, p->iStatement);
if( rc!=SQLITE_OK ) goto abort_due_to_error;
/* Create a new savepoint structure. */
pNew = sqlite3DbMallocRaw(db, sizeof(Savepoint)+nName+1);
if( pNew ){
@@ -2686,6 +2694,11 @@ case OP_Savepoint: {
}else{
db->nDeferredCons = pSavepoint->nDeferredCons;
}
if( !isTransaction ){
rc = sqlite3VtabSavepoint(db, p1, iSavepoint);
if( rc!=SQLITE_OK ) goto abort_due_to_error;
}
}
}