Skip to content

Commit c4162cd

Browse files
committed
Fixed bug #7256 : Inconsistent conversion of non-TEXT blobs in BLOB_APPEND
1 parent 437e81e commit c4162cd

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

src/jrd/SysFunction.cpp

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1249,12 +1249,16 @@ void makeBinShift(DataTypeUtilBase*, const SysFunction* function, dsc* result,
12491249
void makeBlobAppend(DataTypeUtilBase* dataTypeUtil, const SysFunction* function, dsc* result,
12501250
int argsCount, const dsc** args)
12511251
{
1252-
USHORT ttype = CS_dynamic;
1253-
12541252
if (argsCount > 0 && args[0])
1255-
ttype = args[0]->getTextType();
1256-
1257-
result->makeBlob(isc_blob_text, ttype);
1253+
{
1254+
auto arg = args[0];
1255+
if (arg->isBlob())
1256+
result->makeBlob(arg->getBlobSubType(), arg->getTextType());
1257+
else if (arg->isText())
1258+
result->makeBlob(isc_blob_text, arg->getTextType());
1259+
}
1260+
else
1261+
result->makeBlob(isc_blob_text, CS_dynamic);
12581262
}
12591263

12601264

0 commit comments

Comments
 (0)