Merge branch 'v1.8' into dev

This commit is contained in:
taojinlong 2022-03-02 11:11:04 +08:00
commit 51bda15879

View File

@ -624,7 +624,7 @@ public class JdbcProvider extends DatasourceProvider {
if (StringUtils.isEmpty(oracleConfiguration.getSchema())) {
throw new Exception(Translator.get("i18n_schema_is_empty"));
}
return "select table_name, owner, comments from all_tab_comments where owner='" + oracleConfiguration.getSchema() + "' AND table_type = 'TABLE'";
return "select table_name, owner, comments from all_tab_comments where owner='OWNER' AND table_type = 'TABLE' AND table_name in (select table_name from all_tables where owner='OWNER')".replaceAll("OWNER", oracleConfiguration.getSchema());
case pg:
PgConfiguration pgConfiguration = new Gson().fromJson(datasourceRequest.getDatasource().getConfiguration(), PgConfiguration.class);
if (StringUtils.isEmpty(pgConfiguration.getSchema())) {