Return-Path: Delivered-To: apmail-db-derby-commits-archive@www.apache.org Received: (qmail 14780 invoked from network); 1 Aug 2007 05:47:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 1 Aug 2007 05:47:31 -0000 Received: (qmail 44940 invoked by uid 500); 1 Aug 2007 05:47:31 -0000 Delivered-To: apmail-db-derby-commits-archive@db.apache.org Received: (qmail 44868 invoked by uid 500); 1 Aug 2007 05:47:31 -0000 Mailing-List: contact derby-commits-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: "Derby Development" List-Id: Delivered-To: mailing list derby-commits@db.apache.org Received: (qmail 44857 invoked by uid 99); 1 Aug 2007 05:47:31 -0000 Received: from Unknown (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 31 Jul 2007 22:47:31 -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.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Aug 2007 05:47:31 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id B56D81A981A; Tue, 31 Jul 2007 22:47:10 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r561669 - /db/derby/code/branches/10.3/java/engine/org/apache/derby/iapi/types/DataTypeDescriptor.java Date: Wed, 01 Aug 2007 05:47:10 -0000 To: derby-commits@db.apache.org From: mamta@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20070801054710.B56D81A981A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: mamta Date: Tue Jul 31 22:47:08 2007 New Revision: 561669 URL: http://svn.apache.org/viewvc?view=rev&rev=561669 Log: Migrating comment changes from main(561668) into 10.3 codeline. The commit comments for main were as follows DERBY-2793 Another commit for comments involved with DTD.compareCollationInfo method. Derby's behavior is a subset of SQL standard when it comes to comparability rules involving collation derivation of IMPLICIT and collation derivation of NONE. The additional comments for the method explains that. Modified: db/derby/code/branches/10.3/java/engine/org/apache/derby/iapi/types/DataTypeDescriptor.java Modified: db/derby/code/branches/10.3/java/engine/org/apache/derby/iapi/types/DataTypeDescriptor.java URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.3/java/engine/org/apache/derby/iapi/types/DataTypeDescriptor.java?view=diff&rev=561669&r1=561668&r2=561669 ============================================================================== --- db/derby/code/branches/10.3/java/engine/org/apache/derby/iapi/types/DataTypeDescriptor.java (original) +++ db/derby/code/branches/10.3/java/engine/org/apache/derby/iapi/types/DataTypeDescriptor.java Tue Jul 31 22:47:08 2007 @@ -1113,18 +1113,27 @@ /** * Compare the collation info on this DTD with the passed DTD. The rules - * are as follows + * for comparison are as follows (these are as per SQL standard 2003 + * Section 9.13) + * * 1)If both the DTDs have collation derivation of NONE, then they can't be * compared and we return false. * 2)If both the DTDs have same collation derivation (which in Derby's case * at this point will mean collation derivation of IMPLICIT), then check * the collation types. If they match, then return true. If they do not * match, then they can't be compared and hence return false. - * - * In future, when we do support collation derivation of EXPLICIT, we will - * need to change this method so that we follow the correct SQL standard - * rules about what should happen if one collation derivation is EXPLICIT - * and other is NONE/IMPLICIT. + * 3)If one DTD has collation derivation of IMPLICIT and other DTD has + * collation derivation of NONE, then 2 DTDs are comparable using the + * collation type of DTD with collation derivation of IMPLICIT. Derby does + * not implement this rule currently and it is being traked as DERBY-2678. + * Derby's current behavior is to throw an exception if both the DTDs + * involved in collation operation do not have collation derivation of + * IMPLICIT. This behavior is a subset of SQL standard. + * 4)Derby currently does not support collation derivation of EXPLICIT and + * hence we do not have the code to enforce rules as mentioned in Section + * 9.13 of SQL spec for collation derivation of EXPLICIT. When we implement + * collation derivation of EXPLICIT, we should make sure that we follow the + * rules as specified in the SQL spec for comparability. * * @param compareWithDTD compare this DTD's collation info *