提交 a901745a 编写于 作者: H Haojun Liao

[td-225] refactor.

上级 1d002f4a
......@@ -7164,6 +7164,7 @@ int32_t loadAllTableMeta(SSqlObj* pSql, struct SSqlInfo* pInfo) {
int32_t numOfTables = taosArrayGetSize(tableNameList);
STableMeta* pTableMeta = calloc(1, maxSize);
SArray* plist = taosArrayInit(4, sizeof(SName));
for(int32_t i = 0; i < numOfTables; ++i) {
SName* pname = taosArrayGet(tableNameList, i);
tNameExtractFullName(pname, name);
......@@ -7183,9 +7184,16 @@ int32_t loadAllTableMeta(SSqlObj* pSql, struct SSqlInfo* pInfo) {
STableMeta* pMeta = tscTableMetaDup(pTableMeta);
taosHashPut(pCmd->pTableMetaMap, name, strlen(name), &pMeta, POINTER_BYTES);
} else {// add to the retrieve table meta array list.
taosArrayPush(plist, pname);
}
}
// load the table meta for a given table name list
if (taosArrayGetSize(plist) > 0) {
doGetTableMetaFromMnode();
}
// return getTableMetaFromMnode(pSql, pTableMetaInfo);
return TSDB_CODE_SUCCESS;
}
......
......@@ -2411,7 +2411,7 @@ static int32_t getTableMetaFromMnode(SSqlObj *pSql, STableMetaInfo *pTableMetaIn
}
STableMetaInfo *pNewMeterMetaInfo = tscAddEmptyMetaInfo(pNewQueryInfo);
assert(/*pNew->cmd.numOfClause == 1 && */pNewQueryInfo->numOfTables == 1);
assert(pNewQueryInfo->numOfTables == 1);
tNameAssign(&pNewMeterMetaInfo->name, &pTableMetaInfo->name);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册