summaryrefslogtreecommitdiffstats
path: root/ext/fts5/test/fts5optimize2.test
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 14:07:11 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 14:07:11 +0000
commit63847496f14c813a5d80efd5b7de0f1294ffe1e3 (patch)
tree01c7571c7c762ceee70638549a99834fdd7c411b /ext/fts5/test/fts5optimize2.test
parentInitial commit. (diff)
downloadsqlite3-63847496f14c813a5d80efd5b7de0f1294ffe1e3.tar.xz
sqlite3-63847496f14c813a5d80efd5b7de0f1294ffe1e3.zip
Adding upstream version 3.45.1.upstream/3.45.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ext/fts5/test/fts5optimize2.test')
-rw-r--r--ext/fts5/test/fts5optimize2.test45
1 files changed, 45 insertions, 0 deletions
diff --git a/ext/fts5/test/fts5optimize2.test b/ext/fts5/test/fts5optimize2.test
new file mode 100644
index 0000000..b0b2887
--- /dev/null
+++ b/ext/fts5/test/fts5optimize2.test
@@ -0,0 +1,45 @@
+# 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.
+#
+#***********************************************************************
+#
+# TESTRUNNER: superslow
+#
+
+source [file join [file dirname [info script]] fts5_common.tcl]
+set testprefix fts5optimize2
+
+# If SQLITE_ENABLE_FTS5 is defined, omit this file.
+ifcapable !fts5 {
+ finish_test
+ return
+}
+
+set nLoop 2500
+
+do_execsql_test 1.0 {
+ CREATE VIRTUAL TABLE t1 USING fts5(x);
+ INSERT INTO t1(t1, rank) VALUES('pgsz', 32);
+}
+
+do_test 1.1 {
+ for {set ii 0} {$ii < $nLoop} {incr ii} {
+ 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')
+} $nLoop
+
+finish_test