diff options
author | drh <drh@noemail.net> | 2012-09-27 12:11:25 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2012-09-27 12:11:25 +0000 |
commit | cec320fb0e09e1b7f0bb1ecefb67066aa2d14095 (patch) | |
tree | 9066972047542eae935ced24bd0f2f07b4c69a36 /src/pragma.c | |
parent | 4d85fa760f28582b4482e98878f7777f8d1fa873 (diff) | |
parent | 50610df8ae1a03d971d732685549443c6a6c26d3 (diff) | |
download | sqlite-cec320fb0e09e1b7f0bb1ecefb67066aa2d14095.tar.gz sqlite-cec320fb0e09e1b7f0bb1ecefb67066aa2d14095.zip |
Merge the "PRAGMA busy_timeout" change into trunk.
FossilOrigin-Name: 1a679a1ef3b4f2d898c8cd83432d2b4c12bd93fa
Diffstat (limited to 'src/pragma.c')
-rw-r--r-- | src/pragma.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/pragma.c b/src/pragma.c index bee62d871..f41f2db06 100644 --- a/src/pragma.c +++ b/src/pragma.c @@ -1537,6 +1537,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 no busy handler or a different busy handler is set + ** then 0 is returned. Setting the busy_timeout to 0 or negative + ** disables the timeout. + */ + 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 |