1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-14 00:22:38 +03:00

Fix for #2415. The progress handler should abandon only the current query, not all active queries. (CVS 4067)

FossilOrigin-Name: 115e19fe22b9e79fcc400f3a59c80dd9828100e7
This commit is contained in:
danielk1977
2007-06-15 14:53:53 +00:00
parent 9142a83dd4
commit de523acceb
5 changed files with 52 additions and 17 deletions

View File

@@ -1380,7 +1380,19 @@ int sqlite3VdbeHalt(Vdbe *p){
for(i=0; i<p->nOp; i++){
switch( p->aOp[i].opcode ){
case OP_Transaction:
isReadOnly = 0;
/* This is a bit strange. If we hit a malloc() or IO error and
** the statement did not open a statement transaction, we will
** rollback any active transaction and abort all other active
** statements. Or, if this is an SQLITE_INTERRUPT error, we
** will only rollback if the interrupted statement was a write.
**
** It could be argued that read-only statements should never
** rollback anything. But careful analysis is required before
** making this change
*/
if( p->aOp[i].p2 || mrc!=SQLITE_INTERRUPT ){
isReadOnly = 0;
}
break;
case OP_Statement:
isStatement = 1;