-C Avoid\srepeating\scalls\sto\sthe\ssqlite3_trace()\scallback\swhen\sthe\ssame\sstatement\nis\sevaluted\smultiple\stimes\sby\ssqlite3_step()\sdue\sto\san\sSQLITE_SCHEMA\nreprepare.
-D 2012-09-04T21:34:26.807
+C Add\san\sexperimental\sbusy_timeout\spragma\sto\sfacilitate\saccess\sto\sthe\nsqlite3_busy_timeout()\sinterfaces\sfor\sprogrammers\sthat\sare\sworking\sfrom\nbehind\sa\slanguage\swrapper\sthat\sdoes\snot\sexpose\sthat\sinterface.
+D 2012-09-07T16:46:59.378
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
F Makefile.in abd5c10d21d1395f140d9e50ea999df8fa4d6376
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
F src/legacy.c a199d7683d60cef73089e892409113e69c23a99f
F src/lempar.c 0ee69fca0be54cd93939df98d2aca4ca46f44416
F src/loadext.c f20382fbaeec832438a1ba7797bee3d3c8a6d51d
-F src/main.c 02255cf1da50956c5427c469abddb15bccc4ba09
+F src/main.c 31af732aa4363e85816b09794429c79fe4baa3ac
F src/malloc.c fe085aa851b666b7c375c1ff957643dc20a04bf6
F src/mem0.c 6a55ebe57c46ca1a7d98da93aaa07f99f1059645
F src/mem1.c 437c7c4af964895d4650f29881df63535caaa1fa
F src/pcache.c f8043b433a57aba85384a531e3937a804432a346
F src/pcache.h 1b5dcc3dc8103d03e625b177023ee67764fa6b7c
F src/pcache1.c 9fd22671c270b35131ef480bbc00392b8b5f8ab9
-F src/pragma.c 97f9357f0e7e5fb46a2519f14539550aa07db49f
+F src/pragma.c e09950b9d0a35c1bf2329038c10f38589e754ae8
F src/prepare.c 33291b83cca285718048d219c67b8298501fa3a5
F src/printf.c 4a9f882f1c1787a8b494a2987765acf9d97ac21f
F src/random.c cd4a67b3953b88019f8cd4ccd81394a8ddfaba50
F test/limit.test 2db7b3b34fb925b8e847d583d2eb67531d0ce67e
F test/loadext.test 2b5e249c51c986a5aff1f0950cf7ba30976c8f22
F test/loadext2.test 0bcaeb4d81cd5b6e883fdfea3c1bdbe1f173cbca
-F test/lock.test db74fdf5a73bad29ab3d862ea78bf1068972cc1d
+F test/lock.test 7e9eddd991b3af3a01caec2d9f030e0798deef74
F test/lock2.test 5242d8ac4e2d59c403aebff606af449b455aceff
F test/lock3.test f271375930711ae044080f4fe6d6eda930870d00
F test/lock4.test e175ae13865bc87680607563bafba21f31a26f12
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
F tool/warnings.sh fbc018d67fd7395f440c28f33ef0f94420226381
F tool/win/sqlite.vsix 67d8a99aceb56384a81b3f30d6c71743146d2cc9
-P c0d89d4a9752922f9e367362366efde4f1b06f2a
-R f99616c13334ce584a8b1ebfcd476fa4
+P 39f763bfc04174ee0fe2cdf6a92b7c12f726bd1b
+R 7a209eaa28bbe6aeaf699b5d2296eb6d
+T *branch * busy-timeout-pragma
+T *sym-busy-timeout-pragma *
+T -sym-trunk *
U drh
-Z 2084e672100937502093a8dd98a48d0f
+Z 3457f6820fedfafcfc1fb25157630cb3
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
execsql {UPDATE t1 SET a = 0 WHERE 0}
catchsql {BEGIN EXCLUSIVE;} db2
} {1 {database is locked}}
+do_test lock-2.8b {
+ db2 eval {PRAGMA busy_timeout}
+} {400}
do_test lock-2.9 {
db2 timeout 0
execsql COMMIT
} {}
+do_test lock-2.9b {
+ db2 eval {PRAGMA busy_timeout}
+} {0}
integrity_check lock-2.10
+do_test lock-2.11 {
+ db2 eval {PRAGMA busy_timeout(400)}
+ execsql BEGIN
+ execsql {UPDATE t1 SET a = 0 WHERE 0}
+ catchsql {BEGIN EXCLUSIVE;} db2
+} {1 {database is locked}}
+do_test lock-2.11b {
+ db2 eval {PRAGMA busy_timeout}
+} {400}
+do_test lock-2.12 {
+ db2 eval {PRAGMA busy_timeout(0)}
+ execsql COMMIT
+} {}
+do_test lock-2.11b {
+ db2 eval {PRAGMA busy_timeout}
+} {0}
+integrity_check lock-2.12
# Try to start two transactions in a row
#