Merge pull request #1227 from taosdata/feature/lihui

[#1197]
This commit is contained in:
Bomin Zhang 2020-02-14 10:59:31 +08:00 committed by GitHub
commit ccd59c87fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -1655,7 +1655,7 @@ int32_t addExprAndResultField(SQueryInfo* pQueryInfo, int32_t colIdx, tSQLExprIt
SSchema* pSchema = tsGetSchema(pMeterMetaInfo->pMeterMeta);
// functions can not be applied to tags
if (index.columnIndex >= pMeterMetaInfo->pMeterMeta->numOfColumns) {
if ((index.columnIndex >= pMeterMetaInfo->pMeterMeta->numOfColumns) || (index.columnIndex < 0)) {
return invalidSqlErrMsg(pQueryInfo->msg, msg6);
}
@ -5663,4 +5663,4 @@ int32_t doCheckForQuery(SSqlObj* pSql, SQuerySQL* pQuerySql, int32_t index) {
bool hasDefaultQueryTimeRange(SQueryInfo *pQueryInfo) {
return (pQueryInfo->stime == 0 && pQueryInfo->etime == INT64_MAX) ||
(pQueryInfo->stime == INT64_MAX && pQueryInfo->etime == 0);
}
}