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 "Daniel John Debrunner (JIRA)" <ji...@apache.org> on 2007/07/06 23:26:04 UTC

[jira] Commented: (DERBY-2910) SimpleStringOperatorNode in it's bindExpression method generates a character string CAST if required but does not set the correct collation.

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

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

It's a little unclear on this what problem is or  the resolution might be. 

Is the bug that collation is setup incorrectly such that this statement fails when it shouldn't?
SELECT TABLENAME FROM SYS.SYSTABLES WHERE UPPER(CURRENT_DATE) = TABLENAME

or is that the statement should fail and it isn't?

If it's the latter, why should that statement fail?


> 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
>    Affects Versions: 10.3.1.1, 10.4.0.0
>            Reporter: Mamta A. Satoor
>
> 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.