fix : fix error caused by empty vgroups when no user tables
This commit is contained in:
parent
da80bbc4a2
commit
d9eae4dd4c
|
@ -1817,7 +1817,17 @@ static int32_t setVnodeSysTableVgroupList(STranslateContext* pCxt, SName* pName,
|
||||||
code = getDBVgInfoImpl(pCxt, pName, &vgroupList);
|
code = getDBVgInfoImpl(pCxt, pName, &vgroupList);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (TSDB_CODE_SUCCESS == code && 0 == strcmp(pRealTable->table.tableName, TSDB_INS_TABLE_TABLES)) {
|
if (TSDB_CODE_SUCCESS == code &&
|
||||||
|
0 == strcmp(pRealTable->table.dbName, TSDB_INFORMATION_SCHEMA_DB) &&
|
||||||
|
0 == strcmp(pRealTable->table.tableName, TSDB_INS_TABLE_TAGS) &&
|
||||||
|
isSelectStmt(pCxt->pCurrStmt) &&
|
||||||
|
0 == taosArrayGetSize(vgroupList)) {
|
||||||
|
((SSelectStmt*)pCxt->pCurrStmt)->isEmptyResult = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (TSDB_CODE_SUCCESS == code &&
|
||||||
|
0 == strcmp(pRealTable->table.dbName, TSDB_INFORMATION_SCHEMA_DB) &&
|
||||||
|
0 == strcmp(pRealTable->table.tableName, TSDB_INS_TABLE_TABLES)) {
|
||||||
code = addMnodeToVgroupList(&pCxt->pParseCxt->mgmtEpSet, &vgroupList);
|
code = addMnodeToVgroupList(&pCxt->pParseCxt->mgmtEpSet, &vgroupList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue