Return-Path: X-Original-To: apmail-db-derby-dev-archive@www.apache.org Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7E718D26B for ; Tue, 5 Feb 2013 03:34:16 +0000 (UTC) Received: (qmail 51072 invoked by uid 500); 5 Feb 2013 03:34:15 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 50692 invoked by uid 500); 5 Feb 2013 03:34:15 -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 50596 invoked by uid 99); 5 Feb 2013 03:34:13 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Feb 2013 03:34:13 +0000 Date: Tue, 5 Feb 2013 03:34:13 +0000 (UTC) From: "Dag H. Wanvik (JIRA)" To: derby-dev@db.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (DERBY-5546) ResultSet#updateBigDecimal on a REAL column does not do underflow checking MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DERBY-5546?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13570917#comment-13570917 ] Dag H. Wanvik commented on DERBY-5546: -------------------------------------- Talked to Lance. We should follow the advice in the JDBC specification on this [1], when writing to a data source, throw DataTruncation if information is lost/truncated. On reading from a data source, report (not throw) DataTruncation (a SQLWarning subclass). In this case, since we are updating a column, we should throw. [1] JDBC 4.1 specification section 8.3 DataTruncation [http://download.oracle.com/otndocs/jcp/jdbc-4_1-mrel-spec/index.html] > ResultSet#updateBigDecimal on a REAL column does not do underflow checking > -------------------------------------------------------------------------- > > Key: DERBY-5546 > URL: https://issues.apache.org/jira/browse/DERBY-5546 > Project: Derby > Issue Type: Bug > Components: JDBC > Affects Versions: 10.8.2.2 > Reporter: Dag H. Wanvik > Assignee: Dag H. Wanvik > Priority: Minor > Labels: derby_triage10_9 > Attachments: derby-5546.diff, derby-5546.stat, MissingUnderflowCheck.java > > > In contrast, ResultSet#updateBigDecimal on a FLOAT or DOUBLE column gives the expected error on underflow. Cf. the attached repro program MissingUnderflowCheck. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira