1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-05 15:55:57 +03:00

Added an interrupt capability (CVS 153)

FossilOrigin-Name: f7ea08b931b9b40831bfe73cd7afea17f92112cf
This commit is contained in:
drh
2000-10-16 22:06:40 +00:00
parent b2b415b97f
commit 4c5043910b
16 changed files with 146 additions and 59 deletions

View File

@@ -26,7 +26,7 @@
** other files are for internal use by SQLite and should not be
** accessed by users of the library.
**
** $Id: main.c,v 1.19 2000/10/11 19:28:52 drh Exp $
** $Id: main.c,v 1.20 2000/10/16 22:06:42 drh Exp $
*/
#include "sqliteInt.h"
@@ -154,7 +154,7 @@ static int sqliteInit(sqlite *db, char **pzErrMsg){
/* Create a virtual machine to run the initialization program. Run
** the program. The delete the virtual machine.
*/
vdbe = sqliteVdbeCreate(db->pBe);
vdbe = sqliteVdbeCreate(db);
if( vdbe==0 ){
sqliteSetString(pzErrMsg, "out of memory",0);
return 1;
@@ -227,7 +227,7 @@ sqlite *sqlite_open(const char *zFilename, int mode, char **pzErrMsg){
if( rc!=SQLITE_OK && rc!=SQLITE_BUSY ){
sqlite_close(db);
return 0;
}else{
}else /* if( pzErrMsg ) */{
free(*pzErrMsg);
*pzErrMsg = 0;
}
@@ -311,9 +311,8 @@ int sqlite_exec(
sParse.db = db;
sParse.xCallback = xCallback;
sParse.pArg = pArg;
rc = sqliteRunParser(&sParse, zSql, pzErrMsg);
sqliteStrRealloc(pzErrMsg);
return rc;
sqliteRunParser(&sParse, zSql, pzErrMsg);
return sParse.rc;
}
/*
@@ -382,3 +381,10 @@ void sqlite_busy_timeout(sqlite *db, int ms){
sqlite_busy_handler(db, 0, 0);
}
}
/*
** Cause any pending operation to stop at its earliest opportunity.
*/
void sqlite_interrupt(sqlite *db){
db->flags |= SQLITE_Interrupt;
}