Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 64959 invoked from network); 20 Feb 2011 21:37:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 20 Feb 2011 21:37:02 -0000 Received: (qmail 93064 invoked by uid 500); 20 Feb 2011 21:37:02 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 93041 invoked by uid 500); 20 Feb 2011 21:37:01 -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 93028 invoked by uid 99); 20 Feb 2011 21:37:01 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 20 Feb 2011 21:37:01 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 20 Feb 2011 21:36:59 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id A741E1AFE2B for ; Sun, 20 Feb 2011 21:36:38 +0000 (UTC) Date: Sun, 20 Feb 2011 21:36:38 +0000 (UTC) From: "Knut Anders Hatlen (JIRA)" To: derby-dev@db.apache.org Message-ID: <73516366.4881.1298237798681.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1462402942.4828.1298235518597.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] Updated: (DERBY-5063) Embedded driver allows updateBytes() on BOOLEAN column 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-5063?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Knut Anders Hatlen updated DERBY-5063: -------------------------------------- Attachment: derby-5063-1a.diff Removing the setValue(byte[]) override in the SQLBoolean class (see attached patch derby-5063-1a.diff) makes embedded raise the same error as the client. > Embedded driver allows updateBytes() on BOOLEAN column > ------------------------------------------------------ > > Key: DERBY-5063 > URL: https://issues.apache.org/jira/browse/DERBY-5063 > Project: Derby > Issue Type: Bug > Components: JDBC > Affects Versions: 10.7.1.1 > Reporter: Knut Anders Hatlen > Assignee: Knut Anders Hatlen > Attachments: derby-5063-1a.diff > > > The following code inserts the value TRUE into the table T on the embedded driver: > Statement s = c.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE); > s.execute("create table t(b boolean)"); > ResultSet rs = s.executeQuery("select b from t"); > rs.moveToInsertRow(); > rs.updateBytes(1, "this is a test".getBytes()); > rs.insertRow(); > The client driver fails: > java.sql.SQLException: An attempt was made to put a data value of type 'byte[]' into a data value of type 'BOOLEAN'. > I believe the client driver is correct, and embedded should be changed to match it. -- This message is automatically generated by JIRA. - For more information on JIRA, see: http://www.atlassian.com/software/jira