Details
-
Bug
-
Status: In Progress
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
Description
From the DatabaseMetaData.getTables(String catalog, String schemaPattern, String tableNamePattern, String[] types) Javadoc: https://docs.oracle.com/javase/7/docs/api/java/sql/DatabaseMetaData.html#getTables(java.lang.String,%20java.lang.String,%20java.lang.String,%20java.lang.String[])
"retrieves those without a catalog; null means that the catalog name should not be used to narrow the search"
From the DatabaseMetaData.getSchemas(String catalog, String schemaPattern) javadoc:
https://docs.oracle.com/javase/7/docs/api/java/sql/DatabaseMetaData.html#getSchemas(java.lang.String,%20java.lang.String)
catalog - a catalog name; must match the catalog name as it is stored in the database;"" retrieves those without a catalog; null means catalog name should not be used to narrow down the search.
For example, for MySQL, if using empty string as default value for catalog and schema, DatabaseMetaData.getTables(String catalog, String schemaPattern, String tableNamePattern, String[] types) cannot return the expected table.
Compared to ""(empty string), NULL is a better default value for catalog and schema.
Attachments
Issue Links
- links to