Derby
  1. Derby
  2. DERBY-5168

Wrong syntax in identifier chain returned by SynonymAliasInfo.toString()

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 10.7.1.1
    • Fix Version/s: 10.8.1.2
    • Component/s: SQL
    • Labels:
      None

      Description

      SynonymAliasInfo.toString() doesn't quote identifiers correctly. Example:

      ij> create table """"(x int);
      0 rows inserted/updated/deleted
      ij> create synonym s1 for """";
      0 rows inserted/updated/deleted
      ij> select aliasinfo from sys.sysaliases where alias = 'S1';
      ALIASINFO
      ---------------
      "APP"."""

      1 row selected

      The returned value should say:

      "APP".""""

      That is, there should be one more double quote character.

      1. derby-5168-1a.diff
        3 kB
        Knut Anders Hatlen

        Activity

        Knut Anders Hatlen created issue -
        Knut Anders Hatlen made changes -
        Field Original Value New Value
        Status Open [ 1 ] In Progress [ 3 ]
        Hide
        Knut Anders Hatlen added a comment -

        Attaching a patch which fixes the toString() method by using a helper method in IdUtil to do the quoting. It also adds a test case for the bug to SynonymTest. The test fails with the following message without the fix:

        junit.framework.AssertionFailedError: Column value mismatch @ column 'ALIASINFO', row 1:
        Expected: >"""".""""<
        Found: >"""."""<

        Show
        Knut Anders Hatlen added a comment - Attaching a patch which fixes the toString() method by using a helper method in IdUtil to do the quoting. It also adds a test case for the bug to SynonymTest. The test fails with the following message without the fix: junit.framework.AssertionFailedError: Column value mismatch @ column 'ALIASINFO', row 1: Expected: >"""".""""< Found: >"""."""<
        Knut Anders Hatlen made changes -
        Attachment derby-5168-1a.diff [ 12475125 ]
        Hide
        Knut Anders Hatlen added a comment -

        All the regression tests ran cleanly with the patch.

        Show
        Knut Anders Hatlen added a comment - All the regression tests ran cleanly with the patch.
        Knut Anders Hatlen made changes -
        Issue & fix info [Patch Available]
        Hide
        Knut Anders Hatlen added a comment -

        Committed revision 1087641.

        Show
        Knut Anders Hatlen added a comment - Committed revision 1087641.
        Knut Anders Hatlen made changes -
        Status In Progress [ 3 ] Closed [ 6 ]
        Issue & fix info [Patch Available]
        Fix Version/s 10.8.0.0 [ 12315561 ]
        Resolution Fixed [ 1 ]
        Rick Hillegas made changes -
        Fix Version/s 10.8.1.1 [ 12316356 ]
        Fix Version/s 10.8.1.0 [ 12315561 ]
        Rick Hillegas made changes -
        Fix Version/s 10.8.1.2 [ 12316362 ]
        Fix Version/s 10.8.1.1 [ 12316356 ]
        Gavin made changes -
        Workflow jira [ 12609292 ] Default workflow, editable Closed status [ 12800976 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open In Progress In Progress
        1h 39m 1 Knut Anders Hatlen 31/Mar/11 18:03
        In Progress In Progress Closed Closed
        17h 42m 1 Knut Anders Hatlen 01/Apr/11 11:45

          People

          • Assignee:
            Knut Anders Hatlen
            Reporter:
            Knut Anders Hatlen
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development