You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Jørgen Løland (JIRA)" <ji...@apache.org> on 2007/04/26 14:17:15 UTC
[jira] Updated: (DERBY-1484) Client and embedded behave differently
when the table name is null in DatabaseMetaData methods
[ https://issues.apache.org/jira/browse/DERBY-1484?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jørgen Løland updated DERBY-1484:
---------------------------------
Attachment: DERBY-1484.stat
DERBY-1484.diff
I checked all the methods in DatabasaMetaData. The methods that currently allow null values for table name, but should not (according to the JDBC API), are:
Already mentioned in this issue: getBestRowIdentifier, getColumnPrivileges, getIndexInfo, getVersionColumns or getPrimaryKeys
Not previously mentioned in this issue: getImportedKeys and getExportedKeys
I have attached a patch that checks for null-values and throws an SQLException with SQLState TABLE_NAME_CANNOT_BE_NULL. This fails with 106 errors, mainly because org.apache.derbyTesting.junit.JDBC.dropSchema(JDBC.java:224) uses getExportedKeys with table value null. The junit tests must be changed before the patch can be included.
> Client and embedded behave differently when the table name is null in DatabaseMetaData methods
> ----------------------------------------------------------------------------------------------
>
> Key: DERBY-1484
> URL: https://issues.apache.org/jira/browse/DERBY-1484
> Project: Derby
> Issue Type: Bug
> Components: JDBC, Network Client
> Affects Versions: 10.2.1.6
> Reporter: Knut Anders Hatlen
> Assigned To: Jørgen Løland
> Priority: Minor
> Attachments: DERBY-1484.diff, DERBY-1484.stat
>
>
> When giving null as table name to getBestRowIdentifier, getColumnPrivileges, getIndexInfo, getVersionColumns or getPrimaryKeys, the client driver fails with "SQLException: Table name can not be null". Embedded uses null as a wildcard and does not fail. Embedded and client should have the same behaviour.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.