Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 8165 invoked from network); 28 Aug 2007 15:25:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 28 Aug 2007 15:25:59 -0000 Received: (qmail 92445 invoked by uid 500); 28 Aug 2007 15:25:50 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 92413 invoked by uid 500); 28 Aug 2007 15:25:50 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 92347 invoked by uid 99); 28 Aug 2007 15:25:49 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Aug 2007 08:25:49 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Aug 2007 15:26:47 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id EB60771418E for ; Tue, 28 Aug 2007 08:25:30 -0700 (PDT) Message-ID: <30143902.1188314730946.JavaMail.jira@brutus> Date: Tue, 28 Aug 2007 08:25:30 -0700 (PDT) From: "Kathey Marsden (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Commented: (DERBY-2910) SimpleStringOperatorNode in it's bindExpression method generates a character string CAST if required but does not set the correct collation. In-Reply-To: <4321888.1183713124438.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DERBY-2910?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12523258 ] Kathey Marsden commented on DERBY-2910: --------------------------------------- I am having trouble finding any explicit reference to the collation of implicit casts. The SQL Spec in section 6.1.2 says of explicit casts: "10) If TD is a fixed-length, variable-length, or large object character string, then TD shall not specify . The declared type collation of the is the character set collation of the character set of TD and its collation derivation is implicit." I think that given no explicit rules for implicit casts, that they should follow the same rules as explicit casts. Does that sound reasonable? Kathey > 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.