diff --git a/source/dnode/vnode/CMakeLists.txt b/source/dnode/vnode/CMakeLists.txt index 24c4f2912c82ce001398340609f11d28d7111f15..ce5c1815b6809f26be0af980869521f0e29a935a 100644 --- a/source/dnode/vnode/CMakeLists.txt +++ b/source/dnode/vnode/CMakeLists.txt @@ -43,7 +43,6 @@ target_sources( "src/tsdb/tsdbOpen.c" "src/tsdb/tsdbMemTable.c" "src/tsdb/tsdbRead.c" - "src/tsdb/tsdbReadImpl.c" "src/tsdb/tsdbCache.c" "src/tsdb/tsdbWrite.c" "src/tsdb/tsdbReaderWriter.c" diff --git a/source/dnode/vnode/src/tsdb/tsdbReadImpl.c b/source/dnode/vnode/src/tsdb/tsdbReadImpl.c deleted file mode 100644 index fe0d3a1b6f093a64e595c85f6ba97fecee3a5200..0000000000000000000000000000000000000000 --- a/source/dnode/vnode/src/tsdb/tsdbReadImpl.c +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright (c) 2019 TAOS Data, Inc. - * - * This program is free software: you can use, redistribute, and/or modify - * it under the terms of the GNU Affero General Public License, version 3 - * or later ("AGPL"), as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ - -#include "tsdb.h" diff --git a/source/dnode/vnode/src/tsdb/tsdbReaderWriter.c b/source/dnode/vnode/src/tsdb/tsdbReaderWriter.c index 98decfe00272480adec07912d0de6dbfd3e3723a..2c5f837f952edb21f5a815c4ab0b8a7252f5569d 100644 --- a/source/dnode/vnode/src/tsdb/tsdbReaderWriter.c +++ b/source/dnode/vnode/src/tsdb/tsdbReaderWriter.c @@ -424,10 +424,12 @@ int32_t tsdbReadDelIdx(SDelFReader *pReader, SArray *aDelIdx, uint8_t **ppBuf) { ASSERT(n == size - sizeof(TSCKSUM)); + tFree(pBuf); return code; _err: tsdbError("vgId:%d read del idx failed since %s", TD_VID(pReader->pTsdb->pVnode), tstrerror(code)); + tFree(pBuf); return code; } diff --git a/source/dnode/vnode/src/tsdb/tsdbUtil.c b/source/dnode/vnode/src/tsdb/tsdbUtil.c index 24b7c084769d64c2fb07e73f1cf816ddd180e111..683aac015866e301ae164f198fde0f6eb29107a1 100644 --- a/source/dnode/vnode/src/tsdb/tsdbUtil.c +++ b/source/dnode/vnode/src/tsdb/tsdbUtil.c @@ -1016,7 +1016,7 @@ int32_t tBlockDataAppendRow(SBlockData *pBlockData, TSDBROW *pRow, STSchema *pTS SColData *pColData; SColVal *pColVal; - ASSERT(nColData > 0); + if (nColData == 0) goto _exit; tRowIterInit(pIter, pRow, pTSchema); pColData = tBlockDataGetColDataByIdx(pBlockData, iColData); @@ -1046,6 +1046,7 @@ int32_t tBlockDataAppendRow(SBlockData *pBlockData, TSDBROW *pRow, STSchema *pTS } } +_exit: pBlockData->nRow++; return code;