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
92 lines
2.0 KiB
Plaintext
92 lines
2.0 KiB
Plaintext
# 2011 July 11
|
|
#
|
|
# 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 sessions extension.
|
|
# Specifically, it tests that sessions work when the database is modified
|
|
# using incremental blob handles.
|
|
#
|
|
|
|
if {![info exists testdir]} {
|
|
set testdir [file join [file dirname [info script]] .. .. test]
|
|
}
|
|
source [file join [file dirname [info script]] session_common.tcl]
|
|
source $testdir/tester.tcl
|
|
ifcapable !session {finish_test; return}
|
|
ifcapable !incrblob {finish_test; return}
|
|
|
|
set testprefix session6
|
|
|
|
proc do_then_apply_tcl {tcl {dbname main}} {
|
|
proc xConflict args { return "OMIT" }
|
|
set rc [catch {
|
|
sqlite3session S db $dbname
|
|
db eval "SELECT name FROM $dbname.sqlite_master WHERE type = 'table'" {
|
|
S attach $name
|
|
}
|
|
eval $tcl
|
|
sqlite3changeset_apply db2 [S changeset] xConflict
|
|
} msg]
|
|
|
|
catch { S delete }
|
|
if {$rc} {error $msg}
|
|
}
|
|
|
|
test_sqlite3_log x
|
|
proc x {args} {puts $args}
|
|
|
|
forcedelete test.db2
|
|
sqlite3 db2 test.db2
|
|
|
|
do_common_sql {
|
|
CREATE TABLE t1(a PRIMARY KEY, b);
|
|
CREATE TABLE t2(c PRIMARY KEY, d);
|
|
}
|
|
|
|
# Test a blob update.
|
|
#
|
|
do_test 1.1 {
|
|
do_then_apply_tcl {
|
|
db eval { INSERT INTO t1 VALUES(1, 'helloworld') }
|
|
db eval { INSERT INTO t2 VALUES(2, 'onetwothree') }
|
|
}
|
|
compare_db db db2
|
|
} {}
|
|
do_test 1.2 {
|
|
do_then_apply_tcl {
|
|
set fd [db incrblob t1 b 1]
|
|
puts -nonewline $fd 1234567890
|
|
close $fd
|
|
}
|
|
compare_db db db2
|
|
} {}
|
|
|
|
# Test an attached database.
|
|
#
|
|
do_test 2.1 {
|
|
forcedelete test.db3
|
|
file copy test.db2 test.db3
|
|
execsql { ATTACH 'test.db3' AS aux; }
|
|
|
|
do_then_apply_tcl {
|
|
set fd [db incrblob aux t2 d 1]
|
|
puts -nonewline $fd fourfivesix
|
|
close $fd
|
|
} aux
|
|
|
|
sqlite3 db3 test.db3
|
|
compare_db db2 db3
|
|
} {}
|
|
|
|
|
|
db3 close
|
|
db2 close
|
|
|
|
finish_test
|