From f73506be5645dd7a68515f6df513eb2416813c23 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Mon, 2 Aug 2021 15:32:18 +0800 Subject: [PATCH 1/2] [td-5654]: fix the bug caused by unexpected error code. --- src/client/src/tscParseInsert.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/client/src/tscParseInsert.c b/src/client/src/tscParseInsert.c index 40092c5860..114b74ae03 100644 --- a/src/client/src/tscParseInsert.c +++ b/src/client/src/tscParseInsert.c @@ -582,9 +582,7 @@ int32_t tsParseValues(char **str, STableDataBlocks *pDataBlock, int maxRows, SSq sToken = tStrGetToken(*str, &index, false); *str += index; if (sToken.n == 0 || sToken.type != TK_RP) { - tscSQLSyntaxErrMsg(pCmd->payload, ") expected", *str); - code = TSDB_CODE_TSC_SQL_SYNTAX_ERROR; - return -1; + return tscSQLSyntaxErrMsg(pCmd->payload, ") expected", *str); } (*numOfRows)++; From 2e9e8434b4f6031cc25b6114b9ca86fd6ff188a3 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Mon, 2 Aug 2021 15:44:28 +0800 Subject: [PATCH 2/2] [td-5707]: fix bug in interp query while only one row exists in a table. --- src/tsdb/src/tsdbRead.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/tsdb/src/tsdbRead.c b/src/tsdb/src/tsdbRead.c index 0892182f03..be686fcffd 100644 --- a/src/tsdb/src/tsdbRead.c +++ b/src/tsdb/src/tsdbRead.c @@ -2373,7 +2373,7 @@ static void destroyHelper(void* param) { free(param); } -static bool loadBlockOfActiveTable(STsdbQueryHandle* pQueryHandle) { +static bool loadBlockOfActiveTable(STsdbQueryHandle* pQueryHandle) { if (pQueryHandle->checkFiles) { // check if the query range overlaps with the file data block bool exists = true; @@ -2385,6 +2385,7 @@ static bool loadBlockOfActiveTable(STsdbQueryHandle* pQueryHandle) { } if (exists) { + tsdbRetrieveDataBlock((TsdbQueryHandleT) pQueryHandle, NULL); if (pQueryHandle->currentLoadExternalRows && pQueryHandle->window.skey == pQueryHandle->window.ekey) { SColumnInfoData* pColInfo = taosArrayGet(pQueryHandle->pColumns, 0); assert(*(int64_t*)pColInfo->pData == pQueryHandle->window.skey);