3 # The author disclaims copyright to this source code. In place of
4 # a legal notice, here is a blessing:
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.
10 #***********************************************************************
14 source [file join [file dirname [info script]] fts5_common.tcl]
15 set testprefix fts5rebuild
17 # If SQLITE_ENABLE_FTS5 is defined, omit this file.
24 CREATE VIRTUAL TABLE f1 USING fts5(a, b);
25 INSERT INTO f1(a, b) VALUES('one', 'o n e');
26 INSERT INTO f1(a, b) VALUES('two', 't w o');
27 INSERT INTO f1(a, b) VALUES('three', 't h r e e');
31 INSERT INTO f1(f1) VALUES('integrity-check');
35 INSERT INTO f1(f1) VALUES('rebuild');
39 INSERT INTO f1(f1) VALUES('integrity-check');
42 sqlite3_db_config db DEFENSIVE 0
47 do_catchsql_test 1.6 {
48 INSERT INTO f1(f1) VALUES('integrity-check');
49 } {1 {database disk image is malformed}}
52 INSERT INTO f1(f1) VALUES('rebuild');
53 INSERT INTO f1(f1) VALUES('integrity-check');
57 #-------------------------------------------------------------------------
58 # Check that 'rebuild' may not be used with a contentless table.
61 CREATE VIRTUAL TABLE nc USING fts5(doc, content=);
64 do_catchsql_test 2.2 {
65 INSERT INTO nc(nc) VALUES('rebuild');
66 } {1 {'rebuild' may not be used with a contentless fts5 table}}