Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 18072 invoked from network); 3 Aug 2007 18:46:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Aug 2007 18:46:16 -0000 Received: (qmail 5771 invoked by uid 500); 3 Aug 2007 18:46:15 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 5743 invoked by uid 500); 3 Aug 2007 18:46:15 -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 5734 invoked by uid 99); 3 Aug 2007 18:46:15 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Aug 2007 11:46:15 -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; Fri, 03 Aug 2007 18:45:57 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id CEC6671404B for ; Fri, 3 Aug 2007 11:45:52 -0700 (PDT) Message-ID: <1978426.1186166752837.JavaMail.jira@brutus> Date: Fri, 3 Aug 2007 11:45:52 -0700 (PDT) From: "Kathey Marsden (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Updated: (DERBY-2668) At the time of compilation of a comparison operation, if the collation types of the operands do not match, then we should throw a meaningful error message. In-Reply-To: <28715434.1179469516699.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-2668?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Kathey Marsden updated DERBY-2668: ---------------------------------- Attachment: derby-2668_preview_diff.txt Before I update many masters I wanted to run a preview of the patch for this issue and the new error format by the community. The new error will look as below with collation always printing with string types when comparisons are not supported. Please let me know what you think. Kathey ij> select * from sys.systables where tablename = 'T1'; ERROR 42818: Comparisons between 'VARCHAR (UCS_BASIC)' and 'CHAR (TERRITORY_BASED)' are not supported. ij> select * from sys.systables where tablename = 1; ERROR 42818: Comparisons between 'VARCHAR (UCS_BASIC)' and 'INTEGER' are not supported. > At the time of compilation of a comparison operation, if the collation types of the operands do not match, then we should throw a meaningful error message. > ----------------------------------------------------------------------------------------------------------------------------------------------------------- > > Key: DERBY-2668 > URL: https://issues.apache.org/jira/browse/DERBY-2668 > Project: Derby > Issue Type: Improvement > Components: SQL > Affects Versions: 10.3.0.0 > Reporter: Mamta A. Satoor > Assignee: Kathey Marsden > Attachments: derby-2668_preview_diff.txt > > > In Derby 10.3, we are adding a new feature (DERBY-1478) which will allow character string types to have a territory based collation (except for persistent character string type columns from system schema). When 2 character types are compared, they should have the same collation type associated with them. If not then Derby 10.3 will throw an exception. Currently, in Derby 10.3 codeline, the exception thrown is something like "ERROR 42818: Comparisons between 'VARCHAR' and 'CHAR' are not supported." but this error message is misleading. The error is really for collation mismatch. We should fix following error so it indicates the real reason behind the exception. > eg sql > ij> connect 'nodb;create=true;territory=no;collation=TERRITORY_BASED'; > ij> select * from sys.systables where tablename = 'T1'; > ERROR 42818: Comparisons between 'VARCHAR' and 'CHAR' are not supported. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.