Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Fix wrong implementation of nullable flag
- Loading branch information
1 parent
829e324
commit 041a303
Showing
1 changed file
with
16 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1244,7 +1244,6 @@ 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; | ||
} | ||
|
||
|
@@ -1264,7 +1263,6 @@ bool makeBlobAppendBlob(dsc* result, const dsc* arg, bid* blob_id = nullptr) | |
result->makeBlob(isc_blob_text, ttype_ascii, ptr); | ||
} | ||
|
||
result->setNullable(true); | ||
return true; | ||
} | ||
|
||
|
@@ -1274,21 +1272,28 @@ void makeBlobAppend(DataTypeUtilBase* dataTypeUtil, const SysFunction* function, | |
{ | ||
fb_assert(argsCount >= function->minArgCount); | ||
|
||
result->makeBlob(isc_blob_untyped, ttype_binary); | ||
result->setNullable(true); | ||
|
||
if (argsCount > 0) | ||
{ | ||
const dsc** ppArg = args; | ||
const dsc** const end = args + argsCount; | ||
for (int i = 0; i < argsCount; ++i) | ||
{ | ||
if (makeBlobAppendBlob(result, args[i])) | ||
break; | ||
} | ||
|
||
for (; ppArg < end; ppArg++) | ||
result->setNullable(true); | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
asfernandes
Author
Member
|
||
|
||
for (int i = 0; i < argsCount; ++i) | ||
{ | ||
if (makeBlobAppendBlob(result, *ppArg)) | ||
return; | ||
if (!args[i]->isNullable()) | ||
{ | ||
result->setNullable(false); | ||
break; | ||
} | ||
} | ||
} | ||
|
||
// All args are NULL's | ||
result->makeBlob(isc_blob_untyped, ttype_binary); | ||
result->setNullable(true); | ||
} | ||
|
||
|
||
|
It was already done several lines up.