Derby
  1. Derby
  2. DERBY-2610

Queries in metadata.properties allow tablepattern for JDBC methods that do not allow patterns

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: 10.2.2.0, 10.3.1.4
    • Fix Version/s: 10.3.1.4
    • Component/s: JDBC
    • Labels:
      None
    • Issue & fix info:
      Release Note Needed

      Description

      The DatabaseMetaData methods getBestRowIdentifier, getColumnPrivileges, getIndexInfo, getVersionColumns, getPrimaryKeys, getImportedKeys, getExportedKeys do not allow table name patterns. However, the SQL in metadata.properties implement these with "table like ?", thus allowing patterns. The SQL for these methods should be modified to "table=?".

      1. releaseNote.html
        3 kB
        Jørgen Løland
      2. releaseNote.html
        3 kB
        Myrna van Lunteren
      3. DERBY-2610-1.diff
        40 kB
        Jørgen Løland
      4. DERBY-2610-1.stat
        0.8 kB
        Jørgen Løland

        Issue Links

          Activity

          Hide
          Jørgen Løland added a comment -

          Patch (1) removes table-patterns from the queries used by the seven methods. Note that there is one exception to this: the foreign table name of getCrossReference is still a pattern because this query is used by getExportedKeys with a wildcard. Removal of this pattern requires a new query for getExportedKeys

          Show
          Jørgen Løland added a comment - Patch (1) removes table-patterns from the queries used by the seven methods. Note that there is one exception to this: the foreign table name of getCrossReference is still a pattern because this query is used by getExportedKeys with a wildcard. Removal of this pattern requires a new query for getExportedKeys
          Hide
          Jørgen Løland added a comment -

          Tests for patch (1): derbyall fails bootLock (as usual; very likely not related), suite.all fails the same 9 tests as tinderbox for revision 536720 (encryption)

          Show
          Jørgen Løland added a comment - Tests for patch (1): derbyall fails bootLock (as usual; very likely not related), suite.all fails the same 9 tests as tinderbox for revision 536720 (encryption)
          Hide
          Jørgen Løland added a comment -

          DERBY-1484 should be committed before this one. The release note of 1484 also applies to this issue.

          Show
          Jørgen Løland added a comment - DERBY-1484 should be committed before this one. The release note of 1484 also applies to this issue.
          Hide
          Kristian Waagan added a comment -

          I ran derbyall/suites.All with DERBY-1484 (modified according to Knut Anders comment) and this issue. No failures seen (Sun JVM 1.5).

          Is it expected that these fixes make it into 10.2 as well?

          Show
          Kristian Waagan added a comment - I ran derbyall/suites.All with DERBY-1484 (modified according to Knut Anders comment) and this issue. No failures seen (Sun JVM 1.5). Is it expected that these fixes make it into 10.2 as well?
          Hide
          Jørgen Løland added a comment -

          Thanks for reviewing these patches, Kristian.

          I don't think it is necessary to commit this to 10.2, especially since they require a release note.

          Show
          Jørgen Løland added a comment - Thanks for reviewing these patches, Kristian. I don't think it is necessary to commit this to 10.2, especially since they require a release note.
          Hide
          Kristian Waagan added a comment -

          Committed 'DERBY-2610-1.diff' to trunk with revision 538072.

          Thanks for the patch!

          Show
          Kristian Waagan added a comment - Committed ' DERBY-2610 -1.diff' to trunk with revision 538072. Thanks for the patch!
          Hide
          Jørgen Løland added a comment -

          Thanks for committing the patch, Kristian

          Show
          Jørgen Løland added a comment - Thanks for committing the patch, Kristian
          Hide
          Kathey Marsden added a comment -

          Should this be marked as existing application impact, in case users were counting on the pattern matching extension?

          Show
          Kathey Marsden added a comment - Should this be marked as existing application impact, in case users were counting on the pattern matching extension?
          Hide
          Jørgen Løland added a comment -

          Thanks for the comment, Kathey.

          This issue is related to 1484. After seeing your comment, I edited the release note of 1484 to better reflect both issues, and marked 1484 and this issue with existing application impact.

          Show
          Jørgen Løland added a comment - Thanks for the comment, Kathey. This issue is related to 1484. After seeing your comment, I edited the release note of 1484 to better reflect both issues, and marked 1484 and this issue with existing application impact.
          Hide
          Myrna van Lunteren added a comment -

          Attaching a release note to aid automatic release note generation.

          Show
          Myrna van Lunteren added a comment - Attaching a release note to aid automatic release note generation.
          Hide
          A B added a comment -

          Linked to DERBY-2758 since that appears to be a "regression" related to this issue.

          Show
          A B added a comment - Linked to DERBY-2758 since that appears to be a "regression" related to this issue.
          Hide
          Jørgen Løland added a comment -

          need to change the release note

          Show
          Jørgen Løland added a comment - need to change the release note
          Hide
          Jørgen Løland added a comment -

          changed release note according to comment in DERBY-2758

          Show
          Jørgen Løland added a comment - changed release note according to comment in DERBY-2758

            People

            • Assignee:
              Jørgen Løland
              Reporter:
              Jørgen Løland
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development