OLD | NEW |
1 # 2007 August 20 | 1 # 2007 August 20 |
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 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 } {{still testing}} | 201 } {{still testing}} |
202 | 202 |
203 # If an insert tries to set both docid and rowid, require an error. | 203 # If an insert tries to set both docid and rowid, require an error. |
204 do_test fts3b-4.8 { | 204 do_test fts3b-4.8 { |
205 catchsql { | 205 catchsql { |
206 INSERT INTO t4 (rowid, docid, c) VALUES (14, 15, 'bad test'); | 206 INSERT INTO t4 (rowid, docid, c) VALUES (14, 15, 'bad test'); |
207 SELECT * FROM t4 WHERE docid = 14; | 207 SELECT * FROM t4 WHERE docid = 14; |
208 } | 208 } |
209 } {1 {SQL logic error or missing database}} | 209 } {1 {SQL logic error or missing database}} |
210 | 210 |
211 # Don't allow update of docid, to match rowid behaviour. | |
212 do_test fts3b-4.9 { | 211 do_test fts3b-4.9 { |
213 catchsql { | 212 execsql { SELECT docid FROM t4 WHERE t4 MATCH 'testing' } |
| 213 } {12} |
| 214 do_test fts3b-4.10 { |
| 215 execsql { |
214 UPDATE t4 SET docid = 14 WHERE docid = 12; | 216 UPDATE t4 SET docid = 14 WHERE docid = 12; |
| 217 SELECT docid FROM t4 WHERE t4 MATCH 'testing'; |
215 } | 218 } |
216 } {1 {SQL logic error or missing database}} | 219 } {14} |
| 220 do_test fts3b-4.11 { |
| 221 execsql { SELECT * FROM t4 WHERE rowid = 14; } |
| 222 } {{still testing}} |
| 223 do_test fts3b-4.12 { |
| 224 execsql { SELECT * FROM t4 WHERE rowid = 12; } |
| 225 } {} |
| 226 do_test fts3b-4.13 { |
| 227 execsql { SELECT docid FROM t4 WHERE t4 MATCH 'still'; } |
| 228 } {14} |
217 | 229 |
218 finish_test | 230 finish_test |
OLD | NEW |