diff --git a/source/libs/parser/src/parTranslater.c b/source/libs/parser/src/parTranslater.c index e5aa153ea2..fab0236078 100755 --- a/source/libs/parser/src/parTranslater.c +++ b/source/libs/parser/src/parTranslater.c @@ -3792,7 +3792,7 @@ static int32_t dnodeToVgroupsInfo(SArray* pDnodes, SVgroupsInfo** pVgsInfo) { static bool sysTableFromVnode(const char* pTable) { return ((0 == strcmp(pTable, TSDB_INS_TABLE_TABLES)) || (0 == strcmp(pTable, TSDB_INS_TABLE_TAGS)) || - (0 == strcmp(pTable, TSDB_INS_TABLE_COLS))); + (0 == strcmp(pTable, TSDB_INS_TABLE_COLS)) || 0 == strcmp(pTable, TSDB_INS_TABLE_USAGE)); } static bool sysTableFromDnode(const char* pTable) { return 0 == strcmp(pTable, TSDB_INS_TABLE_DNODE_VARIABLES); } @@ -3864,7 +3864,7 @@ static int32_t setVnodeSysTableVgroupList(STranslateContext* pCxt, SName* pName, if (TSDB_CODE_SUCCESS == code && (0 == strcmp(pRealTable->table.tableName, TSDB_INS_TABLE_TABLES) && !hasUserDbCond) || - 0 == strcmp(pRealTable->table.tableName, TSDB_INS_TABLE_COLS) || 0 == strcmp(pRealTable->table.tableName, TSDB_INS_TABLE_USAGE)) { + 0 == strcmp(pRealTable->table.tableName, TSDB_INS_TABLE_COLS) || (0 == strcmp(pRealTable->table.tableName, TSDB_INS_TABLE_USAGE) && !hasUserDbCond) ) { code = addMnodeToVgroupList(&pCxt->pParseCxt->mgmtEpSet, &pVgs); }