提交 a40f7854 编写于 作者: S shenglian zhou

[TS-1026](query,insert,other,connector,tools):fix app error of select from...

[TS-1026](query,insert,other,connector,tools):fix app error of select from (select * from empty_stable) by set subquery command to retrieve empty results
上级 764cc987
......@@ -951,9 +951,16 @@ int32_t tscValidateSqlInfo(SSqlObj* pSql, struct SSqlInfo* pInfo) {
return code;
}
// set the command/global limit parameters from the first subclause to the sqlcmd object
pCmd->active = pCmd->pQueryInfo;
pCmd->command = pCmd->pQueryInfo->command;
// set the command/global limit parameters from the first not empty subclause to the sqlcmd object
SQueryInfo* queryInfo = pCmd->pQueryInfo;
int16_t command = queryInfo->command;
while (command == TSDB_SQL_RETRIEVE_EMPTY_RESULT && queryInfo->sibling != NULL) {
queryInfo = queryInfo->sibling;
command = queryInfo->command;
}
pCmd->active = queryInfo;
pCmd->command = command;
STableMetaInfo* pTableMetaInfo1 = tscGetMetaInfo(pCmd->active, 0);
if (pTableMetaInfo1->pTableMeta != NULL) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册