Files
TheRock/rocm-systems/projects/rocprofiler-sdk/external/sqlite/test/fts3af.test
T
derek.holloway 7502bf64a4
CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

91 lines
3.2 KiB
Plaintext

# 2006 October 19
#
# The author disclaims copyright to this source code.
#
#*************************************************************************
# This file implements regression tests for SQLite library. The
# focus of this script is testing updates in the FTS3 module.
#
# $Id: fts3af.test,v 1.1 2007/08/20 17:38:42 shess Exp $
#
set testdir [file dirname $argv0]
source $testdir/tester.tcl
# If SQLITE_ENABLE_FTS3 is defined, omit this file.
ifcapable !fts3 {
finish_test
return
}
# Construct a full-text search table containing keywords which are the
# ordinal numbers of the bit positions set for a sequence of integers,
# which are used for the rowid. There are a total of 31 INSERT,
# UPDATE, and DELETE statements, so that we'll test both the
# segmentMerge() merge (over the first 16) and the termSelect() merge
# (over the level-1 segment and 15 level-0 segments).
db eval {
CREATE VIRTUAL TABLE t1 USING fts3(content);
INSERT INTO t1 (rowid, content) VALUES(1, 'one');
INSERT INTO t1 (rowid, content) VALUES(2, 'two');
INSERT INTO t1 (rowid, content) VALUES(3, 'one two');
INSERT INTO t1 (rowid, content) VALUES(4, 'three');
INSERT INTO t1 (rowid, content) VALUES(5, 'one three');
INSERT INTO t1 (rowid, content) VALUES(6, 'two three');
INSERT INTO t1 (rowid, content) VALUES(7, 'one two three');
DELETE FROM t1 WHERE rowid = 4;
INSERT INTO t1 (rowid, content) VALUES(8, 'four');
UPDATE t1 SET content = 'update one three' WHERE rowid = 1;
INSERT INTO t1 (rowid, content) VALUES(9, 'one four');
INSERT INTO t1 (rowid, content) VALUES(10, 'two four');
DELETE FROM t1 WHERE rowid = 7;
INSERT INTO t1 (rowid, content) VALUES(11, 'one two four');
INSERT INTO t1 (rowid, content) VALUES(12, 'three four');
INSERT INTO t1 (rowid, content) VALUES(13, 'one three four');
DELETE FROM t1 WHERE rowid = 10;
INSERT INTO t1 (rowid, content) VALUES(14, 'two three four');
INSERT INTO t1 (rowid, content) VALUES(15, 'one two three four');
UPDATE t1 SET content = 'update two five' WHERE rowid = 8;
INSERT INTO t1 (rowid, content) VALUES(16, 'five');
DELETE FROM t1 WHERE rowid = 13;
INSERT INTO t1 (rowid, content) VALUES(17, 'one five');
INSERT INTO t1 (rowid, content) VALUES(18, 'two five');
INSERT INTO t1 (rowid, content) VALUES(19, 'one two five');
DELETE FROM t1 WHERE rowid = 16;
INSERT INTO t1 (rowid, content) VALUES(20, 'three five');
INSERT INTO t1 (rowid, content) VALUES(21, 'one three five');
INSERT INTO t1 (rowid, content) VALUES(22, 'two three five');
DELETE FROM t1 WHERE rowid = 19;
UPDATE t1 SET content = 'update' WHERE rowid = 15;
}
do_test fts3af-1.1 {
execsql {SELECT COUNT(*) FROM t1}
} {16}
do_test fts3af-2.0 {
execsql {SELECT rowid FROM t1 WHERE content MATCH 'update'}
} {1 8 15}
do_test fts3af-2.1 {
execsql {SELECT rowid FROM t1 WHERE content MATCH 'one'}
} {1 3 5 9 11 17 21}
do_test fts3af-2.2 {
execsql {SELECT rowid FROM t1 WHERE content MATCH 'two'}
} {2 3 6 8 11 14 18 22}
do_test fts3af-2.3 {
execsql {SELECT rowid FROM t1 WHERE content MATCH 'three'}
} {1 5 6 12 14 20 21 22}
do_test fts3af-2.4 {
execsql {SELECT rowid FROM t1 WHERE content MATCH 'four'}
} {9 11 12 14}
do_test fts3af-2.5 {
execsql {SELECT rowid FROM t1 WHERE content MATCH 'five'}
} {8 17 18 20 21 22}
finish_test