mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-30 19:03:16 +03:00
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
This commit is contained in:
@ -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();
|
||||
|
Reference in New Issue
Block a user