DatabaseMetaData.getTables() with passed in table type of SYNONYM returns
system tables and not SYNONYMS
--------------------------------------------------------------------------------------------------------
Key: DERBY-1790
URL: http://issues.apache.org/jira/browse/DERBY-1790
Project: Derby
Issue Type: Bug
Components: JDBC
Affects Versions: 10.1.3.1, 10.1.3.0, 10.1.2.1, 10.1.1.0, 10.2.1.0, 10.3.0.0
Reporter: Daniel John Debrunner
Priority: Minor
This database metadata call will not return SYNONYMS in the schema indicated.
rs = dmd.getTables((String) null, schema, (String) null,
new String[] {"SYNONYM"});
Work around is to pass in null as the last argument and then test for each row
"SYNONYM".equals(rs.getString("TABLE_TYPE"))
Due to code in EmbedDatabasemetaData aorund line 1721 that assume the type
character in SYS.SYSTABLES.TABLETYPE
is equal to the first character of the JDBC TABLE_TYPE name. This is true for
views and tables, but in the Derby system table
the character 'S' is used for system tables and 'A' for SYNONYMS.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira