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)" <ji...@apache.org> on 2011/03/31 19:19:06 UTC

[jira] [Updated] (DERBY-5168) Wrong syntax in identifier chain returned by SynonymAliasInfo.toString()

     [ https://issues.apache.org/jira/browse/DERBY-5168?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Knut Anders Hatlen updated DERBY-5168:
--------------------------------------

    Attachment: derby-5168-1a.diff

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

> Wrong syntax in identifier chain returned by SynonymAliasInfo.toString()
> ------------------------------------------------------------------------
>
>                 Key: DERBY-5168
>                 URL: https://issues.apache.org/jira/browse/DERBY-5168
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.7.1.1
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>         Attachments: derby-5168-1a.diff
>
>
> 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.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira