[TD-6097]<fix> Crash occurs when the select function in the subquery is used with group by
This commit is contained in:
parent
e882659e14
commit
6a18e3d3d5
|
@ -2677,8 +2677,8 @@ int32_t addExprAndResultField(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, int32_t col
|
|||
assert(ids.num == 1);
|
||||
tscColumnListInsert(pQueryInfo->colList, ids.ids[0].columnIndex, pExpr->base.uid, pSchema);
|
||||
}
|
||||
|
||||
tscInsertPrimaryTsSourceColumn(pQueryInfo, pExpr->base.uid);
|
||||
|
||||
return TSDB_CODE_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -3060,7 +3060,6 @@ int32_t addExprAndResultField(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, int32_t col
|
|||
tscColumnListInsert(pQueryInfo->colList, index.columnIndex, uid, &s);
|
||||
}
|
||||
}
|
||||
|
||||
tscInsertPrimaryTsSourceColumn(pQueryInfo, pTableMetaInfo->pTableMeta->id.uid);
|
||||
return TSDB_CODE_SUCCESS;
|
||||
}
|
||||
|
@ -8418,7 +8417,7 @@ static STableMeta* extractTempTableMetaFromSubquery(SQueryInfo* pUpstream) {
|
|||
|
||||
n += 1;
|
||||
}
|
||||
|
||||
info->numOfColumns = n;
|
||||
return meta;
|
||||
}
|
||||
|
||||
|
@ -8447,8 +8446,6 @@ static int32_t doValidateSubquery(SSqlNode* pSqlNode, int32_t index, SSqlObj* pS
|
|||
return code;
|
||||
}
|
||||
|
||||
pSub->pDownstream = pQueryInfo;
|
||||
|
||||
// create dummy table meta info
|
||||
STableMetaInfo* pTableMetaInfo1 = calloc(1, sizeof(STableMetaInfo));
|
||||
if (pTableMetaInfo1 == NULL) {
|
||||
|
|
|
@ -1503,7 +1503,6 @@ void tscFreeSqlObj(SSqlObj* pSql) {
|
|||
tscFreeSqlResult(pSql);
|
||||
tscResetSqlCmd(pCmd, false);
|
||||
|
||||
memset(pCmd->payload, 0, (size_t)pCmd->allocSize);
|
||||
tfree(pCmd->payload);
|
||||
pCmd->allocSize = 0;
|
||||
|
||||
|
|
Loading…
Reference in New Issue