| 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 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 416 sqlite3_finalize $STMT | 416 sqlite3_finalize $STMT |
| 417 } {SQLITE_OK} | 417 } {SQLITE_OK} |
| 418 | 418 |
| 419 # At one point the following set of conditions would cause SQLite to | 419 # At one point the following set of conditions would cause SQLite to |
| 420 # retain a RESERVED or EXCLUSIVE lock after the transaction was committed: | 420 # retain a RESERVED or EXCLUSIVE lock after the transaction was committed: |
| 421 # | 421 # |
| 422 # * The journal-mode is set to something other than 'delete', and | 422 # * The journal-mode is set to something other than 'delete', and |
| 423 # * there exists one or more active read-only statements, and | 423 # * there exists one or more active read-only statements, and |
| 424 # * a transaction that modified zero database pages is committed. | 424 # * a transaction that modified zero database pages is committed. |
| 425 # | 425 # |
| 426 set temp_status unlocked | 426 #set temp_status unlocked |
| 427 if {$TEMP_STORE>=2} {set temp_status unknown} | 427 #if {$TEMP_STORE>=2} {set temp_status unknown} |
| 428 set temp_status unknown |
| 428 do_test lock-7.1 { | 429 do_test lock-7.1 { |
| 429 set STMT [sqlite3_prepare $DB "SELECT * FROM sqlite_master" -1 TAIL] | 430 set STMT [sqlite3_prepare $DB "SELECT * FROM sqlite_master" -1 TAIL] |
| 430 sqlite3_step $STMT | 431 sqlite3_step $STMT |
| 431 } {SQLITE_ROW} | 432 } {SQLITE_ROW} |
| 432 do_test lock-7.2 { | 433 do_test lock-7.2 { |
| 433 execsql { PRAGMA lock_status } | 434 execsql { PRAGMA lock_status } |
| 434 } [list main shared temp $temp_status] | 435 } [list main shared temp $temp_status] |
| 435 do_test lock-7.3 { | 436 do_test lock-7.3 { |
| 436 execsql { | 437 execsql { |
| 437 PRAGMA journal_mode = truncate; | 438 PRAGMA journal_mode = truncate; |
| 438 BEGIN; | 439 BEGIN; |
| 439 UPDATE t4 SET a = 10 WHERE 0; | 440 UPDATE t4 SET a = 10 WHERE 0; |
| 440 COMMIT; | 441 COMMIT; |
| 441 } | 442 } |
| 442 execsql { PRAGMA lock_status } | 443 execsql { PRAGMA lock_status } |
| 443 } [list main shared temp $temp_status] | 444 } [list main shared temp $temp_status] |
| 444 do_test lock-7.4 { | 445 do_test lock-7.4 { |
| 445 sqlite3_finalize $STMT | 446 sqlite3_finalize $STMT |
| 446 } {SQLITE_OK} | 447 } {SQLITE_OK} |
| 447 | 448 |
| 448 do_test lock-999.1 { | 449 do_test lock-999.1 { |
| 449 rename db2 {} | 450 rename db2 {} |
| 450 } {} | 451 } {} |
| 451 | 452 |
| 452 finish_test | 453 finish_test |
| OLD | NEW |