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

Rollback if a commit hook fails. (CVS 912)

FossilOrigin-Name: 5cea7554ae9d36434cd7261b5b40f3d467b836f1
This commit is contained in:
drh
2003-04-16 21:03:13 +00:00
parent 027850b676
commit 95b5084409
3 changed files with 8 additions and 10 deletions

View File

@@ -36,7 +36,7 @@
** in this file for details. If in doubt, do not deviate from existing
** commenting and indentation practices when changing or adding code.
**
** $Id: vdbe.c,v 1.216 2003/04/16 02:17:36 drh Exp $
** $Id: vdbe.c,v 1.217 2003/04/16 21:03:14 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@@ -3250,9 +3250,7 @@ case OP_Commit: {
rc = SQLITE_CONSTRAINT;
}
if( sqliteSafetyOn(db) ) goto abort_due_to_misuse;
if( rc ) break;
}
assert( rc==SQLITE_OK );
for(i=0; rc==SQLITE_OK && i<db->nDb; i++){
if( db->aDb[i].inTrans ){
rc = sqliteBtreeCommit(db->aDb[i].pBt);