OLD | NEW |
1 # 2006 September 9 | 1 # 2006 September 9 |
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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 do_test fts3aa-3.1 { | 139 do_test fts3aa-3.1 { |
140 execsql {SELECT rowid FROM t1 WHERE content MATCH 'one'} | 140 execsql {SELECT rowid FROM t1 WHERE content MATCH 'one'} |
141 } {1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31} | 141 } {1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31} |
142 do_test fts3aa-3.2 { | 142 do_test fts3aa-3.2 { |
143 execsql {SELECT rowid FROM t1 WHERE content MATCH 'one -two'} | 143 execsql {SELECT rowid FROM t1 WHERE content MATCH 'one -two'} |
144 } {1 5 9 13 17 21 25 29} | 144 } {1 5 9 13 17 21 25 29} |
145 do_test fts3aa-3.3 { | 145 do_test fts3aa-3.3 { |
146 execsql {SELECT rowid FROM t1 WHERE content MATCH '-two one'} | 146 execsql {SELECT rowid FROM t1 WHERE content MATCH '-two one'} |
147 } {1 5 9 13 17 21 25 29} | 147 } {1 5 9 13 17 21 25 29} |
148 | 148 |
| 149 breakpoint |
149 do_test fts3aa-4.1 { | 150 do_test fts3aa-4.1 { |
150 execsql {SELECT rowid FROM t1 WHERE content MATCH 'one OR two'} | 151 execsql {SELECT rowid FROM t1 WHERE content MATCH 'one OR two'} |
151 } {1 2 3 5 6 7 9 10 11 13 14 15 17 18 19 21 22 23 25 26 27 29 30 31} | 152 } {1 2 3 5 6 7 9 10 11 13 14 15 17 18 19 21 22 23 25 26 27 29 30 31} |
152 do_test fts3aa-4.2 { | 153 do_test fts3aa-4.2 { |
153 execsql {SELECT rowid FROM t1 WHERE content MATCH '"one two" OR three'} | 154 execsql {SELECT rowid FROM t1 WHERE content MATCH '"one two" OR three'} |
154 } {3 4 5 6 7 11 12 13 14 15 19 20 21 22 23 27 28 29 30 31} | 155 } {3 4 5 6 7 11 12 13 14 15 19 20 21 22 23 27 28 29 30 31} |
155 do_test fts3aa-4.3 { | 156 do_test fts3aa-4.3 { |
156 execsql {SELECT rowid FROM t1 WHERE content MATCH 'three OR "one two"'} | 157 execsql {SELECT rowid FROM t1 WHERE content MATCH 'three OR "one two"'} |
157 } {3 4 5 6 7 11 12 13 14 15 19 20 21 22 23 27 28 29 30 31} | 158 } {3 4 5 6 7 11 12 13 14 15 19 20 21 22 23 27 28 29 30 31} |
158 do_test fts3aa-4.4 { | 159 do_test fts3aa-4.4 { |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 do_test fts3aa-6.2 { | 193 do_test fts3aa-6.2 { |
193 execsql {INSERT INTO t1(rowid, content) VALUES(-1, 'three four')} | 194 execsql {INSERT INTO t1(rowid, content) VALUES(-1, 'three four')} |
194 } {} | 195 } {} |
195 do_test fts3aa-6.3 { | 196 do_test fts3aa-6.3 { |
196 execsql {SELECT content FROM t1 WHERE rowid = -1} | 197 execsql {SELECT content FROM t1 WHERE rowid = -1} |
197 } {{three four}} | 198 } {{three four}} |
198 do_test fts3aa-6.4 { | 199 do_test fts3aa-6.4 { |
199 execsql {SELECT rowid FROM t1 WHERE t1 MATCH 'four'} | 200 execsql {SELECT rowid FROM t1 WHERE t1 MATCH 'four'} |
200 } {-1 0 8 9 10 11 12 13 14 15 24 25 26 27 28 29 30 31} | 201 } {-1 0 8 9 10 11 12 13 14 15 24 25 26 27 28 29 30 31} |
201 | 202 |
| 203 # Test creation of FTS3 and FTS4 tables with columns that contain |
| 204 # an "=" character. |
| 205 # |
| 206 do_execsql_test fts3aa-7.1 { |
| 207 CREATE VIRTUAL TABLE t2 USING fts3(xyz=abc); |
| 208 SELECT xyz FROM t2; |
| 209 } {} |
| 210 do_catchsql_test fts3aa-7.2 { |
| 211 CREATE VIRTUAL TABLE t3 USING fts4(xyz=abc); |
| 212 } {1 {unrecognized parameter: xyz=abc}} |
| 213 do_catchsql_test fts3aa-7.3 { |
| 214 CREATE VIRTUAL TABLE t3 USING fts4(xyz = abc); |
| 215 } {1 {unrecognized parameter: xyz = abc}} |
| 216 |
| 217 do_execsql_test fts3aa-7.4 { |
| 218 CREATE VIRTUAL TABLE t3 USING fts3(tokenize=simple, tokenize=simple); |
| 219 SELECT tokenize FROM t3; |
| 220 } {} |
| 221 do_catchsql_test fts3aa-7.5 { |
| 222 CREATE VIRTUAL TABLE t4 USING fts4(tokenize=simple, tokenize=simple); |
| 223 } {1 {unrecognized parameter: tokenize=simple}} |
| 224 |
| 225 |
202 finish_test | 226 finish_test |
| 227 |
OLD | NEW |