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
64 lines
1.5 KiB
Plaintext
64 lines
1.5 KiB
Plaintext
# 2022 Feb 10
|
|
#
|
|
# 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.
|
|
#
|
|
#***********************************************************************
|
|
#
|
|
|
|
set testdir [file dirname $argv0]
|
|
source $testdir/tester.tcl
|
|
set testprefix bind2
|
|
|
|
|
|
# Test that using bind_value() on a REAL sqlite3_value that was stored
|
|
# as an INTEGER works properly.
|
|
#
|
|
# 1.1: An IntReal value read from a table,
|
|
# 1.2: IntReal values obtained via the sqlite3_preupdate_old|new()
|
|
# interfaces.
|
|
#
|
|
do_execsql_test 1.0 {
|
|
CREATE TABLE t1(a REAL);
|
|
INSERT INTO t1 VALUES(42.0);
|
|
SELECT * FROM t1;
|
|
} {42.0}
|
|
|
|
do_test 1.1 {
|
|
set stmt [sqlite3_prepare db "SELECT ?" -1 tail]
|
|
sqlite3_bind_value_from_select $stmt 1 "SELECT a FROM t1"
|
|
sqlite3_step $stmt
|
|
sqlite3_column_text $stmt 0
|
|
} {42.0}
|
|
sqlite3_finalize $stmt
|
|
|
|
ifcapable !preupdate {
|
|
finish_test
|
|
return
|
|
}
|
|
|
|
proc preup {args} {
|
|
set stmt [sqlite3_prepare db "SELECT ?" -1 tail]
|
|
sqlite3_bind_value_from_preupdate $stmt 1 old 0
|
|
sqlite3_step $stmt
|
|
lappend ::reslist [sqlite3_column_text $stmt 0]
|
|
sqlite3_reset $stmt
|
|
sqlite3_bind_value_from_preupdate $stmt 1 new 0
|
|
sqlite3_step $stmt
|
|
lappend ::reslist [sqlite3_column_text $stmt 0]
|
|
sqlite3_finalize $stmt
|
|
}
|
|
db preupdate hook preup
|
|
|
|
do_test 1.2 {
|
|
set ::reslist [list]
|
|
execsql { UPDATE t1 SET a=43; }
|
|
set ::reslist
|
|
} {42.0 43.0}
|
|
|
|
finish_test
|