OLD | NEW |
1 # 2001 September 15 | 1 # 2001 September 15 |
2 # | 2 # |
3 # The author disclaims copyright to this source code. In place of | 3 # The author disclaims copyright to this source code. In place of |
4 # a legal notice, here is a blessing: | 4 # a legal notice, here is a blessing: |
5 # | 5 # |
6 # May you do good and not evil. | 6 # May you do good and not evil. |
7 # May you find forgiveness for yourself and forgive others. | 7 # May you find forgiveness for yourself and forgive others. |
8 # May you share freely, never taking more than you give. | 8 # May you share freely, never taking more than you give. |
9 # | 9 # |
10 #*********************************************************************** | 10 #*********************************************************************** |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 set ::callback_value {} | 234 set ::callback_value {} |
235 db2 busy callback | 235 db2 busy callback |
236 set r [catch {execsql {SELECT * FROM t1} db2} msg] | 236 set r [catch {execsql {SELECT * FROM t1} db2} msg] |
237 lappend r $msg | 237 lappend r $msg |
238 lappend r $::callback_value | 238 lappend r $::callback_value |
239 } {0 {2 1} {}} | 239 } {0 {2 1} {}} |
240 execsql {ROLLBACK} | 240 execsql {ROLLBACK} |
241 | 241 |
242 # Test the built-in busy timeout handler | 242 # Test the built-in busy timeout handler |
243 # | 243 # |
| 244 # EVIDENCE-OF: R-23579-05241 PRAGMA busy_timeout; PRAGMA busy_timeout = |
| 245 # milliseconds; Query or change the setting of the busy timeout. |
| 246 # |
244 do_test lock-2.8 { | 247 do_test lock-2.8 { |
245 db2 timeout 400 | 248 db2 timeout 400 |
246 execsql BEGIN | 249 execsql BEGIN |
247 execsql {UPDATE t1 SET a = 0 WHERE 0} | 250 execsql {UPDATE t1 SET a = 0 WHERE 0} |
248 catchsql {BEGIN EXCLUSIVE;} db2 | 251 catchsql {BEGIN EXCLUSIVE;} db2 |
249 } {1 {database is locked}} | 252 } {1 {database is locked}} |
250 do_test lock-2.8b { | 253 do_test lock-2.8b { |
251 db2 eval {PRAGMA busy_timeout} | 254 db2 eval {PRAGMA busy_timeout} |
252 } {400} | 255 } {400} |
253 do_test lock-2.9 { | 256 do_test lock-2.9 { |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
440 } [list main shared temp $temp_status] | 443 } [list main shared temp $temp_status] |
441 do_test lock-7.4 { | 444 do_test lock-7.4 { |
442 sqlite3_finalize $STMT | 445 sqlite3_finalize $STMT |
443 } {SQLITE_OK} | 446 } {SQLITE_OK} |
444 | 447 |
445 do_test lock-999.1 { | 448 do_test lock-999.1 { |
446 rename db2 {} | 449 rename db2 {} |
447 } {} | 450 } {} |
448 | 451 |
449 finish_test | 452 finish_test |
OLD | NEW |