diff options
author | drh <drh@noemail.net> | 2006-07-06 10:59:57 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2006-07-06 10:59:57 +0000 |
commit | 3086765b6fb34cd187888a3adf64803fdf6e8fb5 (patch) | |
tree | 7fe2602258f72c1ca7f7f8a1cad7b20ade8138ee /src/main.c | |
parent | 72c4d3e7ed208fa03b51c61d7a56d37a7289e310 (diff) | |
download | sqlite-3086765b6fb34cd187888a3adf64803fdf6e8fb5.tar.gz sqlite-3086765b6fb34cd187888a3adf64803fdf6e8fb5.zip |
Change sqlite3_busy_timeout so that it checks for an invalid database
pointer. (CVS 3320)
FossilOrigin-Name: 225a9597b21bde7666451fc2eb7695dc35c438bb
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c index 46ff19462..dc42a8270 100644 --- a/src/main.c +++ b/src/main.c @@ -14,7 +14,7 @@ ** other files are for internal use by SQLite and should not be ** accessed by users of the library. ** -** $Id: main.c,v 1.350 2006/06/27 20:06:45 drh Exp $ +** $Id: main.c,v 1.351 2006/07/06 10:59:58 drh Exp $ */ #include "sqliteInt.h" #include "os.h" @@ -366,6 +366,9 @@ void sqlite3_progress_handler( ** specified number of milliseconds before returning 0. */ int sqlite3_busy_timeout(sqlite3 *db, int ms){ + if( sqlite3SafetyCheck(db) ){ + return SQLITE_MISUSE; + } if( ms>0 ){ db->busyTimeout = ms; sqlite3_busy_handler(db, sqliteDefaultBusyCallback, (void*)db); |