parent
c2bff98311
commit
120a3ca4b9
|
@ -344,8 +344,11 @@ static FORCE_INLINE void varToNchar(char *buf, SScalarParam *pOut, int32_t rowIn
|
||||||
int32_t outputMaxLen = (inputLen + 1) * TSDB_NCHAR_SIZE + VARSTR_HEADER_SIZE;
|
int32_t outputMaxLen = (inputLen + 1) * TSDB_NCHAR_SIZE + VARSTR_HEADER_SIZE;
|
||||||
|
|
||||||
char *t = taosMemoryCalloc(1, outputMaxLen);
|
char *t = taosMemoryCalloc(1, outputMaxLen);
|
||||||
/*int32_t resLen = */ taosMbsToUcs4(varDataVal(buf), inputLen, (TdUcs4 *)varDataVal(t),
|
int32_t ret = taosMbsToUcs4(varDataVal(buf), inputLen, (TdUcs4 *)varDataVal(t),
|
||||||
outputMaxLen - VARSTR_HEADER_SIZE, &len);
|
outputMaxLen - VARSTR_HEADER_SIZE, &len);
|
||||||
|
if (!ret) {
|
||||||
|
sclError("failed to convert to NCHAR");
|
||||||
|
}
|
||||||
varDataSetLen(t, len);
|
varDataSetLen(t, len);
|
||||||
|
|
||||||
colDataAppend(pOut->columnData, rowIndex, t, false);
|
colDataAppend(pOut->columnData, rowIndex, t, false);
|
||||||
|
|
Loading…
Reference in New Issue