fix more bug

This commit is contained in:
Hongze Cheng 2022-08-08 13:23:50 +00:00
parent 78985ce4f1
commit 4ac14697b7
2 changed files with 3 additions and 3 deletions

View File

@ -822,7 +822,7 @@ static int32_t tsdbMergeCommitLast(SCommitter *pCommitter, STbDataIter *pIter) {
// commit and reset block data schema if need
// QUESTION: Is there a case that pBlockData->nRow == 0 but need to change schema ?
if (pBlockData->suid || pBlockData->uid) {
if (pBlockData->suid != pTbData->uid || pBlockData->suid == 0) {
if (pBlockData->suid != pTbData->suid || pBlockData->suid == 0) {
if (pBlockData->nRow > 0) {
code = tsdbCommitLastBlock(pCommitter);
if (code) goto _err;

View File

@ -771,7 +771,7 @@ static int32_t tsdbReadBlockDataImpl(SDataFReader *pReader, SBlockInfo *pBlkInfo
if (code) goto _err;
p += hdr.szKey;
ASSERT(p - pReader->pBuf1 == sizeof(TSCKSUM));
ASSERT(p - pReader->pBuf1 == pBlkInfo->szKey - sizeof(TSCKSUM));
// read and decode columns
if (taosArrayGetSize(pBlockData->aIdx) == 0) goto _exit;
@ -1195,7 +1195,7 @@ _err:
int32_t tsdbWriteBlockIdx(SDataFWriter *pWriter, SArray *aBlockIdx) {
int32_t code = 0;
SHeadFile *pHeadFile = &pWriter->fHead;
int64_t size;
int64_t size = 0;
int64_t n;
// check