Fix expected error message

This commit is contained in:
Jussi Saurio
2025-10-15 09:41:44 +03:00
parent 9bbf3bb780
commit 25cf56b8e8
3 changed files with 16 additions and 20 deletions

View File

@@ -979,34 +979,34 @@ do_execsql_test_on_specific_db {:memory:} limit-expr-int-and-string {
do_execsql_test_in_memory_error_content limit-expr-cannot-be-cast-losslessly-1 {
SELECT 1 LIMIT 1.1;
} {"the value in register cannot be cast to integer"}
} {"datatype mismatch"}
do_execsql_test_in_memory_error_content limit-expr-cannot-be-cast-losslessly-2 {
SELECT 1 LIMIT 1.1 + 2.2 + 1.9/8;
} {"the value in register cannot be cast to integer"}
} {"datatype mismatch"}
# Return error as float in the expression cannot be cast losslessly
do_execsql_test_in_memory_error_content limit-expr-cannot-be-cast-losslessly-3 {
SELECT 1 LIMIT 1.1 +'a';
} {"the value in register cannot be cast to integer"}
} {"datatype mismatch"}
do_execsql_test_in_memory_error_content limit-expr-invalid-data-type-1 {
SELECT 1 LIMIT 'a';
} {"the value in register cannot be cast to integer"}
} {"datatype mismatch"}
do_execsql_test_in_memory_error_content limit-expr-invalid-data-type-2 {
SELECT 1 LIMIT NULL;
} {"the value in register cannot be cast to integer"}
} {"datatype mismatch"}
# The expression below evaluates to NULL as string is cast to 0
do_execsql_test_in_memory_error_content limit-expr-invalid-data-type-3 {
SELECT 1 LIMIT 1/'iwillbezero ;-; ' ;
} {"the value in register cannot be cast to integer"}
} {"datatype mismatch"}
# Expression is evaluated as NULL
do_execsql_test_in_memory_error_content limit-expr-invalid-data-type-4 {
SELECT 1 LIMIT 4+NULL;
} {"the value in register cannot be cast to integer"}
} {"datatype mismatch"}
do_execsql_test_on_specific_db {:memory:} rowid-references {
CREATE TABLE test_table (id INTEGER);