[fix](multi-catalog) fix show data on external catalog (#15227)
if switch external catalog, and use a database that has same name with one database of internal catalog, query 'show data', will get data info from internal catalog.
This commit is contained in:
@ -99,6 +99,8 @@ public class ShowDataStmt extends ShowStmt {
|
||||
// disallow external catalog
|
||||
Util.prohibitExternalCatalog(tableName.getCtl(), this.getClass().getSimpleName());
|
||||
dbName = tableName.getDb();
|
||||
} else {
|
||||
Util.prohibitExternalCatalog(analyzer.getDefaultCatalog(), this.getClass().getSimpleName());
|
||||
}
|
||||
|
||||
Database db = Env.getCurrentInternalCatalog().getDbOrAnalysisException(dbName);
|
||||
|
||||
Reference in New Issue
Block a user