merge conflict

This commit is contained in:
Hongze Cheng 2024-07-29 18:12:57 +08:00
parent 16153022a5
commit 61994e7b5e
2 changed files with 4 additions and 3 deletions

View File

@ -3641,7 +3641,7 @@ int32_t tEncodeSTqOffsetVal(SEncoder* pEncoder, const STqOffsetVal* pOffsetVal);
int32_t tDecodeSTqOffsetVal(SDecoder* pDecoder, STqOffsetVal* pOffsetVal);
void tFormatOffset(char* buf, int32_t maxLen, const STqOffsetVal* pVal);
bool tOffsetEqual(const STqOffsetVal* pLeft, const STqOffsetVal* pRight);
void tOffsetCopy(STqOffsetVal* pLeft, const STqOffsetVal* pRight);
int32_t tOffsetCopy(STqOffsetVal* pLeft, const STqOffsetVal* pRight);
void tOffsetDestroy(void* pVal);
typedef struct {

View File

@ -9238,17 +9238,18 @@ bool tOffsetEqual(const STqOffsetVal *pLeft, const STqOffsetVal *pRight) {
return false;
}
void tOffsetCopy(STqOffsetVal *pLeft, const STqOffsetVal *pRight) {
int32_t tOffsetCopy(STqOffsetVal *pLeft, const STqOffsetVal *pRight) {
tOffsetDestroy(pLeft);
*pLeft = *pRight;
if (IS_VAR_DATA_TYPE(pRight->primaryKey.type)) {
pLeft->primaryKey.pData = taosMemoryMalloc(pRight->primaryKey.nData);
if (pLeft->primaryKey.pData == NULL) {
uError("failed to allocate memory for offset");
return;
return terrno;
}
(void)memcpy(pLeft->primaryKey.pData, pRight->primaryKey.pData, pRight->primaryKey.nData);
}
return 0;
}
void tOffsetDestroy(void *param) {