Files
turso/testing/affinity.test
Pekka Enberg 0c6398c935 core/vdbe: Fix apply_affinity_char() text parsing
We need strict parsing in apply_affinity_char() to avoid transforming
non-numeric values (for example, "1a") into numeric values.
2025-09-08 18:49:13 +03:00

15 lines
296 B
Tcl
Executable File

#!/usr/bin/env tclsh
set testdir [file dirname $argv0]
source $testdir/tester.tcl
do_execsql_test_on_specific_db {:memory:} affinity {
CREATE TABLE t1 (c INTEGER);
INSERT INTO t1 VALUES ('1');
INSERT INTO t1 VALUES ('1a');
SELECT c, typeof(c) FROM t1;
} {
{1|integer}
{1a|text}
}