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

Correctly unwind the savepoint stack if the database goes read-only in

the middle of a savepoint.

FossilOrigin-Name: a96d02b4ab8c70cc20b322e4fa3a4b8814f05c51f5d8b071ec9d69e7379f3ea5
This commit is contained in:
drh
2019-12-18 02:12:04 +00:00
parent 50efa58600
commit 94649b6159
3 changed files with 12 additions and 8 deletions

View File

@@ -3264,8 +3264,12 @@ case OP_Savepoint: {
p->rc = rc = SQLITE_BUSY;
goto vdbe_return;
}
db->isTransactionSavepoint = 0;
rc = p->rc;
if( rc ){
db->autoCommit = 0;
}else{
db->isTransactionSavepoint = 0;
}
}else{
int isSchemaChange;
iSavepoint = db->nSavepoint - iSavepoint - 1;