Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 73923 invoked from network); 23 Aug 2006 12:48:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 23 Aug 2006 12:48:23 -0000 Received: (qmail 70305 invoked by uid 500); 23 Aug 2006 12:48:22 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 70256 invoked by uid 500); 23 Aug 2006 12:48:22 -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 70226 invoked by uid 99); 23 Aug 2006 12:48:22 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Aug 2006 05:48:22 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Aug 2006 05:48:21 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id CF9827142FB for ; Wed, 23 Aug 2006 12:45:14 +0000 (GMT) Message-ID: <4987862.1156337114847.JavaMail.jira@brutus> Date: Wed, 23 Aug 2006 05:45:14 -0700 (PDT) From: "Kristian Waagan (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Updated: (DERBY-1473) Add cut-off and truncation logic to streaming classes in the embedded driver In-Reply-To: <4786540.1151953349845.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 X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/DERBY-1473?page=all ] Kristian Waagan updated DERBY-1473: ----------------------------------- Attachment: derby-1473-1c-streaming.diff I removed the if-block and uploaded a new patch (1c deprecates 1b). Our uses will not have to deal with DerbyIOException at all. The point of introducing it, is to separate between exceptions thrown by Derby itself and those thrown by the user/application stream. An example for the former, is when Derby detects that the stream is shorter than its specified length. The user can then catch this and check for the appropriate SQLState if he/she wishes to. I planned to catch it in InsertOperation and UpdateOperation, then extract the SQLState and generate and throw an exception with the correct SQLState. Currently, a very general exception is thrown, with the IOException (or DerbyIOException) chained deep down. See DERBY-1657 for a little more information (the issue is already linked to this one). I had originally implemented these changes, but decided to postpone them because the issues around impact on existing applications must be discussed first. The introduction (and current use of) DerbyIOException should not impact users in any way. > Add cut-off and truncation logic to streaming classes in the embedded driver > ---------------------------------------------------------------------------- > > Key: DERBY-1473 > URL: http://issues.apache.org/jira/browse/DERBY-1473 > Project: Derby > Issue Type: Improvement > Components: JDBC > Affects Versions: 10.2.1.0 > Reporter: Kristian Waagan > Assigned To: Kristian Waagan > Fix For: 10.2.1.0 > > Attachments: derby-1473-1a-streaming.diff, derby-1473-1a-streaming.stat, derby-1473-1b-streaming.diff, derby-1473-1c-streaming.diff, derby-1473-2a-streamingtests.diff, derby-1473-2a-streamingtests.stat, derby-1473-2b-streamingtests.diff > > > When streaming data to Derby, the application stream will be wrapped in a Derby-specific stream to convert the data to the correct representation. At a minimum, this consists of getting the data to the on-disk format used by Derby. > The wrapping stream can be extended to provide the following features at an earlier stage: > a) Data cut-off when the maximum allowed size is exceeded > b) Truncation of trailing blanks where allowed > Both features can reduce the amount of data needed to be kept in memory on insertion. > Implementing this will require additional column/data type information in the streaming class(es). The implementation must be able to handle streams for which the length is specified and also streams with unknown/unspecified length. -- 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