mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
Perpare for the 2.8.12 release. (CVS 1212)
FossilOrigin-Name: 93ccd1b1d63b5b914b84b0463f2267bcfaadafa3
This commit is contained in:
23
src/vdbe.c
23
src/vdbe.c
@@ -43,7 +43,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.256 2004/02/08 06:17:20 drh Exp $
|
||||
** $Id: vdbe.c,v 1.257 2004/02/08 18:07:35 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include "os.h"
|
||||
@@ -59,6 +59,15 @@
|
||||
*/
|
||||
int sqlite_search_count = 0;
|
||||
|
||||
/*
|
||||
** When this global variable is positive, it gets decremented once before
|
||||
** each instruction in the VDBE. When reaches zero, the SQLITE_Interrupt
|
||||
** of the db.flags field is set in order to simulate and interrupt.
|
||||
**
|
||||
** This facility is used for testing purposes only. It does not function
|
||||
** in an ordinary build.
|
||||
*/
|
||||
int sqlite_interrupt_count = 0;
|
||||
|
||||
/*
|
||||
** Advance the virtual machine to the next output row.
|
||||
@@ -517,6 +526,18 @@ int sqliteVdbeExec(
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Check to see if we need to simulate an interrupt. This only happens
|
||||
** if we have a special test build.
|
||||
*/
|
||||
#ifdef SQLITE_TEST
|
||||
if( sqlite_interrupt_count>0 ){
|
||||
sqlite_interrupt_count--;
|
||||
if( sqlite_interrupt_count==0 ){
|
||||
sqlite_interrupt(db);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef SQLITE_OMIT_PROGRESS_CALLBACK
|
||||
/* Call the progress callback if it is configured and the required number
|
||||
** of VDBE ops have been executed (either since this invocation of
|
||||
|
Reference in New Issue
Block a user