mirror of
https://github.com/aljazceru/turso.git
synced 2025-12-18 09:04:19 +01:00
Fix incorrect CAST text->numeric if valid prefix is 1 char long
This commit is contained in:
@@ -739,6 +739,7 @@ do_execsql_test zeroblob-blob {
|
||||
} {1}
|
||||
|
||||
# CAST tests - INTEGER affinity
|
||||
|
||||
do_execsql_test cast-text-to-integer {
|
||||
SELECT CAST('123' AS INTEGER);
|
||||
} {123}
|
||||
@@ -747,6 +748,10 @@ do_execsql_test cast-text-with-spaces-to-integer {
|
||||
SELECT CAST(' 123 ' AS INTEGER);
|
||||
} {123}
|
||||
|
||||
do_execsql_test cast-text-with-trailing-junk-to-integer {
|
||||
SELECT CAST('1abc' AS INTEGER);
|
||||
} {1}
|
||||
|
||||
do_execsql_test cast-invalid-text-to-integer {
|
||||
SELECT CAST('abc' AS INTEGER);
|
||||
} {0}
|
||||
|
||||
Reference in New Issue
Block a user