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 "Knut Anders Hatlen (JIRA)" <de...@db.apache.org> on 2006/07/07 15:00:29 UTC

[jira] Created: (DERBY-1484) Client and embedded behave differently when the table name is null in DatabaseMetaData methods

Client and embedded behave differently when the table name is null in DatabaseMetaData methods
----------------------------------------------------------------------------------------------

         Key: DERBY-1484
         URL: http://issues.apache.org/jira/browse/DERBY-1484
     Project: Derby
        Type: Bug

  Components: JDBC, Network Client  
    Versions: 10.2.0.0    
    Reporter: Knut Anders Hatlen
    Priority: Minor


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


Re: [jira] Updated: (DERBY-1484) Client and embedded behave differently when the table name is null in DatabaseMetaData methods

Posted by Jørgen Løland <Jo...@Sun.COM>.
Myrna van Lunteren wrote:
> Jørgen,
> I think a Release note is needed for every change that actually
> changes behavior - incl. undocumented  and incorrect behavior.
> Release Notes are a help to users to identify those changes in
> behavior that could impact them when upgrading.
> Needing a release note for a subtask, or a test, or documentation
> change is debatable, but I think this one could have a short release
> note. Please see DERBY-2570 for the template.
> 
> Thx,
> Myrna
> 

Thank you for commenting on this, Myrna.

ReleaseNote text attempt:

Summary of Change
Tablenames can no longer be null in calls to DatabaseMetaData methods 
getBestRowIdentifier(), getColumnPrivileges(), getIndexInfo(), 
getVersionColumns(), getPrimaryKeys(), getImportedKeys() and 
getExportedKeys().

*Comment: The above is a rather long one-liner, but I think all the 
information is required*

Symptoms Seen by Applications Affected by Change
In the previous release, the methods returned information on all tables 
in the schema if the tablename parameter was null. Derby now raises an 
SQLException if the tablename is null.

Incompatibilities with Previous Release
Calls to the specified methods now fail if the tablename parameter is null.

Rationale for Change
The previous behavior violated the JDBC standard. The new behavior is 
correct.

Application Changes Required
Users must recode applications to specify the table names. When 
information on multiple tables is required, the application first has to 
get the table names, e.g. by using the DatabaseMetaData method 
getTables(), and then use the returned table names as input to the 
method in question.

Re: [jira] Updated: (DERBY-1484) Client and embedded behave differently when the table name is null in DatabaseMetaData methods

Posted by Myrna van Lunteren <m....@gmail.com>.
On 5/3/07, Jørgen Løland (JIRA) <ji...@apache.org> wrote:
> Changes undocumented functionality to behave according to specification. Hence, I do not think a release note is required.

Jørgen,
I think a Release note is needed for every change that actually
changes behavior - incl. undocumented  and incorrect behavior.
Release Notes are a help to users to identify those changes in
behavior that could impact them when upgrading.
Needing a release note for a subtask, or a test, or documentation
change is debatable, but I think this one could have a short release
note. Please see DERBY-2570 for the template.

Thx,
Myrna

[jira] Commented: (DERBY-1484) Client and embedded behave differently when the table name is null in DatabaseMetaData methods

Posted by "Daniel John Debrunner (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-1484?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12494074 ] 

Daniel John Debrunner commented on DERBY-1484:
----------------------------------------------

OK - I now see DERBY-2610 is opened to fix the pattern issue.

> 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, 10.3.0.0
>            Reporter: Knut Anders Hatlen
>         Assigned To: Jørgen Løland
>            Priority: Minor
>             Fix For: 10.3.0.0
>
>         Attachments: DERBY-1484-2.diff, DERBY-1484-2.stat, DERBY-1484-3.diff, DERBY-1484-3.stat, DERBY-1484.diff, DERBY-1484.stat, releaseNote.html
>
>
> 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.


[jira] Updated: (DERBY-1484) Client and embedded behave differently when the table name is null in DatabaseMetaData methods

Posted by "Jørgen Løland (JIRA)" <ji...@apache.org>.
     [ 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: releaseNote.html

Revised the release note to better reflect the changes in this issue and 2610.

> 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, 10.3.0.0
>            Reporter: Knut Anders Hatlen
>         Assigned To: Jørgen Løland
>            Priority: Minor
>             Fix For: 10.3.0.0
>
>         Attachments: DERBY-1484-2.diff, DERBY-1484-2.stat, DERBY-1484-3.diff, DERBY-1484-3.stat, DERBY-1484-4_ExcFact.diff, DERBY-1484-4_ExcFact.stat, DERBY-1484.diff, DERBY-1484.stat, releaseNote.html, releaseNote.html
>
>
> 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.


[jira] Commented: (DERBY-1484) Client and embedded behave differently when the table name is null in DatabaseMetaData methods

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-1484?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12495363 ] 

Knut Anders Hatlen commented on DERBY-1484:
-------------------------------------------

Hi Jørgen,

The patch generally looks good. My only comment is that I think you should use Util.generateCsSQLException() instead of PublicAPI.wrapStandardException(). The former will use the SQLExceptionFactory so that we get the correct SQLException type in the JDBC 4.0 driver. The latter always generates an EmbedSQLException, and comments in EmbedSQLException and StandardException indicate that it's just a hack for Cloudscape 3.0.1 that was supposed to be cleaned up later.

> 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, 10.3.0.0
>            Reporter: Knut Anders Hatlen
>         Assigned To: Jørgen Løland
>            Priority: Minor
>             Fix For: 10.3.0.0
>
>         Attachments: DERBY-1484-2.diff, DERBY-1484-2.stat, DERBY-1484-3.diff, DERBY-1484-3.stat, DERBY-1484.diff, DERBY-1484.stat, releaseNote.html
>
>
> 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.


[jira] Updated: (DERBY-1484) Client and embedded behave differently when the table name is null in DatabaseMetaData methods

Posted by "Jørgen Løland (JIRA)" <ji...@apache.org>.
     [ 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-4_ExcFact.stat
                DERBY-1484-4_ExcFact.diff

The patch changes PublicAPI.wrapStandardException to Util.generateCsSQLException. derbyall and suites.all run cleanly (except bootLock which always fails)

> 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, 10.3.0.0
>            Reporter: Knut Anders Hatlen
>         Assigned To: Jørgen Løland
>            Priority: Minor
>             Fix For: 10.3.0.0
>
>         Attachments: DERBY-1484-2.diff, DERBY-1484-2.stat, DERBY-1484-3.diff, DERBY-1484-3.stat, DERBY-1484-4_ExcFact.diff, DERBY-1484-4_ExcFact.stat, DERBY-1484.diff, DERBY-1484.stat, releaseNote.html
>
>
> 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.


[jira] Updated: (DERBY-1484) Client and embedded behave differently when the table name is null in DatabaseMetaData methods

Posted by "Jørgen Løland (JIRA)" <ji...@apache.org>.
     [ 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.


[jira] Updated: (DERBY-1484) Client and embedded behave differently when the table name is null in DatabaseMetaData methods

Posted by "Myrna van Lunteren (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-1484?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Myrna van Lunteren updated DERBY-1484:
--------------------------------------

    Attachment: releaseNote.html

Although 1 release note for DERBY-1484 and DERBY-2610 makes perfect sense, it messes up the automating generation of release notes (see DERBY-2570). 
I could switch off the 'existing application impact' of one of the two, but I think that would give the incorrect impression to someone looking up the JIRA issue.
So, I'm attaching a separate releaseNotes.html for each, based on the latest combined release note.

> 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, 10.3.0.0
>            Reporter: Knut Anders Hatlen
>         Assigned To: Jørgen Løland
>            Priority: Minor
>             Fix For: 10.3.0.0
>
>         Attachments: DERBY-1484-2.diff, DERBY-1484-2.stat, DERBY-1484-3.diff, DERBY-1484-3.stat, DERBY-1484-4_ExcFact.diff, DERBY-1484-4_ExcFact.stat, DERBY-1484.diff, DERBY-1484.stat, releaseNote.html, releaseNote.html, releaseNote.html
>
>
> 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.


[jira] Resolved: (DERBY-1484) Client and embedded behave differently when the table name is null in DatabaseMetaData methods

Posted by "Kristian Waagan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-1484?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kristian Waagan resolved DERBY-1484.
------------------------------------

    Resolution: Fixed
    Derby Info: [Release Note Needed]  (was: [Release Note Needed, Patch Available])

Committed 'DERBY-1484-4_ExcFact.diff' to trunk with revision 537882.
Ran suites.All without failures (Java SE 5.0 and 6), ran derbyall together with DERBY-2610 without failures (Java SE 5.0).

> 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, 10.3.0.0
>            Reporter: Knut Anders Hatlen
>         Assigned To: Jørgen Løland
>            Priority: Minor
>             Fix For: 10.3.0.0
>
>         Attachments: DERBY-1484-2.diff, DERBY-1484-2.stat, DERBY-1484-3.diff, DERBY-1484-3.stat, DERBY-1484-4_ExcFact.diff, DERBY-1484-4_ExcFact.stat, DERBY-1484.diff, DERBY-1484.stat, releaseNote.html
>
>
> 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.


[jira] Closed: (DERBY-1484) Client and embedded behave differently when the table name is null in DatabaseMetaData methods

Posted by "Knut Anders Hatlen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-1484?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen closed DERBY-1484.
-------------------------------------


> 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, 10.3.0.0
>            Reporter: Knut Anders Hatlen
>            Assignee: Jørgen Løland
>            Priority: Minor
>             Fix For: 10.3.0.0
>
>         Attachments: DERBY-1484-2.diff, DERBY-1484-2.stat, DERBY-1484-3.diff, DERBY-1484-3.stat, DERBY-1484-4_ExcFact.diff, DERBY-1484-4_ExcFact.stat, DERBY-1484.diff, DERBY-1484.stat, releaseNote.html, releaseNote.html, releaseNote.html
>
>
> 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.


[jira] Updated: (DERBY-1484) Client and embedded behave differently when the table name is null in DatabaseMetaData methods

Posted by "Jørgen Løland (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-1484?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jørgen Løland updated DERBY-1484:
---------------------------------

    Derby Info: [Patch Available, Release Note Needed]  (was: [Patch Available])

> 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-2.diff, DERBY-1484-2.stat, DERBY-1484-3.diff, DERBY-1484-3.stat, 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.


[jira] Updated: (DERBY-1484) Client and embedded behave differently when the table name is null in DatabaseMetaData methods

Posted by "Jørgen Løland (JIRA)" <ji...@apache.org>.
     [ 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-2.stat
                DERBY-1484-2.diff

Changed to correct indentation

> 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-2.diff, DERBY-1484-2.stat, 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.


[jira] Commented: (DERBY-1484) Client and embedded behave differently when the table name is null in DatabaseMetaData methods

Posted by "Jørgen Løland (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-1484?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12494196 ] 

Jørgen Løland commented on DERBY-1484:
--------------------------------------

Dan,
Thanks for taking the time to comment on the release note.

I see that I was not explicit about what would make the behavior correct. Since these two issues are so closely related I figured one release note would suffice. I will write a new release note (one for each issue) if that is considered more correct. 

Jørgen


> 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, 10.3.0.0
>            Reporter: Knut Anders Hatlen
>         Assigned To: Jørgen Løland
>            Priority: Minor
>             Fix For: 10.3.0.0
>
>         Attachments: DERBY-1484-2.diff, DERBY-1484-2.stat, DERBY-1484-3.diff, DERBY-1484-3.stat, DERBY-1484.diff, DERBY-1484.stat, releaseNote.html
>
>
> 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.


[jira] Updated: (DERBY-1484) Client and embedded behave differently when the table name is null in DatabaseMetaData methods

Posted by "Jørgen Løland (JIRA)" <ji...@apache.org>.
     [ 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: releaseNote.html

> 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-2.diff, DERBY-1484-2.stat, DERBY-1484-3.diff, DERBY-1484-3.stat, DERBY-1484.diff, DERBY-1484.stat, releaseNote.html
>
>
> 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.


[jira] Commented: (DERBY-1484) Client and embedded behave differently when the table name is null in DatabaseMetaData methods

Posted by "Jørgen Løland (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-1484?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12493591 ] 

Jørgen Løland commented on DERBY-1484:
--------------------------------------

DERBY-2222 *must* be committed before this patch!

> 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-2.diff, DERBY-1484-2.stat, DERBY-1484-3.diff, DERBY-1484-3.stat, 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.


[jira] Commented: (DERBY-1484) Client and embedded behave differently when the table name is null in DatabaseMetaData methods

Posted by "Jørgen Løland (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-1484?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12495880 ] 

Jørgen Løland commented on DERBY-1484:
--------------------------------------

Hi Kristian,
Thank you for committing this patch.

> 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, 10.3.0.0
>            Reporter: Knut Anders Hatlen
>         Assigned To: Jørgen Løland
>            Priority: Minor
>             Fix For: 10.3.0.0
>
>         Attachments: DERBY-1484-2.diff, DERBY-1484-2.stat, DERBY-1484-3.diff, DERBY-1484-3.stat, DERBY-1484-4_ExcFact.diff, DERBY-1484-4_ExcFact.stat, DERBY-1484.diff, DERBY-1484.stat, releaseNote.html
>
>
> 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.


[jira] Updated: (DERBY-1484) Client and embedded behave differently when the table name is null in DatabaseMetaData methods

Posted by "Jørgen Løland (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-1484?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jørgen Løland updated DERBY-1484:
---------------------------------

           Derby Info: [Patch Available, Release Note Needed]  (was: [Release Note Needed, Patch Available])
    Affects Version/s: 10.3.0.0
        Fix Version/s: 10.3.0.0

> 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, 10.3.0.0
>            Reporter: Knut Anders Hatlen
>         Assigned To: Jørgen Løland
>            Priority: Minor
>             Fix For: 10.3.0.0
>
>         Attachments: DERBY-1484-2.diff, DERBY-1484-2.stat, DERBY-1484-3.diff, DERBY-1484-3.stat, DERBY-1484.diff, DERBY-1484.stat, releaseNote.html
>
>
> 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.


[jira] Commented: (DERBY-1484) Client and embedded behave differently when the table name is null in DatabaseMetaData methods

Posted by "Daniel John Debrunner (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-1484?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12469656 ] 

Daniel John Debrunner commented on DERBY-1484:
----------------------------------------------

The network client has the correct behaviour. the tableName parameters to these methods is not a pattern and is required to be an exact match to the stored table name, thus null is not allowed. This was discussed on the list in this thread:

http://mail-archives.apache.org/mod_mbox/db-derby-dev/200701.mbox/%3c45AD1A46.3060007@sun.com%3e

> 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
>            Priority: Minor
>
> 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.


[jira] Updated: (DERBY-1484) Client and embedded behave differently when the table name is null in DatabaseMetaData methods

Posted by "Jørgen Løland (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-1484?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jørgen Løland updated DERBY-1484:
---------------------------------

    Derby Info: [Existing Application Impact, Release Note Needed]  (was: [Release Note Needed])

> 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, 10.3.0.0
>            Reporter: Knut Anders Hatlen
>         Assigned To: Jørgen Løland
>            Priority: Minor
>             Fix For: 10.3.0.0
>
>         Attachments: DERBY-1484-2.diff, DERBY-1484-2.stat, DERBY-1484-3.diff, DERBY-1484-3.stat, DERBY-1484-4_ExcFact.diff, DERBY-1484-4_ExcFact.stat, DERBY-1484.diff, DERBY-1484.stat, releaseNote.html, releaseNote.html
>
>
> 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.


[jira] Commented: (DERBY-1484) Client and embedded behave differently when the table name is null in DatabaseMetaData methods

Posted by "Daniel John Debrunner (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-1484?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12494069 ] 

Daniel John Debrunner commented on DERBY-1484:
----------------------------------------------

The release note indicates that the new behaviour is correct, but doesn't it still allow a pattern to be used, which does not conform to the standard?

> 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, 10.3.0.0
>            Reporter: Knut Anders Hatlen
>         Assigned To: Jørgen Løland
>            Priority: Minor
>             Fix For: 10.3.0.0
>
>         Attachments: DERBY-1484-2.diff, DERBY-1484-2.stat, DERBY-1484-3.diff, DERBY-1484-3.stat, DERBY-1484.diff, DERBY-1484.stat, releaseNote.html
>
>
> 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.


[jira] Updated: (DERBY-1484) Client and embedded behave differently when the table name is null in DatabaseMetaData methods

Posted by "Jørgen Løland (JIRA)" <ji...@apache.org>.
     [ 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-3.stat
                DERBY-1484-3.diff

The attached patch (3) includes all the changes in (2), and modifies a few harness tests that previously called getExportedKeys and getImportedKeys with table = null. 

Since only table == null triggers an exception, it is still possible to call these methods with a tablepattern, e.g. table="?". I will create a new issue for changing the internal query to not accept patterns.

Derbyall and allsuites run fine except the following (unrelated) fails:  allsuites fails two ProcedureInTriggerTests, but these have already been discussed in DERBY-1585 and should not be related to the patch. derbyall fails bootLock (as always here - maybe because of NFS?)



> 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-2.diff, DERBY-1484-2.stat, DERBY-1484-3.diff, DERBY-1484-3.stat, 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.


[jira] Assigned: (DERBY-1484) Client and embedded behave differently when the table name is null in DatabaseMetaData methods

Posted by "Jørgen Løland (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-1484?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jørgen Løland reassigned DERBY-1484:
------------------------------------

    Assignee: Jørgen Løland

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


[jira] Updated: (DERBY-1484) Client and embedded behave differently when the table name is null in DatabaseMetaData methods

Posted by "Jørgen Løland (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DERBY-1484?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jørgen Løland updated DERBY-1484:
---------------------------------

    Derby Info: [Patch Available]

Changes undocumented functionality to behave according to specification. Hence, I do not think a release note is required.

> 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-2.diff, DERBY-1484-2.stat, DERBY-1484-3.diff, DERBY-1484-3.stat, 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.