| OLD | NEW |
| (Empty) |
| 1 # 2014 June 17 | |
| 2 # | |
| 3 # The author disclaims copyright to this source code. In place of | |
| 4 # a legal notice, here is a blessing: | |
| 5 # | |
| 6 # May you do good and not evil. | |
| 7 # May you find forgiveness for yourself and forgive others. | |
| 8 # May you share freely, never taking more than you give. | |
| 9 # | |
| 10 #************************************************************************* | |
| 11 # This file implements regression tests for SQLite library. The | |
| 12 # focus of this script is testing the FTS5 module. | |
| 13 # | |
| 14 # Specifically, it tests transactions and savepoints | |
| 15 # | |
| 16 | |
| 17 source [file join [file dirname [info script]] fts5_common.tcl] | |
| 18 set testprefix fts5ai | |
| 19 | |
| 20 # If SQLITE_ENABLE_FTS5 is defined, omit this file. | |
| 21 ifcapable !fts5 { | |
| 22 finish_test | |
| 23 return | |
| 24 } | |
| 25 | |
| 26 do_execsql_test 1.0 { | |
| 27 CREATE VIRTUAL TABLE t1 USING fts5(a); | |
| 28 } {} | |
| 29 | |
| 30 do_execsql_test 1.1 { | |
| 31 BEGIN; | |
| 32 INSERT INTO t1 VALUES('a b c'); | |
| 33 INSERT INTO t1 VALUES('d e f'); | |
| 34 SAVEPOINT one; | |
| 35 INSERT INTO t1 VALUES('g h i'); | |
| 36 SAVEPOINT two; | |
| 37 INSERT INTO t1 VALUES('j k l'); | |
| 38 ROLLBACK TO one; | |
| 39 INSERT INTO t1 VALUES('m n o'); | |
| 40 SAVEPOINT two; | |
| 41 INSERT INTO t1 VALUES('p q r'); | |
| 42 RELEASE one; | |
| 43 SAVEPOINT one; | |
| 44 INSERT INTO t1 VALUES('s t u'); | |
| 45 ROLLBACK TO one; | |
| 46 COMMIT; | |
| 47 } | |
| 48 | |
| 49 do_execsql_test 1.2 { | |
| 50 INSERT INTO t1(t1) VALUES('integrity-check'); | |
| 51 } | |
| 52 | |
| 53 | |
| 54 finish_test | |
| 55 | |
| OLD | NEW |