Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 17515 invoked from network); 19 Dec 2005 15:37:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 19 Dec 2005 15:37:00 -0000 Received: (qmail 60086 invoked by uid 500); 19 Dec 2005 15:36:08 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 59959 invoked by uid 500); 19 Dec 2005 15:36:07 -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 59928 invoked by uid 99); 19 Dec 2005 15:36:06 -0000 X-ASF-Spam-Status: No, hits=1.3 required=10.0 tests=SPF_FAIL X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Dec 2005 07:36:06 -0800 Received: from ajax.apache.org (ajax.apache.org [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id 3DDFEE0 for ; Mon, 19 Dec 2005 16:35:33 +0100 (CET) Message-ID: <17558022.1135006533252.JavaMail.jira@ajax.apache.org> Date: Mon, 19 Dec 2005 16:35:33 +0100 (CET) From: "Bryan Pendleton (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Updated: (DERBY-125) Network Server can send DSS greater than 32K to client, which breaks DRDA protocol. In-Reply-To: <1937627462.1106074757160.JavaMail.jira@ajax.apache.org> 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-125?page=all ] Bryan Pendleton updated DERBY-125: ---------------------------------- Attachment: svn_2.diff First diff included an accidental, unrelated change. Removed, and replaced with svn_2.diff. > Network Server can send DSS greater than 32K to client, which breaks DRDA protocol. > ----------------------------------------------------------------------------------- > > Key: DERBY-125 > URL: http://issues.apache.org/jira/browse/DERBY-125 > Project: Derby > Type: Bug > Components: Network Server > Reporter: A B > Assignee: Bryan Pendleton > Attachments: changes.html, repro.java, svn_2.diff > > BACKGROUND: > DRDA protocol, which is the protocol used by Derby Network Server, dictates that all DSS objects "with data greater than 32,763 bytes" should be broken down into multiple "continuation" DSSes. > PROBLEM: > When Network Server receives a "prepareStatement" call that has a very large number of parameters, it can end up sending a reply DSS that is greater than 32K long to the client; doing so breaks DRDA protocol. > REPRODUCTION: > Note that this reproduction does NOT cause a protocol exception against the JCC driver--without further investigation, it would appear JCC doesn't mind that the DSS is too long. However, other DRDA clients (such as the DB2 ODBC client) will see that the data is too long and will fail because of it. > To reproduce, one can create a simple table and then prepare a statement such as: > SELECT id FROM t1 WHERE id in ( ?, ?, [ ... lots and lots of param markers ... ], ?) > Note that JCC uses deferred prepare by default; when connecting, one must append the "deferPrepares=false" attribute to the end of the URL in order to reproduce the problem (that or just try to execute the statement, since preparation will be done at execution time). When doing the prepare, I added a line in the "flush" method of org.apache.derby.impl.drda.DDMWriter.java to see how large the reply DSS was, and for cases where the number of parameter markers was high, the number of bytes in the single DSS would surpass 32K, and thus break protocol. > NOTES: > Network Server correctly uses continuation DSSes for LOBs and for result set data (data returned as the result of a query) that is greater than 32K. The problem appears to be in "other" cases, such as for the prepareStatement call described above. -- 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