db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kathey Marsden (JIRA)" <j...@apache.org>
Subject [jira] Updated: (DERBY-2910) SimpleStringOperatorNode in it's bindExpression method generates a character string CAST if required but does not set the correct collation.
Date Mon, 27 Aug 2007 23:11:32 GMT

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

Kathey Marsden updated DERBY-2910:
----------------------------------

    Attachment: derby-2910_stat.txt
                derby-2910_diff.txt

Attached is a patch for this issue. I am currently running tests but am interested to know
if I am on the right track since this is my first collation bug fix.  This change changes
implicit casts in
SimpleStringOperatorNode, ConcatenationOperatorNode, and TernaryOperatorNode to use the current
schema collation when doing an implicit cast.

I could not come up with a test case for TernaryOperatorNode as substr will not accept a date
argument.  I changed the code anyway.  It may be that it is unreachable.





> SimpleStringOperatorNode in it's bindExpression method generates a character string CAST
if required but does not set the correct collation.
> --------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2910
>                 URL: https://issues.apache.org/jira/browse/DERBY-2910
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.3.1.4, 10.4.0.0
>            Reporter: Mamta A. Satoor
>            Assignee: Kathey Marsden
>         Attachments: derby-2910_diff.txt, derby-2910_stat.txt
>
>
> Following query should run into error if run in a territory based database 
> SELECT TABLENAME FROM SYS.SYSTABLES WHERE UPPER(CURRENT_DATE) = TABLENAME;
> When a CAST node is generated on top of CURRENT_DATE to create a character string type,
we do not set the collation of that character string type and hence it always ends up getting
the default which is collation derivation IMPLICIT and collation type UCS_BASIC. That does
not sound right. 
> There might be other places where we generate CAST node to create a character string
type. We should check if the collation is set correctly for them.

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