OLD | NEW |
1 # 2014 June 17 | 1 # 2014 June 17 |
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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 faultsim_restore_and_reopen | 65 faultsim_restore_and_reopen |
66 } -body { | 66 } -body { |
67 execsql { DELETE FROM t1 } | 67 execsql { DELETE FROM t1 } |
68 } -test { | 68 } -test { |
69 faultsim_test_result {0 {}} {1 {vtable constructor failed: t1}} | 69 faultsim_test_result {0 {}} {1 {vtable constructor failed: t1}} |
70 } | 70 } |
71 | 71 |
72 reset_db | 72 reset_db |
73 do_execsql_test 4.0 { | 73 do_execsql_test 4.0 { |
74 CREATE VIRTUAL TABLE t2 USING fts5(a, b); | 74 CREATE VIRTUAL TABLE t2 USING fts5(a, b); |
75 INSERT INTO t2 VALUES('m f a jj th q jr ar', 'hj n h h sg j i m'); | 75 INSERT INTO t2 VALUES('m f a jj th q gi ar', 'hj n h h sg j i m'); |
76 INSERT INTO t2 VALUES('nr s t g od j kf h', 'sb h aq rg op rb n nl'); | 76 INSERT INTO t2 VALUES('nr s t g od j kf h', 'sb h aq rg op rb n nl'); |
77 INSERT INTO t2 VALUES('do h h pb p p q fr', 'c rj qs or cr a l i'); | 77 INSERT INTO t2 VALUES('do h h pb p p q fr', 'c rj qs or cr a l i'); |
78 INSERT INTO t2 VALUES('lk gp t i lq mq qm p', 'h mr g f op ld aj h'); | 78 INSERT INTO t2 VALUES('lk gp t i lq mq qm p', 'h mr g f op ld aj h'); |
79 INSERT INTO t2 VALUES('ct d sq kc qi k f j', 'sn gh c of g s qt q'); | 79 INSERT INTO t2 VALUES('ct d sq kc qi k f j', 'sn gh c of g s qt q'); |
80 INSERT INTO t2 VALUES('d ea d d om mp s ab', 'dm hg l df cm ft pa c'); | 80 INSERT INTO t2 VALUES('d ea d d om mp s ab', 'dm hg l df cm ft pa c'); |
81 INSERT INTO t2 VALUES('tc dk c jn n t sr ge', 'a a kn bc n i af h'); | 81 INSERT INTO t2 VALUES('tc dk c jn n t sr ge', 'a a kn bc n i af h'); |
82 INSERT INTO t2 VALUES('ie ii d i b sa qo rf', 'a h m aq i b m fn'); | 82 INSERT INTO t2 VALUES('ie ii d i b sa qo rf', 'a h m aq i b m fn'); |
83 INSERT INTO t2 VALUES('gs r fo a er m h li', 'tm c p gl eb ml q r'); | 83 INSERT INTO t2 VALUES('gs r fo a er m h li', 'tm c p gl eb ml q r'); |
84 INSERT INTO t2 VALUES('k fe fd rd a gi ho kk', 'ng m c r d ml rm r'); | 84 INSERT INTO t2 VALUES('k fe fd rd a gi ho kk', 'ng m c r d ml rm r'); |
85 } | 85 } |
86 faultsim_save_and_close | 86 faultsim_save_and_close |
87 | 87 |
88 foreach {tn expr res} { | 88 foreach {tn expr res} { |
89 1 { dk } 7 | 89 1 { dk } 7 |
90 2 { m f } 1 | 90 2 { m f } 1 |
91 3 { f* } {1 3 4 5 6 8 9 10} | 91 3 { f* } {1 3 4 5 6 8 9 10} |
92 4 { m OR f } {1 4 5 8 9 10} | 92 4 { m OR f } {1 4 5 8 9 10} |
93 5 { sn + gh } {5} | 93 5 { sn + gh } {5} |
94 6 { "sn gh" } {5} | 94 6 { "sn gh" } {5} |
95 7 { NEAR(r a, 5) } {9} | 95 7 { NEAR(r a, 5) } {9} |
96 8 { m* f* } {1 4 6 8 9 10} | 96 8 { m* f* } {1 4 6 8 9 10} |
97 9 { m* + f* } {1 8} | 97 9 { m* + f* } {1 8} |
| 98 10 { c NOT p } {5 6 7 10} |
98 } { | 99 } { |
99 do_faultsim_test 4.$tn -prep { | 100 do_faultsim_test 4.$tn -prep { |
100 faultsim_restore_and_reopen | 101 faultsim_restore_and_reopen |
101 } -body " | 102 } -body " |
102 execsql { SELECT rowid FROM t2 WHERE t2 MATCH '$expr' } | 103 execsql { SELECT rowid FROM t2 WHERE t2 MATCH '$expr' } |
103 " -test " | 104 " -test " |
104 faultsim_test_result {[list 0 $res]} {1 {vtable constructor failed: t2}} | 105 faultsim_test_result {[list 0 $res]} {1 {vtable constructor failed: t2}} |
105 " | 106 " |
106 } | 107 } |
107 | 108 |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 if {$testrc==0} { | 345 if {$testrc==0} { |
345 set ls [fts5_level_segs s2] | 346 set ls [fts5_level_segs s2] |
346 if {$ls != "2 0"} { error "fts5_level_segs says {$ls}" } | 347 if {$ls != "2 0"} { error "fts5_level_segs says {$ls}" } |
347 } | 348 } |
348 } | 349 } |
349 | 350 |
350 | 351 |
351 | 352 |
352 finish_test | 353 finish_test |
353 | 354 |
OLD | NEW |