Files
TheRock/rocm-systems/projects/rocprofiler-sdk/external/sqlite/test/tkt-cbd054fa6b.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

108 lines
2.6 KiB
Plaintext

# 2010 March 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.
#
#***********************************************************************
#
# This file implements tests to verify that ticket [cbd054fa6b] has been
# fixed.
#
set testdir [file dirname $argv0]
source $testdir/tester.tcl
ifcapable !stat4 {
finish_test
return
}
proc s {blob} {
set ret ""
binary scan $blob c* bytes
foreach b $bytes {
set t [binary format c $b]
if {[string is print $t]} {
append ret $t
} else {
append ret .
}
}
return $ret
}
db function s s
do_test tkt-cbd05-1.1 {
db eval {
CREATE TABLE t1(a INTEGER PRIMARY KEY, b TEXT UNIQUE NOT NULL);
CREATE INDEX t1_x ON t1(b);
INSERT INTO t1 VALUES (NULL, '');
INSERT INTO t1 VALUES (NULL, 'A');
INSERT INTO t1 VALUES (NULL, 'B');
INSERT INTO t1 VALUES (NULL, 'C');
INSERT INTO t1 VALUES (NULL, 'D');
INSERT INTO t1 VALUES (NULL, 'E');
INSERT INTO t1 VALUES (NULL, 'F');
INSERT INTO t1 VALUES (NULL, 'G');
INSERT INTO t1 VALUES (NULL, 'H');
INSERT INTO t1 VALUES (NULL, 'I');
SELECT count(*) FROM t1;
}
} {10}
do_test tkt-cbd05-1.2 {
db eval { ANALYZE; }
db eval {
PRAGMA writable_schema = 1;
CREATE VIEW vvv AS
SELECT tbl,idx,neq,nlt,ndlt,test_extract(sample,0) AS sample
FROM sqlite_stat4;
PRAGMA writable_schema = 0;
}
} {}
do_test tkt-cbd05-1.3 {
execsql {
SELECT tbl,idx,string_agg(s(sample),' ')
FROM vvv
WHERE idx = 't1_x'
GROUP BY tbl,idx
}
} {t1 t1_x { A B C D E F G H I}}
do_test tkt-cbd05-2.1 {
db eval {
DROP TABLE t1;
CREATE TABLE t1(a INTEGER PRIMARY KEY, b BLOB UNIQUE NOT NULL);
CREATE INDEX t1_x ON t1(b);
INSERT INTO t1 VALUES(NULL, X'');
INSERT INTO t1 VALUES(NULL, X'41');
INSERT INTO t1 VALUES(NULL, X'42');
INSERT INTO t1 VALUES(NULL, X'43');
INSERT INTO t1 VALUES(NULL, X'44');
INSERT INTO t1 VALUES(NULL, X'45');
INSERT INTO t1 VALUES(NULL, X'46');
INSERT INTO t1 VALUES(NULL, X'47');
INSERT INTO t1 VALUES(NULL, X'48');
INSERT INTO t1 VALUES(NULL, X'49');
SELECT count(*) FROM t1;
}
} {10}
do_test tkt-cbd05-2.2 {
db eval {
ANALYZE;
}
} {}
do_test tkt-cbd05-2.3 {
execsql {
SELECT tbl,idx,group_concat(s(sample),' ')
FROM vvv
WHERE idx = 't1_x'
GROUP BY tbl,idx
}
} {t1 t1_x { A B C D E F G H I}}
finish_test