fix(tsdb): fix rowkey assign error.

This commit is contained in:
Haojun Liao 2024-03-29 18:59:29 +08:00
parent 55bb6ab341
commit dd2f6287ec
2 changed files with 3 additions and 3 deletions

View File

@ -1298,7 +1298,7 @@ int32_t tRowKeyAssign(SRowKey *pDst, SRowKey* pSrc) {
if (IS_NUMERIC_TYPE(pVal->type)) {
pVal->val = pSrc->pks[i].val;
} else {
memcpy(pVal->pData, pVal->pData, pVal->nData);
memcpy(pVal->pData, pSrc->pks[i].pData, pVal->nData);
pVal->nData = pSrc->pks[i].nData;
}
}

View File

@ -2068,8 +2068,8 @@ static int32_t initMemDataIterator(STableBlockScanInfo* pBlockScanInfo, STsdbRea
return TSDB_CODE_SUCCESS;
}
STsdbRowKey startKey = {0};
tRowKeyAssign(&startKey.key, &pBlockScanInfo->lastProcKey);
STsdbRowKey startKey;
startKey.key = pBlockScanInfo->lastProcKey;
startKey.version = asc ? pReader->info.verRange.minVer : pReader->info.verRange.maxVer;
if ((asc && (startKey.key.ts < pWindow->skey)) || ((!asc) && startKey.key.ts > pWindow->ekey)) {
startKey.key.ts = asc? pWindow->skey:pWindow->ekey;