Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 81998 invoked from network); 4 May 2007 22:21:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 May 2007 22:21:36 -0000 Received: (qmail 6617 invoked by uid 500); 4 May 2007 22:21:42 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 6589 invoked by uid 500); 4 May 2007 22:21:42 -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 6579 invoked by uid 99); 4 May 2007 22:21:42 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 May 2007 15:21:42 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 May 2007 15:21:35 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 685CE71404A for ; Fri, 4 May 2007 15:21:15 -0700 (PDT) Message-ID: <30201831.1178317275424.JavaMail.jira@brutus> Date: Fri, 4 May 2007 15:21:15 -0700 (PDT) From: "A B (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Commented: (DERBY-2602) TIMESTAMP value is truncated when return to client In-Reply-To: <17010421.1178134635553.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DERBY-2602?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12493814 ] A B commented on DERBY-2602: ---------------------------- For what little it may be worth, code comments in client/am/PreparedStatement seem to suggest that this truncation was intentional (or at least, known) at "set" time: ~line 873: setInput(parameterIndex, x); // once the nanosecond field of timestamp is trim to microsecond for DERBY, should we throw a warning //if (getParameterType (parameterIndex) == java.sql.Types.TIMESTAMP && x.getNanos() % 1000 != 0) // accumulateWarning (new SqlWarning (agent_.logWriter_, "DERBY timestamp can only store up to microsecond, conversion from nanosecond to microsecond causes rounding.")); Of course the warning that's commented out refers to "rounding", which isn't quite right--we actually truncate. May be relevant, maybe not. > TIMESTAMP value is truncated when return to client > --------------------------------------------------- > > Key: DERBY-2602 > URL: https://issues.apache.org/jira/browse/DERBY-2602 > Project: Derby > Issue Type: Bug > Components: Network Client > Affects Versions: 10.3.0.0 > Reporter: Kathey Marsden > Priority: Minor > Attachments: d2602.java > > > In ParameterMappingTest I see the following differences between embedded and client. Client is truncating the TIMESTAMP value. Look for this bug number in the test for reproduction. > case java.sql.Types.TIMESTAMP: > if (param == 2) > if (usingEmbedded()) > assertEquals("2004-03-12 21:14:24.938222433", val.toString()); > else > assertEquals("2004-03-12 21:14:24.938222", val.toString()); > else if (param == 3) > if (usingEmbedded()) > assertEquals("2004-04-12 04:25:26.462983731", val.toString()); > else > assertEquals("2004-04-12 04:25:26.462983", val.toString()); > break; -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.