Merge pull request #4283 from taosdata/hotfix/regressionbug

[TD-225]
This commit is contained in:
haojun Liao 2020-11-19 10:21:56 +08:00 committed by GitHub
commit 5ea20ca49a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -790,7 +790,7 @@ int tscBuildQueryMsg(SSqlObj *pSql, SSqlInfo *pInfo) {
size_t output = tscNumOfFields(pQueryInfo);
if ((tscIsSecondStageQuery(pQueryInfo) || UTIL_TABLE_IS_NORMAL_TABLE(pTableMetaInfo) ||
UTIL_TABLE_IS_CHILD_TABLE(pTableMetaInfo)) && (output != tscSqlExprNumOfExprs(pQueryInfo))) {
UTIL_TABLE_IS_CHILD_TABLE(pTableMetaInfo))) {
pQueryMsg->secondStageOutput = htonl((int32_t) output);
SSqlFuncMsg *pSqlFuncExpr1 = (SSqlFuncMsg *)pMsg;

View File

@ -5336,8 +5336,11 @@ static char *getArithemicInputSrc(void *param, const char *name, int32_t colId)
}
static void doSecondaryArithmeticProcess(SQuery* pQuery) {
SArithmeticSupport arithSup = {0};
if (pQuery->numOfExpr2 == 0) {
return;
}
SArithmeticSupport arithSup = {0};
tFilePage **data = calloc(pQuery->numOfExpr2, POINTER_BYTES);
for (int32_t i = 0; i < pQuery->numOfExpr2; ++i) {
int32_t bytes = pQuery->pExpr2[i].bytes;