fix: concat null failed

This commit is contained in:
xsren 2024-10-21 09:27:46 +08:00
parent f35d2847b9
commit 70c79abddc
3 changed files with 3 additions and 3 deletions

View File

@ -2362,7 +2362,7 @@ int32_t resultInfoSafeCheck(SReqResultInfo* pResultInfo) {
return TSDB_CODE_TSC_INTERNAL_ERROR; return TSDB_CODE_TSC_INTERNAL_ERROR;
} }
for (int32_t i = 0; i < pResultInfo->numOfCols; ++i) { for (int32_t i = 0; i < pResultInfo->numOfCols; ++i) {
if (pResultInfo->fields[i].bytes <= 0) { if (pResultInfo->fields[i].bytes < 0) {
tscError("checkResultInfo error: bytes:%d <= 0", pResultInfo->fields[i].bytes); tscError("checkResultInfo error: bytes:%d <= 0", pResultInfo->fields[i].bytes);
return TSDB_CODE_TSC_INTERNAL_ERROR; return TSDB_CODE_TSC_INTERNAL_ERROR;
} }

View File

@ -3165,7 +3165,7 @@ int32_t blockEncode(const SSDataBlock* pBlock, char* data, size_t dataBuflen, in
return dataLen; return dataLen;
_exit: _exit:
uError("blockEncode dataLen:%d, dataBuflen:%" PRIx64, dataLen, dataBuflen); uError("blockEncode dataLen:%d, dataBuflen:%" PRIu64, dataLen, dataBuflen);
terrno = TSDB_CODE_QRY_EXECUTOR_INTERNAL_ERROR; terrno = TSDB_CODE_QRY_EXECUTOR_INTERNAL_ERROR;
return -1; return -1;
} }

View File

@ -84,10 +84,10 @@ static int32_t toDataCacheEntry(SDataDispatchHandle* pHandle, const SInputData*
pBuf->useSize = sizeof(SDataCacheEntry); pBuf->useSize = sizeof(SDataCacheEntry);
{ {
// allocate additional 8 bytes to avoid invalid write if compress failed to reduce the size
size_t dataEncodeBufSize = pBuf->allocSize + 8; size_t dataEncodeBufSize = pBuf->allocSize + 8;
if ((pBuf->allocSize > tsCompressMsgSize) && (tsCompressMsgSize > 0) && pHandle->pManager->cfg.compress) { if ((pBuf->allocSize > tsCompressMsgSize) && (tsCompressMsgSize > 0) && pHandle->pManager->cfg.compress) {
if (pHandle->pCompressBuf == NULL) { if (pHandle->pCompressBuf == NULL) {
// allocate additional 8 bytes to avoid invalid write if compress failed to reduce the size
pHandle->pCompressBuf = taosMemoryMalloc(dataEncodeBufSize); pHandle->pCompressBuf = taosMemoryMalloc(dataEncodeBufSize);
if (NULL == pHandle->pCompressBuf) { if (NULL == pHandle->pCompressBuf) {
QRY_RET(terrno); QRY_RET(terrno);