Files
TheRock/rocm-systems/projects/rocprofiler-sdk/external/sqlite/ext/rbu/rbu14.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

93 lines
2.3 KiB
Plaintext

# 2015 July 25
#
# 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.
#
#***********************************************************************
#
# Test that an RBU data_xxx table may be a view instead of a regular
# table.
#
source [file join [file dirname [info script]] rbu_common.tcl]
if_no_rbu_support { finish_test ; return }
source $testdir/lock_common.tcl
set ::testprefix rbu14
foreach {tn schema} {
1 {
CREATE TABLE t1(a PRIMARY KEY, b, c);
CREATE TABLE t2(a PRIMARY KEY, b, c);
}
2 {
CREATE TABLE t1(a PRIMARY KEY, b, c);
CREATE TABLE t2(a PRIMARY KEY, b, c);
CREATE INDEX i1 ON t1(b, c);
CREATE INDEX i2 ON t2(b, c);
}
3 {
CREATE TABLE t1(a PRIMARY KEY, b, c) WITHOUT ROWID;
CREATE TABLE t2(a PRIMARY KEY, b, c) WITHOUT ROWID;
}
4 {
CREATE TABLE t1(a PRIMARY KEY, b, c) WITHOUT ROWID;
CREATE TABLE t2(a PRIMARY KEY, b, c) WITHOUT ROWID;
CREATE INDEX i1 ON t1(b, c);
CREATE INDEX i2 ON t2(b, c);
}
} {
reset_db
execsql $schema
execsql {
INSERT INTO t1 VALUES(50, 50, 50);
INSERT INTO t1 VALUES(51, 51, 51);
INSERT INTO t2 VALUES(50, 50, 50);
INSERT INTO t2 VALUES(51, 51, 51);
}
forcedelete rbu.db
do_execsql_test $tn.1 {
ATTACH 'rbu.db' AS rbu;
CREATE TABLE rbu.stuff(tbl, a, b, c, rbu_control);
INSERT INTO stuff VALUES
('t1', 1, 2, 3, 0), -- insert into t1
('t2', 4, 5, 6, 0), -- insert into t2
('t1', 50, NULL, NULL, 1), -- delete from t1
('t2', 51, NULL, NULL, 1); -- delete from t2
CREATE VIEW rbu.data_t1 AS
SELECT a, b, c, rbu_control FROM stuff WHERE tbl='t1';
CREATE VIEW rbu.data_t2 AS
SELECT a, b, c, rbu_control FROM stuff WHERE tbl='t2';
}
do_test $tn.2 {
while 1 {
sqlite3rbu rbu test.db rbu.db
set rc [rbu step]
rbu close
if {$rc != "SQLITE_OK"} break
}
set rc
} {SQLITE_DONE}
do_execsql_test $tn.3.1 {
SELECT * FROM t1 ORDER BY a;
} {1 2 3 51 51 51}
do_execsql_test $tn.3.2 {
SELECT * FROM t2 ORDER BY a;
} {4 5 6 50 50 50}
integrity_check $tn.4
}
finish_test