Skip to content

Commit

Permalink
Merge pull request #7108 from taosdata/fix/query
Browse files Browse the repository at this point in the history
[td-5654]<fix>: fix the bug caused by unexpected error code.
  • Loading branch information
hjxilinx authored Aug 2, 2021
2 parents 9847208 + 2e9e843 commit 5bae5cd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 1 addition & 3 deletions src/client/src/tscParseInsert.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)++;
Expand Down
3 changes: 2 additions & 1 deletion src/tsdb/src/tsdbRead.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
Expand Down

0 comments on commit 5bae5cd

Please sign in to comment.