mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 16:03:02 +01:00
Backport fix for bug #7482 : Result of blob_append(null, null) (literal '<null>') is not shown
This commit is contained in:
parent
56f4dc52dd
commit
7b6f1edabb
@ -1244,6 +1244,7 @@ bool makeBlobAppendBlob(dsc* result, const dsc* arg, bid* blob_id = nullptr)
|
||||
if (arg->isBlob())
|
||||
{
|
||||
result->makeBlob(arg->getBlobSubType(), arg->getTextType(), ptr);
|
||||
result->setNullable(true);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -1263,6 +1264,7 @@ bool makeBlobAppendBlob(dsc* result, const dsc* arg, bid* blob_id = nullptr)
|
||||
result->makeBlob(isc_blob_text, ttype_ascii, ptr);
|
||||
}
|
||||
|
||||
result->setNullable(true);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -1270,18 +1272,23 @@ bool makeBlobAppendBlob(dsc* result, const dsc* arg, bid* blob_id = nullptr)
|
||||
void makeBlobAppend(DataTypeUtilBase* dataTypeUtil, const SysFunction* function, dsc* result,
|
||||
int argsCount, const dsc** args)
|
||||
{
|
||||
fb_assert(argsCount >= function->minArgCount);
|
||||
|
||||
if (argsCount > 0)
|
||||
{
|
||||
const dsc** ppArg = args;
|
||||
const dsc** const end = args + argsCount;
|
||||
|
||||
for (; ppArg < end; ppArg++)
|
||||
{
|
||||
if (makeBlobAppendBlob(result, *ppArg))
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
fb_assert(false);
|
||||
// All args are NULL's
|
||||
result->makeBlob(isc_blob_untyped, ttype_binary);
|
||||
result->setNullable(true);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user