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 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
327 } | 327 } |
328 } | 328 } |
329 } | 329 } |
330 | 330 |
331 if {$tcl_platform(platform)!="windows"} { | 331 if {$tcl_platform(platform)!="windows"} { |
332 do_malloc_test 14 -tclprep { | 332 do_malloc_test 14 -tclprep { |
333 catch {db close} | 333 catch {db close} |
334 sqlite3 db2 test2.db | 334 sqlite3 db2 test2.db |
335 sqlite3_extended_result_codes db2 1 | 335 sqlite3_extended_result_codes db2 1 |
336 db2 eval { | 336 db2 eval { |
| 337 PRAGMA journal_mode = DELETE; /* For inmemory_journal permutation */ |
337 PRAGMA synchronous = 0; | 338 PRAGMA synchronous = 0; |
338 CREATE TABLE t1(a, b); | 339 CREATE TABLE t1(a, b); |
339 INSERT INTO t1 VALUES(1, 2); | 340 INSERT INTO t1 VALUES(1, 2); |
340 BEGIN; | 341 BEGIN; |
341 INSERT INTO t1 VALUES(3, 4); | 342 INSERT INTO t1 VALUES(3, 4); |
342 } | 343 } |
343 copy_file test2.db test.db | 344 copy_file test2.db test.db |
344 copy_file test2.db-journal test.db-journal | 345 copy_file test2.db-journal test.db-journal |
345 db2 close | 346 db2 close |
346 } -tclbody { | 347 } -tclbody { |
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
859 # succeed. If [db] has not released the lock, this should hit an | 860 # succeed. If [db] has not released the lock, this should hit an |
860 # SQLITE_BUSY error. | 861 # SQLITE_BUSY error. |
861 do_test malloc-36.$zRepeat.${::n}.unlocked { | 862 do_test malloc-36.$zRepeat.${::n}.unlocked { |
862 execsql {INSERT INTO t1 VALUES(3, 4)} db2 | 863 execsql {INSERT INTO t1 VALUES(3, 4)} db2 |
863 } {} | 864 } {} |
864 db2 close | 865 db2 close |
865 } | 866 } |
866 catch { db2 close } | 867 catch { db2 close } |
867 } | 868 } |
868 | 869 |
869 ifcapable stat2 { | 870 ifcapable stat2&&utf16 { |
870 do_malloc_test 38 -tclprep { | 871 do_malloc_test 38 -tclprep { |
871 add_test_collate db 0 0 1 | 872 add_test_collate db 0 0 1 |
872 execsql { | 873 execsql { |
873 ANALYZE; | 874 ANALYZE; |
874 CREATE TABLE t4(x COLLATE test_collate); | 875 CREATE TABLE t4(x COLLATE test_collate); |
875 CREATE INDEX t4x ON t4(x); | 876 CREATE INDEX t4x ON t4(x); |
876 INSERT INTO sqlite_stat2 VALUES('t4', 't4x', 0, 'aaa'); | 877 INSERT INTO sqlite_stat2 VALUES('t4', 't4x', 0, 'aaa'); |
877 INSERT INTO sqlite_stat2 VALUES('t4', 't4x', 1, 'aaa'); | 878 INSERT INTO sqlite_stat2 VALUES('t4', 't4x', 1, 'aaa'); |
878 INSERT INTO sqlite_stat2 VALUES('t4', 't4x', 2, 'aaa'); | 879 INSERT INTO sqlite_stat2 VALUES('t4', 't4x', 2, 'aaa'); |
879 INSERT INTO sqlite_stat2 VALUES('t4', 't4x', 3, 'aaa'); | 880 INSERT INTO sqlite_stat2 VALUES('t4', 't4x', 3, 'aaa'); |
(...skipping 14 matching lines...) Expand all Loading... |
894 } | 895 } |
895 | 896 |
896 # Ensure that no file descriptors were leaked. | 897 # Ensure that no file descriptors were leaked. |
897 do_test malloc-99.X { | 898 do_test malloc-99.X { |
898 catch {db close} | 899 catch {db close} |
899 set sqlite_open_file_count | 900 set sqlite_open_file_count |
900 } {0} | 901 } {0} |
901 | 902 |
902 puts open-file-count=$sqlite_open_file_count | 903 puts open-file-count=$sqlite_open_file_count |
903 finish_test | 904 finish_test |
OLD | NEW |