Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 44644 invoked from network); 29 Apr 2005 12:24:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 29 Apr 2005 12:24:20 -0000 Received: (qmail 94372 invoked by uid 500); 29 Apr 2005 12:25:28 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 94321 invoked by uid 500); 29 Apr 2005 12:25:27 -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: "Derby Development" Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 94282 invoked by uid 99); 29 Apr 2005 12:25:26 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from ajax-1.apache.org (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.28) with ESMTP; Fri, 29 Apr 2005 05:25:25 -0700 Received: from ajax.apache.org (ajax.apache.org [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id D978229C for ; Fri, 29 Apr 2005 14:24:04 +0200 (CEST) Message-ID: <136152901.1114777444889.JavaMail.jira@ajax.apache.org> Date: Fri, 29 Apr 2005 14:24:04 +0200 (CEST) From: "Kathey Marsden (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Created: (DERBY-250) With client setObject( parameterIndex, x, java.sql.DOUBLE) throws conversion exception if the object passed is a BigDecimal with precision Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N With client setObject( parameterIndex, x, java.sql.DOUBLE) throws conversion exception if the object passed is a BigDecimal with precision ------------------------------------------------------------------------------------------------------------------------------------------ Key: DERBY-250 URL: http://issues.apache.org/jira/browse/DERBY-250 Project: Derby Type: Bug Components: Network Client Versions: 10.1.0.0 Reporter: Kathey Marsden Fix For: 10.1.0.0 Trying to insert a BigDecimal value with unscaled value longer than 31 digits using public void setObject(int parameterIndex, Object x, int targetSqlType) throws SQLException or public void setObject(int parameterIndex, Object x, int targetSqlType, int scale) throws SQLException fails with Network client. ps.setObject(1,1000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000,java.sql.Types.DOUBLE) org.apache.derby.client.am.ConversionException: [converters] The numeric literal "100000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000 00000000" is not valid because its value is out of range. at org.apache.derby.client.am.Decimal.bigDecimalToPackedDecimalByte s(Decimal.java:391) at org.apache.derby.client.net.Request.writeBigDecimal(Request.java :1632) at org.apache.derby.client.net.NetStatementRequest.buildFDODTA(NetS tatementRequest.java:692) at org.apache.derby.client.net.NetStatementRequest.buildSQLDTAcomma ndData(NetStatementRequest.java:514) at org.apache.derby.client.net.NetStatementRequest.writeExecute(Net StatementRequest.java:137) at org.apache.derby.client.net.NetPreparedStatement.writeExecute_(N etPreparedStatement.java:124) at org.apache.derby.client.am.PreparedStatement.writeExecute(Prepar edStatement.java:956) at org.apache.derby.client.am.PreparedStatement.flowExecute(Prepare dStatement.java:1173) at org.apache.derby.client.am.PreparedStatement.executeUpdateX(Prep aredStatement.java:324) at org.apache.derby.client.am.PreparedStatement.executeUpdate(Prepa redStatement.java:315) See attached patch with modified prepStmt.java test for reproduction. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira