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

Change sqlite3_busy_timeout so that it checks for an invalid database

pointer. (CVS 3320)

FossilOrigin-Name: 225a9597b21bde7666451fc2eb7695dc35c438bb
This commit is contained in:
drh
2006-07-06 10:59:57 +00:00
parent 72c4d3e7ed
commit 3086765b6f
5 changed files with 52 additions and 12 deletions

View File

@@ -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);