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 #*************************************************************************
13 source [file join [file dirname [info script]] fts5_common.tcl]
14 ifcapable !fts5 { finish_test ; return }
15 set ::testprefix fts5secure8
17 proc sql_repeat {txt n} {
20 db func repeat sql_repeat
23 CREATE VIRTUAL TABLE ft USING fts5(x);
25 INSERT INTO ft(ft, rank) VALUES('pgsz', 64);
27 INSERT INTO ft(rowid, x) VALUES(100, 'hello world');
28 INSERT INTO ft(rowid, x) VALUES(200, 'one day');
31 INSERT INTO ft(rowid, x) VALUES(45, 'one two three');
32 UPDATE ft SET x = repeat('hello world ', 500) WHERE rowid=100;
37 INSERT INTO ft(ft, rank) VALUES('secure-delete', 1);
38 DELETE FROM ft WHERE rowid=100;
42 PRAGMA integrity_check;
46 CREATE VIRTUAL TABLE xyz USING fts5 (
51 INSERT INTO xyz(xyz, rank) VALUES('secure-delete', 1);
52 INSERT INTO xyz (rowid, name) VALUES(1, 'A');
53 INSERT INTO xyz (rowid, name) VALUES(2, 'A');
54 INSERT INTO xyz(xyz, rowid, name) VALUES('delete', 2, 'A');