Ensure that the replace() SQL function always returns a TEXT value even

when its first argument is numeric and its second argument is an empty string.
Fix for the issue reported by
[forum:/forumpost/3776b48e71|forum post 3776b48e71].

FossilOrigin-Name: 01868ebcd25fadb2034da234c0636e82d07c5abc902ef66493cadfc988e74d7b
This commit is contained in:
drh
2024-01-20 13:18:22 +00:00
parent 777a08893b
commit 8dca1905ed
4 changed files with 12 additions and 9 deletions
+3
View File
@@ -1042,6 +1042,9 @@ do_test func-21.8 {
SELECT replace('aaaaaaa', 'a', '0123456789');
}
} {0123456789012345678901234567890123456789012345678901234567890123456789}
do_execsql_test func-21.9 {
SELECT typeof(replace(1,'',0));
} {text}
ifcapable tclvar {
do_test func-21.9 {