Open mainstreet439 opened 6 years ago
as originally noted at https://community.mapd.com/t/jdbc-driver-databasemetadata-gettables-returns-all-tables-irrespective-of-tablename-parameter-it-is-passed/926
MAPD version 3.3.1-20171108-32e7bcc
The following method call should return 0 rows because the specified tablename parameter does not correspond to a valid table/view. The method will return a Resultset of all objects because it fails to filter the response to specified tablename.
DatabaseMetadata dbMeta = dbConnection.getMetaData(); String [] tableTypes = { “SYNONYM”, “TABLE”, “VIEW” }; ResultSet tables = dbMeta.getTables( null, null, “NOSUCHTABLE”, tableTypes);
https://docs.oracle.com/javase/8/docs/api/java/sql/DatabaseMetaData.html#getTables-java.lang.String-java.lang.String-java.lang.String-java.lang.String:A-
Note related enhancement https://github.com/mapd/mapd-core/issues/138
as originally noted at https://community.mapd.com/t/jdbc-driver-databasemetadata-gettables-returns-all-tables-irrespective-of-tablename-parameter-it-is-passed/926
MAPD version 3.3.1-20171108-32e7bcc
The following method call should return 0 rows because the specified tablename parameter does not correspond to a valid table/view. The method will return a Resultset of all objects because it fails to filter the response to specified tablename.
DatabaseMetadata dbMeta = dbConnection.getMetaData(); String [] tableTypes = { “SYNONYM”, “TABLE”, “VIEW” }; ResultSet tables = dbMeta.getTables( null, null, “NOSUCHTABLE”, tableTypes);
https://docs.oracle.com/javase/8/docs/api/java/sql/DatabaseMetaData.html#getTables-java.lang.String-java.lang.String-java.lang.String-java.lang.String:A-