diff --git a/source/dnode/vnode/src/tsdb/tsdbRead.c b/source/dnode/vnode/src/tsdb/tsdbRead.c index 176adb43b85a6ee18108362e19dad5c456fb953a..53e5cd7a8884208c2e59733b17a0e9572de42348 100644 --- a/source/dnode/vnode/src/tsdb/tsdbRead.c +++ b/source/dnode/vnode/src/tsdb/tsdbRead.c @@ -2960,6 +2960,7 @@ static int32_t doBuildDataBlock(STsdbReader* pReader) { SDataBlockInfo* pInfo = &pReader->pResBlock->info; pInfo->rows = pBlock->nRow; pInfo->id.uid = pScanInfo->uid; + pInfo->dataLoad = 0; pInfo->window = (STimeWindow){.skey = pBlock->minKey.ts, .ekey = pBlock->maxKey.ts}; setComposedBlockFlag(pReader, false); setBlockAllDumped(&pStatus->fBlockDumpInfo, pBlock->maxKey.ts, pReader->order); diff --git a/tests/script/tsim/parser/regressiontest.sim b/tests/script/tsim/parser/regressiontest.sim index 1d84ae88cbca10767196714725ebc8281437a694..29937af10e43b6a0cc3a9cf428f0e19b5e0789ff 100644 --- a/tests/script/tsim/parser/regressiontest.sim +++ b/tests/script/tsim/parser/regressiontest.sim @@ -122,4 +122,28 @@ if $data01 != 199 then return -1 endi +sql drop table t1 + +$rowNum = 8200 +$ts0 = 1537146000000 +sql create table t1 (ts timestamp, c1 int) + +$i = 0 +$ts = $ts0 + +$x = 0 +while $x < $rowNum +$xs = $x * $delta +$ts = $ts0 + $xs +sql insert into t1 values ( $ts , $x ) +$x = $x + 1 +endw + +sql delete from t1 where ts<=1537146409500 + +sql flush database $db + +print =====================================>TD-22007 +sql select count(*) from t1 interval(10a) + system sh/exec.sh -n dnode1 -s stop -x SIGINT