[td-225]fix crash during query.
This commit is contained in:
parent
1337f2ec11
commit
f7580dc437
|
@ -423,18 +423,6 @@ int32_t tscValidateSqlInfo(SSqlObj* pSql, struct SSqlInfo* pInfo) {
|
||||||
if(code != TSDB_CODE_SUCCESS) {
|
if(code != TSDB_CODE_SUCCESS) {
|
||||||
return code;
|
return code;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pInfo->pMiscInfo->tableType == TSDB_SUPER_TABLE) {
|
|
||||||
//// code = tscGetTableMeta(pSql, pTableMetaInfo);
|
|
||||||
//// if (code != TSDB_CODE_SUCCESS) {
|
|
||||||
//// return code;
|
|
||||||
//// }
|
|
||||||
//
|
|
||||||
// if (!UTIL_TABLE_IS_SUPER_TABLE(pTableMetaInfo)) {
|
|
||||||
// return invalidOperationMsg(tscGetErrorMsgPayload(pCmd), msg4);
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
|
|
||||||
} else if (pInfo->type == TSDB_SQL_DROP_DNODE) {
|
} else if (pInfo->type == TSDB_SQL_DROP_DNODE) {
|
||||||
if (pzName->type == TK_STRING) {
|
if (pzName->type == TK_STRING) {
|
||||||
pzName->n = strdequote(pzName->z);
|
pzName->n = strdequote(pzName->z);
|
||||||
|
@ -772,6 +760,7 @@ int32_t tscValidateSqlInfo(SSqlObj* pSql, struct SSqlInfo* pInfo) {
|
||||||
pCmd->active = pCmd->pQueryInfo;
|
pCmd->active = pCmd->pQueryInfo;
|
||||||
pCmd->command = pCmd->pQueryInfo->command;
|
pCmd->command = pCmd->pQueryInfo->command;
|
||||||
|
|
||||||
|
STableMetaInfo* pTableMetaInfo = tscGetMetaInfo(pCmd->active, 0);
|
||||||
if (pTableMetaInfo->pTableMeta != NULL) {
|
if (pTableMetaInfo->pTableMeta != NULL) {
|
||||||
pSql->res.precision = tscGetTableInfo(pTableMetaInfo->pTableMeta).precision;
|
pSql->res.precision = tscGetTableInfo(pTableMetaInfo->pTableMeta).precision;
|
||||||
}
|
}
|
||||||
|
@ -7793,7 +7782,7 @@ int32_t validateSqlNode(SSqlObj* pSql, SSqlNode* pSqlNode, SQueryInfo* pQueryInf
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// todo derivate funtion requires ts column exists in subquery
|
// todo derivative function requires ts column exists in subquery
|
||||||
STableMeta* pTableMeta = tscGetMetaInfo(pQueryInfo, 0)->pTableMeta;
|
STableMeta* pTableMeta = tscGetMetaInfo(pQueryInfo, 0)->pTableMeta;
|
||||||
SSchema* pSchema = tscGetTableColumnSchema(pTableMeta, 0);
|
SSchema* pSchema = tscGetTableColumnSchema(pTableMeta, 0);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue