Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 83176 invoked from network); 9 Jul 2010 02:19:01 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 9 Jul 2010 02:19:01 -0000 Received: (qmail 3931 invoked by uid 500); 9 Jul 2010 02:19:01 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 3833 invoked by uid 500); 9 Jul 2010 02:19:00 -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 3818 invoked by uid 99); 9 Jul 2010 02:19:00 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Jul 2010 02:19:00 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Jul 2010 02:18:12 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o692Ho2k027100 for ; Fri, 9 Jul 2010 02:17:50 GMT Message-ID: <15138399.275981278641870289.JavaMail.jira@thor> Date: Thu, 8 Jul 2010 22:17:50 -0400 (EDT) From: "Yun Lee (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Closed: (DERBY-4738) correct error prompt for nonpositive length in Blob.setBytesX() In-Reply-To: <24118954.257521278580069713.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DERBY-4738?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Yun Lee closed DERBY-4738. -------------------------- Thanks, Knut. Before I attached the patch, I just run BlobAccessTest and it passed. I will run regression tests for a extensive test next time. Thanks for your advice. I agree with your patch on moving the declaration of the length variable. More work need to be done on this method, just pointed out in Derby-3898. > correct error prompt for nonpositive length in Blob.setBytesX() > --------------------------------------------------------------- > > Key: DERBY-4738 > URL: https://issues.apache.org/jira/browse/DERBY-4738 > Project: Derby > Issue Type: Bug > Components: JDBC > Affects Versions: 10.7.0.0 > Reporter: Yun Lee > Assignee: Yun Lee > Fix For: 10.7.0.0 > > Attachments: derby-4738.patch, derby-4738.stat, init_length.diff > > > In Blob.setBytesX(), when a nonpositive length value (len) is passed in, a SqlException with ClientMessageId of SQLState.BLOB_NONPOSITIVE_LENGTH is created, however, it uses length, a wrong length value, which is still zero here. > if ( len < 0 ) { > throw new SqlException(agent_.logWriter_, > new ClientMessageId(SQLState.BLOB_NONPOSITIVE_LENGTH), > new Integer(length)); > } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.