enh: query information_schema.ins_tags optimize
This commit is contained in:
parent
48c9373680
commit
06bb551b70
|
@ -407,6 +407,10 @@ static int32_t collectMetaKeyFromShowTags(SCollectMetaKeyCxt* pCxt, SShowStmt* p
|
|||
if (TSDB_CODE_SUCCESS == code) {
|
||||
code = reserveDbVgInfoInCache(pCxt->pParseCxt->acctId, ((SValueNode*)pStmt->pDbName)->literal, pCxt->pMetaCache);
|
||||
}
|
||||
if (TSDB_CODE_SUCCESS == code && NULL != pStmt->pTbName) {
|
||||
code = reserveTableVgroupInCache(pCxt->pParseCxt->acctId, ((SValueNode*)pStmt->pDbName)->literal,
|
||||
((SValueNode*)pStmt->pTbName)->literal, pCxt->pMetaCache);
|
||||
}
|
||||
return code;
|
||||
}
|
||||
|
||||
|
|
|
@ -2143,7 +2143,7 @@ static bool sysTableFromDnode(const char* pTable) { return 0 == strcmp(pTable, T
|
|||
|
||||
static int32_t getTagsTableVgroupListImpl(STranslateContext* pCxt, SName* pTargetName, SName* pName,
|
||||
SArray** pVgroupList) {
|
||||
if (0 == pTargetName->acctId) {
|
||||
if (0 == pTargetName->type) {
|
||||
return getDBVgInfoImpl(pCxt, pName, pVgroupList);
|
||||
}
|
||||
|
||||
|
@ -2208,6 +2208,9 @@ static int32_t getTagsTableTargetNameFromCond(STranslateContext* pCxt, SLogicCon
|
|||
|
||||
SNode* pNode = NULL;
|
||||
FOREACH(pNode, pCond->pParameterList) { getTagsTableTargetObjName(pCxt, pNode, pName); }
|
||||
if ('\0' == pName->dbname[0]) {
|
||||
pName->type = 0;
|
||||
}
|
||||
return TSDB_CODE_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
|
@ -196,6 +196,12 @@ TEST_F(ParserShowToUseTest, showTableDistributed) {
|
|||
run("SHOW TABLE DISTRIBUTED st1");
|
||||
}
|
||||
|
||||
TEST_F(ParserShowToUseTest, showTags) {
|
||||
useDb("root", "test");
|
||||
|
||||
run("SHOW TAGS FROM st1s1");
|
||||
}
|
||||
|
||||
// todo SHOW topics
|
||||
|
||||
TEST_F(ParserShowToUseTest, showUsers) {
|
||||
|
@ -213,9 +219,9 @@ TEST_F(ParserShowToUseTest, showVariables) {
|
|||
TEST_F(ParserShowToUseTest, showVgroups) {
|
||||
useDb("root", "test");
|
||||
|
||||
run("SHOW vgroups");
|
||||
run("SHOW VGROUPS");
|
||||
|
||||
run("SHOW test.vgroups");
|
||||
run("SHOW test.VGROUPS");
|
||||
}
|
||||
|
||||
TEST_F(ParserShowToUseTest, showVnodes) {
|
||||
|
|
|
@ -86,6 +86,7 @@ static void parseArg(int argc, char* argv[]) {
|
|||
{"dump", no_argument, NULL, 'd'},
|
||||
{"async", required_argument, NULL, 'a'},
|
||||
{"skipSql", required_argument, NULL, 's'},
|
||||
{"log", required_argument, NULL, 'l'},
|
||||
{0, 0, 0, 0}
|
||||
};
|
||||
// clang-format on
|
||||
|
@ -100,6 +101,9 @@ static void parseArg(int argc, char* argv[]) {
|
|||
case 's':
|
||||
setSkipSqlNum(optarg);
|
||||
break;
|
||||
case 'l':
|
||||
setLogLevel(optarg);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue