mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-14 00:22:38 +03:00
Add an experimental busy_timeout pragma to facilitate access to the
sqlite3_busy_timeout() interfaces for programmers that are working from behind a language wrapper that does not expose that interface. FossilOrigin-Name: 22ebc668516bc3dd5782d6d3d42dc7fd2eed7d79
This commit is contained in:
16
src/pragma.c
16
src/pragma.c
@@ -1536,6 +1536,22 @@ void sqlite3Pragma(
|
||||
sqlite3_db_release_memory(db);
|
||||
}else
|
||||
|
||||
/*
|
||||
** PRAGMA busy_timeout
|
||||
** PRAGMA busy_timeout = N
|
||||
**
|
||||
** Call sqlite3_busy_timeout(db, N). Return the current timeout value
|
||||
** if one is set. If the busy handler is not set to the default
|
||||
** busy callback, then the return value is undefined. A value of N
|
||||
** which is 0 or negative disables the busy handler.
|
||||
*/
|
||||
if( sqlite3StrICmp(zLeft, "busy_timeout")==0 ){
|
||||
if( zRight ){
|
||||
sqlite3_busy_timeout(db, sqlite3Atoi(zRight));
|
||||
}
|
||||
returnSingleInt(pParse, "timeout", db->busyTimeout);
|
||||
}else
|
||||
|
||||
#if defined(SQLITE_DEBUG) || defined(SQLITE_TEST)
|
||||
/*
|
||||
** Report the current state of file logs for all databases
|
||||
|
||||
Reference in New Issue
Block a user