diff options
author | drh <> | 2024-05-03 19:35:43 +0000 |
---|---|---|
committer | drh <> | 2024-05-03 19:35:43 +0000 |
commit | 0901571f0a66a2528c3fc6986b44d7a0323e36a1 (patch) | |
tree | dfa0124fbc3f950fe68562a2b32a4390e3522797 /src | |
parent | 9c0d777a9f4a84f09b6145b74184a38a3abd7db0 (diff) | |
download | sqlite-0901571f0a66a2528c3fc6986b44d7a0323e36a1.tar.gz sqlite-0901571f0a66a2528c3fc6986b44d7a0323e36a1.zip |
The coalesce(), ifnull(), and iif() functions pass through subtype values
from their arguments, and hence need to have the SQLITE_RESULT_SUBTYPE flag
set. This fixes an corner-case for the patch at [ba789a7804ab96d8].
FossilOrigin-Name: cdd1610c44876623e629bb8e5779ea689e6d23c545552b088eca63ad2d1cf8da
Diffstat (limited to 'src')
-rw-r--r-- | src/func.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/func.c b/src/func.c index 18004984d..472efa211 100644 --- a/src/func.c +++ b/src/func.c @@ -2643,7 +2643,7 @@ void sqlite3RegisterBuiltinFunctions(void){ FUNCTION(concat_ws, -1, 0, 0, concatwsFunc ), FUNCTION(concat_ws, 0, 0, 0, 0 ), FUNCTION(concat_ws, 1, 0, 0, 0 ), - INLINE_FUNC(ifnull, 2, INLINEFUNC_coalesce, 0 ), + INLINE_FUNC(ifnull, 2, INLINEFUNC_coalesce, SQLITE_RESULT_SUBTYPE), VFUNCTION(random, 0, 0, 0, randomFunc ), VFUNCTION(randomblob, 1, 0, 0, randomBlob ), FUNCTION(nullif, 2, 0, 1, nullifFunc ), @@ -2725,8 +2725,8 @@ void sqlite3RegisterBuiltinFunctions(void){ FUNCTION(pi, 0, 0, 0, piFunc ), #endif /* SQLITE_ENABLE_MATH_FUNCTIONS */ FUNCTION(sign, 1, 0, 0, signFunc ), - INLINE_FUNC(coalesce, -1, INLINEFUNC_coalesce, 0 ), - INLINE_FUNC(iif, 3, INLINEFUNC_iif, 0 ), + INLINE_FUNC(coalesce, -1, INLINEFUNC_coalesce, SQLITE_RESULT_SUBTYPE), + INLINE_FUNC(iif, 3, INLINEFUNC_iif, SQLITE_RESULT_SUBTYPE), }; #ifndef SQLITE_OMIT_ALTERTABLE sqlite3AlterFunctions(); |