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
84 lines
2.3 KiB
Plaintext
84 lines
2.3 KiB
Plaintext
# 2017-07-15
|
|
#
|
|
# 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 regression tests for SQLite library. The
|
|
# focus of this file is percentile.c extension
|
|
#
|
|
|
|
set testdir [file dirname $argv0]
|
|
source $testdir/tester.tcl
|
|
set testprefix unionvtabfault
|
|
|
|
ifcapable !vtab {
|
|
finish_test
|
|
return
|
|
}
|
|
|
|
forcedelete test.db2
|
|
do_execsql_test 1.0 {
|
|
ATTACH 'test.db2' AS aux;
|
|
CREATE TABLE t1(a INTEGER PRIMARY KEY, b TEXT);
|
|
CREATE TABLE t2(a INTEGER PRIMARY KEY, b TEXT);
|
|
CREATE TABLE aux.t3(a INTEGER PRIMARY KEY, b TEXT);
|
|
|
|
INSERT INTO t1 VALUES(1, 'one'), (2, 'two'), (3, 'three');
|
|
INSERT INTO t2 VALUES(10, 'ten'), (11, 'eleven'), (12, 'twelve');
|
|
INSERT INTO t3 VALUES(20, 'twenty'), (21, 'twenty-one'), (22, 'twenty-two');
|
|
}
|
|
faultsim_save_and_close
|
|
|
|
do_faultsim_test 1.1 -faults * -prep {
|
|
faultsim_restore_and_reopen
|
|
load_static_extension db unionvtab
|
|
execsql { ATTACH 'test.db2' AS aux; }
|
|
execsql { CREATE TEMP TABLE xyz(x); }
|
|
} -body {
|
|
execsql {
|
|
CREATE VIRTUAL TABLE temp.uuu USING unionvtab(
|
|
"VALUES(NULL, 't1', 1, 9), ('main', 't2', 10, 19), ('aux', 't3', 20, 29)"
|
|
);
|
|
}
|
|
} -test {
|
|
faultsim_test_result {0 {}} \
|
|
{1 {vtable constructor failed: uuu}} \
|
|
{1 {sql error: interrupted}}
|
|
}
|
|
|
|
faultsim_restore_and_reopen
|
|
load_static_extension db unionvtab
|
|
execsql { ATTACH 'test.db2' AS aux; }
|
|
execsql { CREATE TEMP TABLE xyz(x); }
|
|
execsql {
|
|
CREATE VIRTUAL TABLE temp.uuu USING unionvtab(
|
|
"VALUES(NULL, 't1', 1, 9), ('main', 't2', 10, 19), ('aux', 't3', 20, 29)"
|
|
);
|
|
}
|
|
do_faultsim_test 1.2 -faults oom* -prep {
|
|
} -body {
|
|
execsql { SELECT * FROM uuu }
|
|
} -test {
|
|
faultsim_test_result {0 {1 one 2 two 3 three 10 ten 11 eleven 12 twelve 20 twenty 21 twenty-one 22 twenty-two}}
|
|
}
|
|
|
|
#-------------------------------------------------------------------------
|
|
# Error while registering the two vtab modules.
|
|
do_faultsim_test 2.0 -faults * -prep {
|
|
catch { db close }
|
|
sqlite3 db :memory:
|
|
} -body {
|
|
load_static_extension db unionvtab
|
|
} -test {
|
|
faultsim_test_result {0 {}} {1 {initialization of unionvtab failed: }}
|
|
}
|
|
|
|
|
|
|
|
finish_test
|