add more change
This commit is contained in:
parent
ac3353f064
commit
1f2a097a4d
|
@ -384,7 +384,8 @@ static int32_t tRowBuildKVRow(SArray *aColVal, const SRowBuildScanInfo *sinfo, c
|
|||
payloadSize += tPutI16v(payload + payloadSize, colValArray[colValIndex].cid);
|
||||
payloadSize += tPutU32v(payload + payloadSize, colValArray[colValIndex].value.nData);
|
||||
if (colValArray[colValIndex].value.nData > 0) {
|
||||
(void)memcpy(payload + payloadSize, colValArray[colValIndex].value.pData, colValArray[colValIndex].value.nData);
|
||||
(void)memcpy(payload + payloadSize, colValArray[colValIndex].value.pData,
|
||||
colValArray[colValIndex].value.nData);
|
||||
}
|
||||
payloadSize += colValArray[colValIndex].value.nData;
|
||||
} else {
|
||||
|
@ -480,7 +481,10 @@ int32_t tRowBuildFromBind(SBindInfo *infos, int32_t numOfInfos, bool infoSorted,
|
|||
}
|
||||
colVal = COL_VAL_VALUE(infos[iInfo].columnId, value);
|
||||
}
|
||||
taosArrayPush(colValArray, &colVal);
|
||||
if (taosArrayPush(colValArray, &colVal) == NULL) {
|
||||
code = TSDB_CODE_OUT_OF_MEMORY;
|
||||
goto _exit;
|
||||
}
|
||||
}
|
||||
|
||||
SRow *row;
|
||||
|
@ -689,7 +693,12 @@ static int32_t tRowMergeImpl(SArray *aRowP, STSchema *pTSchema, int32_t iStart,
|
|||
}
|
||||
}
|
||||
|
||||
if (pColVal) taosArrayPush(aColVal, pColVal);
|
||||
if (pColVal) {
|
||||
if (taosArrayPush(aColVal, pColVal) == NULL) {
|
||||
code = TSDB_CODE_OUT_OF_MEMORY;
|
||||
goto _exit;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// build
|
||||
|
@ -1750,7 +1759,10 @@ int32_t tTagToValArray(const STag *pTag, SArray **ppArray) {
|
|||
offset = pTag->idx[iTag];
|
||||
}
|
||||
tGetTagVal(p + offset, &tv, pTag->flags & TD_TAG_JSON);
|
||||
taosArrayPush(*ppArray, &tv);
|
||||
if (taosArrayPush(*ppArray, &tv) == NULL) {
|
||||
code = TSDB_CODE_OUT_OF_MEMORY;
|
||||
goto _err;
|
||||
}
|
||||
}
|
||||
|
||||
return code;
|
||||
|
@ -1783,6 +1795,7 @@ void tTagSetCid(const STag *pTag, int16_t iTag, int16_t cid) {
|
|||
STSchema *tBuildTSchema(SSchema *aSchema, int32_t numOfCols, int32_t version) {
|
||||
STSchema *pTSchema = taosMemoryCalloc(1, sizeof(STSchema) + sizeof(STColumn) * numOfCols);
|
||||
if (pTSchema == NULL) {
|
||||
terrno = TSDB_CODE_OUT_OF_MEMORY;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -2592,7 +2605,8 @@ static FORCE_INLINE void tColDataGetValue4(SColData *pColData, int32_t iVal, SCo
|
|||
}
|
||||
value.pData = pColData->pData + pColData->aOffset[iVal];
|
||||
} else {
|
||||
(void)memcpy(&value.val, pColData->pData + tDataTypes[pColData->type].bytes * iVal, tDataTypes[pColData->type].bytes);
|
||||
(void)memcpy(&value.val, pColData->pData + tDataTypes[pColData->type].bytes * iVal,
|
||||
tDataTypes[pColData->type].bytes);
|
||||
}
|
||||
*pColVal = COL_VAL_VALUE(pColData->cid, value);
|
||||
}
|
||||
|
@ -3209,12 +3223,12 @@ static int32_t tColDataMergeSortMerge(SColData *aColData, int32_t start, int32_t
|
|||
|
||||
if (end > start) {
|
||||
aDstColData = taosMemoryCalloc(1, sizeof(SColData) * nColData);
|
||||
for (int c = 0; c < nColData; ++c) {
|
||||
tColDataInit(&aDstColData[c], aColData[c].cid, aColData[c].type, aColData[c].cflag);
|
||||
}
|
||||
if (aDstColData == NULL) {
|
||||
return TSDB_CODE_OUT_OF_MEMORY;
|
||||
}
|
||||
for (int c = 0; c < nColData; ++c) {
|
||||
tColDataInit(&aDstColData[c], aColData[c].cid, aColData[c].type, aColData[c].cflag);
|
||||
}
|
||||
}
|
||||
|
||||
tColDataArrGetRowKey(aColData, nColData, i, &keyi);
|
||||
|
@ -4476,6 +4490,9 @@ int32_t tDecompressData(void *input, // input
|
|||
buffer = &local;
|
||||
}
|
||||
code = tBufferEnsureCapacity(buffer, info->originalSize + COMP_OVERFLOW_BYTES);
|
||||
if (code) {
|
||||
return code;
|
||||
}
|
||||
|
||||
int32_t decompressedSize = tDataCompress[info->dataType].decompFunc(
|
||||
input, // input
|
||||
|
|
Loading…
Reference in New Issue