2023-02-03 22:28:50 +03:00
|
|
|
# 2014 Dec 20
|
|
|
|
#
|
|
|
|
# The author disclaims copyright to this source code. In place of
|
|
|
|
# a legal notice, here is a blessing:
|
|
|
|
#
|
|
|
|
# May you do good and not evil.
|
|
|
|
# May you find forgiveness for yourself and forgive others.
|
|
|
|
# May you share freely, never taking more than you give.
|
|
|
|
#
|
|
|
|
#***********************************************************************
|
|
|
|
#
|
2023-08-27 00:04:54 +03:00
|
|
|
# TESTRUNNER: superslow
|
2023-02-03 22:28:50 +03:00
|
|
|
#
|
|
|
|
|
|
|
|
source [file join [file dirname [info script]] fts5_common.tcl]
|
|
|
|
set testprefix fts5optimize2
|
|
|
|
|
2024-06-24 21:06:15 +03:00
|
|
|
# If SQLITE_ENABLE_FTS5 is not defined, omit this file.
|
2023-02-03 22:28:50 +03:00
|
|
|
ifcapable !fts5 {
|
|
|
|
finish_test
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2023-02-08 20:28:08 +03:00
|
|
|
set nLoop 2500
|
|
|
|
|
2023-02-03 22:28:50 +03:00
|
|
|
do_execsql_test 1.0 {
|
|
|
|
CREATE VIRTUAL TABLE t1 USING fts5(x);
|
|
|
|
INSERT INTO t1(t1, rank) VALUES('pgsz', 32);
|
|
|
|
}
|
|
|
|
|
|
|
|
do_test 1.1 {
|
2023-02-08 20:28:08 +03:00
|
|
|
for {set ii 0} {$ii < $nLoop} {incr ii} {
|
2023-02-03 22:28:50 +03:00
|
|
|
execsql {
|
|
|
|
INSERT INTO t1 VALUES('abc def ghi');
|
|
|
|
INSERT INTO t1 VALUES('jkl mno pqr');
|
|
|
|
INSERT INTO t1(t1) VALUES('optimize');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} {}
|
|
|
|
|
|
|
|
do_execsql_test 1.2 {
|
|
|
|
SELECT count(*) FROM t1('mno')
|
2023-02-08 20:28:08 +03:00
|
|
|
} $nLoop
|
2023-02-03 22:28:50 +03:00
|
|
|
|
|
|
|
finish_test
|