OLD | NEW |
1 # 2007 June 20 | 1 # 2007 June 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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 } {} | 159 } {} |
160 | 160 |
161 do_test fts3ao-3.2 { | 161 do_test fts3ao-3.2 { |
162 execsql { SELECT a, b, c FROM t2 WHERE a MATCH 'song'; } | 162 execsql { SELECT a, b, c FROM t2 WHERE a MATCH 'song'; } |
163 } {{neung song sahm} {neung see} {neung see song}} | 163 } {{neung song sahm} {neung see} {neung see song}} |
164 | 164 |
165 do_test fts3ao-3.3 { | 165 do_test fts3ao-3.3 { |
166 execsql { SELECT a, b, c FROM t1 WHERE c MATCH 'two'; } | 166 execsql { SELECT a, b, c FROM t1 WHERE c MATCH 'two'; } |
167 } {{one three four} {one four} {one two}} | 167 } {{one three four} {one four} {one two}} |
168 | 168 |
| 169 #--------------------------------------------------------------------- |
| 170 # Test that it is possible to rename an fts3 table within a |
| 171 # transaction. |
| 172 # |
| 173 do_test fts3ao-4.1 { |
| 174 execsql { |
| 175 CREATE VIRTUAL TABLE t4 USING fts3; |
| 176 INSERT INTO t4 VALUES('the quick brown fox'); |
| 177 } |
| 178 } {} |
| 179 do_test fts3ao-4.2 { |
| 180 execsql { |
| 181 BEGIN; |
| 182 INSERT INTO t4 VALUES('jumped over the'); |
| 183 } |
| 184 } {} |
| 185 do_test fts3ao-4.3 { execsql { ALTER TABLE t4 RENAME TO t5; } } {} |
| 186 do_test fts3ao-4.4 { execsql { INSERT INTO t5 VALUES('lazy dog'); } } {} |
| 187 do_test fts3ao-4.5 { execsql COMMIT } {} |
| 188 do_test fts3ao-4.6 { |
| 189 execsql { SELECT * FROM t5 } |
| 190 } {{the quick brown fox} {jumped over the} {lazy dog}} |
| 191 do_test fts3ao-4.7 { |
| 192 execsql { |
| 193 BEGIN; |
| 194 INSERT INTO t5 VALUES('Down came a jumbuck to drink at that billabong'); |
| 195 ALTER TABLE t5 RENAME TO t6; |
| 196 INSERT INTO t6 VALUES('Down came the troopers, one, two, three'); |
| 197 ROLLBACK; |
| 198 SELECT * FROM t5; |
| 199 } |
| 200 } {{the quick brown fox} {jumped over the} {lazy dog}} |
| 201 |
169 finish_test | 202 finish_test |
| 203 |
OLD | NEW |