skip uneccesary sqlcipher_free calls
[sqlcipher.git] / ext / fts5 / test / fts5secure8.test
blob8ceb9630aa2e994a1c87b875d6962ffd66462aaa
1 # 2023 Nov 23
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} {
18   string repeat $txt $n
20 db func repeat sql_repeat
22 do_execsql_test 1.0 {
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');
30   BEGIN;
31     INSERT INTO ft(rowid, x) VALUES(45, 'one two three');
32     UPDATE ft SET x = repeat('hello world ', 500) WHERE rowid=100;
33   COMMIT
36 do_execsql_test 1.1 {
37   INSERT INTO ft(ft, rank) VALUES('secure-delete', 1);
38   DELETE FROM ft WHERE rowid=100;
41 do_execsql_test 1.2 {
42   PRAGMA integrity_check;
43 } {ok}
49 finish_test