db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jørgen Løland (JIRA) <j...@apache.org>
Subject [jira] Updated: (DERBY-1484) Client and embedded behave differently when the table name is null in DatabaseMetaData methods
Date Thu, 26 Apr 2007 12:17:15 GMT

     [ 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.


Mime
View raw message