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
127 lines
2.7 KiB
Plaintext
127 lines
2.7 KiB
Plaintext
#
|
|
# 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.
|
|
#
|
|
#***********************************************************************
|
|
#
|
|
# $Id: async2.test,v 1.12 2009/04/25 08:39:15 danielk1977 Exp $
|
|
|
|
|
|
set testdir [file dirname $argv0]
|
|
source $testdir/tester.tcl
|
|
|
|
if {
|
|
[info commands sqlite3async_initialize]=="" ||
|
|
[info command sqlite3_memdebug_fail]==""
|
|
} {
|
|
# The async logic is not built into this system
|
|
puts "Skipping async2 tests: not compiled with required features"
|
|
finish_test
|
|
return
|
|
}
|
|
|
|
# Enable asynchronous IO.
|
|
|
|
set setup_script {
|
|
CREATE TABLE counter(c);
|
|
INSERT INTO counter(c) VALUES (1);
|
|
}
|
|
|
|
set sql_script {
|
|
BEGIN;
|
|
UPDATE counter SET c = 2;
|
|
CREATE TABLE t1(a PRIMARY KEY, b, c);
|
|
CREATE TABLE t2(a PRIMARY KEY, b, c);
|
|
COMMIT;
|
|
|
|
BEGIN;
|
|
UPDATE counter SET c = 3;
|
|
INSERT INTO t1 VALUES('abcdefghij', 'four', 'score');
|
|
INSERT INTO t2 VALUES('klmnopqrst', 'and', 'seven');
|
|
COMMIT;
|
|
|
|
UPDATE counter SET c = 'FIN';
|
|
}
|
|
|
|
db close
|
|
|
|
foreach err [list ioerr malloc-transient malloc-persistent] {
|
|
set ::go 10
|
|
for {set n 1} {$::go} {incr n} {
|
|
set ::sqlite_io_error_pending 0
|
|
sqlite3_memdebug_fail -1
|
|
forcedelete test.db test.db-journal
|
|
sqlite3 db test.db
|
|
execsql $::setup_script
|
|
db close
|
|
|
|
sqlite3async_initialize "" 1
|
|
sqlite3 db test.db
|
|
sqlite3_db_config_lookaside db 0 0 0
|
|
|
|
switch -- $err {
|
|
ioerr { set ::sqlite_io_error_pending $n }
|
|
malloc-persistent { sqlite3_memdebug_fail $n -repeat 1 }
|
|
malloc-transient { sqlite3_memdebug_fail $n -repeat 0 }
|
|
}
|
|
|
|
catchsql $::sql_script
|
|
db close
|
|
|
|
sqlite3async_control halt idle
|
|
sqlite3async_start
|
|
sqlite3async_wait
|
|
sqlite3async_control halt never
|
|
sqlite3async_shutdown
|
|
|
|
set ::sqlite_io_error_pending 0
|
|
sqlite3_memdebug_fail -1
|
|
|
|
sqlite3 db test.db
|
|
set c [db one {SELECT c FROM counter LIMIT 1}]
|
|
switch -- $c {
|
|
1 {
|
|
do_test async-$err-1.1.$n {
|
|
execsql {
|
|
SELECT name FROM sqlite_master;
|
|
}
|
|
} {counter}
|
|
}
|
|
2 {
|
|
do_test async-$err-1.2.$n.1 {
|
|
execsql {
|
|
SELECT * FROM t1;
|
|
}
|
|
} {}
|
|
do_test async-$err-1.2.$n.2 {
|
|
execsql {
|
|
SELECT * FROM t2;
|
|
}
|
|
} {}
|
|
}
|
|
3 {
|
|
do_test async-$err-1.3.$n.1 {
|
|
execsql {
|
|
SELECT * FROM t1;
|
|
}
|
|
} {abcdefghij four score}
|
|
do_test async-$err-1.3.$n.2 {
|
|
execsql {
|
|
SELECT * FROM t2;
|
|
}
|
|
} {klmnopqrst and seven}
|
|
}
|
|
FIN {
|
|
incr ::go -1
|
|
}
|
|
}
|
|
|
|
db close
|
|
}
|
|
}
|
|
|
|
catch {db close}
|
|
|
|
finish_test
|