OLD | NEW |
1 # 2009 November 28 | 1 # 2009 November 28 |
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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 2 utf-8 | 53 2 utf-8 |
54 1 utf-16 | 54 1 utf-16 |
55 } { | 55 } { |
56 | 56 |
57 #if {$DO_MALLOC_TEST} break | 57 #if {$DO_MALLOC_TEST} break |
58 | 58 |
59 # Reset the database and database connection. If this iteration of the | 59 # Reset the database and database connection. If this iteration of the |
60 # [foreach] loop is testing with OOM errors, disable the lookaside buffer. | 60 # [foreach] loop is testing with OOM errors, disable the lookaside buffer. |
61 # | 61 # |
62 db close | 62 db close |
63 file delete -force test.db test.db-journal | 63 forcedelete test.db test.db-journal |
64 sqlite3 db test.db | 64 sqlite3 db test.db |
65 if {$DO_MALLOC_TEST} { sqlite3_db_config_lookaside db 0 0 0 } | 65 if {$DO_MALLOC_TEST} { sqlite3_db_config_lookaside db 0 0 0 } |
66 db eval "PRAGMA encoding = '$enc'" | 66 db eval "PRAGMA encoding = '$enc'" |
67 | 67 |
68 proc mit {blob} { | 68 proc mit {blob} { |
69 set scan(littleEndian) i* | 69 set scan(littleEndian) i* |
70 set scan(bigEndian) I* | 70 set scan(bigEndian) I* |
71 binary scan $blob $scan($::tcl_platform(byteOrder)) r | 71 binary scan $blob $scan($::tcl_platform(byteOrder)) r |
72 return $r | 72 return $r |
73 } | 73 } |
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
630 ddl_test 8.2.1 { CREATE VIRTUAL TABLE t9c USING fts3("c""1", 'c''2') } | 630 ddl_test 8.2.1 { CREATE VIRTUAL TABLE t9c USING fts3("c""1", 'c''2') } |
631 read_test 8.2.2 { PRAGMA table_info(t9c) } {0 c\"1 {} 0 {} 0 1 c'2 {} 0 {} 0} | 631 read_test 8.2.2 { PRAGMA table_info(t9c) } {0 c\"1 {} 0 {} 0 1 c'2 {} 0 {} 0} |
632 #------------------------------------------------------------------------- | 632 #------------------------------------------------------------------------- |
633 | 633 |
634 #------------------------------------------------------------------------- | 634 #------------------------------------------------------------------------- |
635 # Test that FTS3 tables can be renamed using the ALTER RENAME command. | 635 # Test that FTS3 tables can be renamed using the ALTER RENAME command. |
636 # OOM errors are tested during ALTER RENAME commands also. | 636 # OOM errors are tested during ALTER RENAME commands also. |
637 # | 637 # |
638 foreach DO_MALLOC_TEST {0 1 2} { | 638 foreach DO_MALLOC_TEST {0 1 2} { |
639 db close | 639 db close |
640 file delete -force test.db test.db-journal | 640 forcedelete test.db test.db-journal |
641 sqlite3 db test.db | 641 sqlite3 db test.db |
642 if {$DO_MALLOC_TEST} { sqlite3_db_config_lookaside db 0 0 0 } | 642 if {$DO_MALLOC_TEST} { sqlite3_db_config_lookaside db 0 0 0 } |
643 | 643 |
644 ddl_test 9.1.1 { CREATE VIRTUAL TABLE t10 USING fts3(x) } | 644 ddl_test 9.1.1 { CREATE VIRTUAL TABLE t10 USING fts3(x) } |
645 write_test 9.1.2 t10_content { INSERT INTO t10 VALUES('fts3 tables') } | 645 write_test 9.1.2 t10_content { INSERT INTO t10 VALUES('fts3 tables') } |
646 write_test 9.1.3 t10_content { INSERT INTO t10 VALUES('are renameable') } | 646 write_test 9.1.3 t10_content { INSERT INTO t10 VALUES('are renameable') } |
647 | 647 |
648 read_test 9.1.4 { | 648 read_test 9.1.4 { |
649 SELECT * FROM t10 WHERE t10 MATCH 'table*' | 649 SELECT * FROM t10 WHERE t10 MATCH 'table*' |
650 } {{fts3 tables}} | 650 } {{fts3 tables}} |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
697 set blob [binary format "a6 a* a*" $start $middle $end] | 697 set blob [binary format "a6 a* a*" $start $middle $end] |
698 write_test 10.2.4 ta_segdir { | 698 write_test 10.2.4 ta_segdir { |
699 UPDATE ta_segdir SET root = $blob WHERE rowid = 2 | 699 UPDATE ta_segdir SET root = $blob WHERE rowid = 2 |
700 } | 700 } |
701 error_test 10.2.5 { | 701 error_test 10.2.5 { |
702 SELECT * FROM ta WHERE ta MATCH 'beta' | 702 SELECT * FROM ta WHERE ta MATCH 'beta' |
703 } {database disk image is malformed} | 703 } {database disk image is malformed} |
704 | 704 |
705 | 705 |
706 finish_test | 706 finish_test |
OLD | NEW |