From 89a55172ea53f89303165c6d93bcfbd2398c4de2 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Wed, 12 Aug 2020 23:00:23 +0800 Subject: [PATCH 1/2] [td-225] add some test case. --- tests/script/general/parser/lastrow_query.sim | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/script/general/parser/lastrow_query.sim b/tests/script/general/parser/lastrow_query.sim index 72e8b4de95..9f52e45b80 100644 --- a/tests/script/general/parser/lastrow_query.sim +++ b/tests/script/general/parser/lastrow_query.sim @@ -51,7 +51,14 @@ if $data09 != NCHAR then return -1 endi +# regression test case 1 sql select count(*) from lr_tb1 where ts>'2018-09-18 08:45:00.1' and ts<'2018-09-18 08:45:00.2' if $row != 0 then return -1 endi + +# regression test case 2 +sql select count(*) from lr_db0.lr_stb0 where ts>'2018-9-18 8:00:00' and ts<'2018-9-18 14:00:00' interval(1s) fill(NULL); +if $row != 21600 then + return -1 +endi \ No newline at end of file From 86032d83e575323b720b161fce3d4f13afc5b24d Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Thu, 13 Aug 2020 00:35:10 +0800 Subject: [PATCH 2/2] [td-225] restrict the number of tags assignment. --- src/query/src/qFill.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/query/src/qFill.c b/src/query/src/qFill.c index ac44feb576..d28d99ceb8 100644 --- a/src/query/src/qFill.c +++ b/src/query/src/qFill.c @@ -131,7 +131,7 @@ void taosFillCopyInputDataFromOneFilePage(SFillInfo* pFillInfo, tFilePage* pInpu assert(pFillInfo->numOfRows == pInput->num); int32_t t = 0; - for(int32_t i = 0; i < pFillInfo->numOfCols; ++i) { + for(int32_t i = 0; i < pFillInfo->numOfCols && t < pFillInfo->numOfTags; ++i) { SFillColInfo* pCol = &pFillInfo->pFillCol[i]; char* s = pInput->data + pCol->col.offset * pInput->num;