Return-Path: Delivered-To: apmail-db-derby-commits-archive@www.apache.org Received: (qmail 87198 invoked from network); 31 Dec 2005 03:44:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 31 Dec 2005 03:44:02 -0000 Received: (qmail 51344 invoked by uid 500); 31 Dec 2005 03:44:02 -0000 Delivered-To: apmail-db-derby-commits-archive@db.apache.org Received: (qmail 51321 invoked by uid 500); 31 Dec 2005 03:44:01 -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 51310 invoked by uid 99); 31 Dec 2005 03:44:01 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Dec 2005 19:44:01 -0800 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 30 Dec 2005 19:44:00 -0800 Received: (qmail 87124 invoked by uid 65534); 31 Dec 2005 03:43:40 -0000 Message-ID: <20051231034340.87123.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r360226 - in /db/derby/code/trunk/java: engine/org/apache/derby/iapi/types/TypeId.java testing/org/apache/derbyTesting/functionTests/master/LOB.out Date: Sat, 31 Dec 2005 03:43:39 -0000 To: derby-commits@db.apache.org From: djd@apache.org X-Mailer: svnmailer-1.0.5 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: djd Date: Fri Dec 30 19:43:35 2005 New Revision: 360226 URL: http://svn.apache.org/viewcvs?rev=360226&view=rev Log: DERBY-786 Make TypeId.variableLength() return true for CLOBs to ensure values assigned to CLOBs are truncated correctly on a CAST. Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/TypeId.java db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/LOB.out Modified: db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/TypeId.java URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/TypeId.java?rev=360226&r1=360225&r2=360226&view=diff ============================================================================== --- db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/TypeId.java (original) +++ db/derby/code/trunk/java/engine/org/apache/derby/iapi/types/TypeId.java Fri Dec 30 19:43:35 2005 @@ -1759,7 +1759,9 @@ } /** - * Is type variable length + * Does type hava a declared variable length (defined by the application). + * Examples are CHAR(10), CLOB(1M). + * Unbounded long types, like LONG VARCHAR return false here. * @return boolean true if type is variable length false if not. */ public boolean variableLength() @@ -1774,16 +1776,8 @@ case StoredFormatIds.NATIONAL_CHAR_TYPE_ID: case StoredFormatIds.NATIONAL_VARCHAR_TYPE_ID: case StoredFormatIds.BLOB_TYPE_ID: -// none of the LONG_VARCHAR types are true here...???? -// case StoredFormatIds.CLOB_TYPE_ID: -// case StoredFormatIds.NCLOB_TYPE_ID: - // RESOLVE: does "variableLength" here mean simply - // that the length is variable, or that the user - // can specify a length, such as "char(20)"? The - // answer to that determines where XML is supposed - // to be... - case StoredFormatIds.XML_TYPE_ID: - return true; + case StoredFormatIds.CLOB_TYPE_ID: + return true; default: return false; Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/LOB.out URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/LOB.out?rev=360226&r1=360225&r2=360226&view=diff ============================================================================== --- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/LOB.out (original) +++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/LOB.out Fri Dec 30 19:43:35 2005 @@ -205,7 +205,7 @@ 12345 1234 12345 -1234& +12345 ij> select * from n; ERROR 42X05: Table 'N' does not exist. ij> -- concatenate @@ -233,7 +233,7 @@ 12345 1234 12345 -1234& +12345 ij> select * from n where n like '12%'; ERROR 42X05: Table 'N' does not exist. ij> select * from b where b like cast('0102%' as blob(10)); @@ -245,7 +245,7 @@ 12345 1234 12345 -1234& +12345 ij> select * from n where n like cast('12%' as nclob(10)); ERROR 0A000: Feature not implemented: NCLOB. ij> -- cleanup