Debian Codegraph @

ext/fts5/test/fts5optimize3.test

raw
1 # 2023 Aug 27
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 #
12 # TESTRUNNER: superslow
13 #
14
15 source [file join [file dirname [info script]] fts5_common.tcl]
16 set testprefix fts5optimize2
17
18 # If SQLITE_ENABLE_FTS5 is not defined, omit this file.
19 ifcapable !fts5 {
20 finish_test
21 return
22 }
23
24 set nLoop 2500
25
26 do_execsql_test 1.0 {
27 CREATE VIRTUAL TABLE t2 USING fts5(x);
28 INSERT INTO t2(t2, rank) VALUES('pgsz', 32);
29 }
30
31 do_test 1.1 {
32 for {set ii 0} {$ii < $nLoop} {incr ii} {
33 execsql {
34 INSERT INTO t2 VALUES('abc def ghi');
35 INSERT INTO t2 VALUES('jkl mno pqr');
36 INSERT INTO t2(t2, rank) VALUES('merge', -1);
37 }
38 }
39 } {}
40
41 do_execsql_test 1.2 {
42 SELECT count(*) FROM t2('mno')
43 } $nLoop
44
45 finish_test