Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 69308 invoked from network); 9 Jun 2005 18:31:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 9 Jun 2005 18:31:31 -0000 Received: (qmail 26225 invoked by uid 500); 9 Jun 2005 18:31:29 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 26167 invoked by uid 500); 9 Jun 2005 18:31:28 -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 26146 invoked by uid 99); 9 Jun 2005 18:31:28 -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; Thu, 09 Jun 2005 11:31:26 -0700 Received: from ajax.apache.org (ajax.apache.org [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id C9EC41B for ; Thu, 9 Jun 2005 20:31:18 +0200 (CEST) Message-ID: <751933480.1118341878825.JavaMail.jira@ajax.apache.org> Date: Thu, 9 Jun 2005 20:31:18 +0200 (CEST) From: "Philip Wilder (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Closed: (DERBY-343) Clean up DRDA classes handling of OPNQRY options In-Reply-To: <277508531.1118152420862.JavaMail.jira@ajax.apache.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/DERBY-343?page=all ] Philip Wilder closed DERBY-343: ------------------------------- > Clean up DRDA classes handling of OPNQRY options > ------------------------------------------------ > > Key: DERBY-343 > URL: http://issues.apache.org/jira/browse/DERBY-343 > Project: Derby > Type: Sub-task > Components: Network Server > Versions: 10.0.2.1, 10.0.2.0 > Reporter: Philip Wilder > Assignee: Philip Wilder > Priority: Minor > Fix For: 10.1.0.0 > Attachments: Derby213.diff > > The follow is a list of changes to be implemented in the DRDAConnThread, DRDAStatement and DRDAResultSet. It is hoped that these changes will clean up code related to DERBY-213 and make the fix easier to implement. > ################################### > Step 1: > In org.apache.derby.impl.drda.DRDAResultSet add > public static final int QRYCLSIMP_DEFAULT = CodePoint.QRYCLSIMP_NO; > ############################ > Step 2: > Copy the org.apache.derby.impl.drda.DRDAStatement.setOPNQRYOptions() method to the org.apache.derby.impl.drda.DRDAResultSet class and > change the logic of set setOPNQRYOptions() to remove the setting of the qryclsimp value to QRYCLSIMP_SERVER_CHOICE. Only the values of YES or NO will ever be stored internally. > e.g. > DRDAResultSet.setOPNQRYOptions(int blksize, int qryblkctl, int maxblkext, int outovropt, int qryrowset, > int qryclsimpl) { > this.blksize = blksize; > setQryprctyp(qryblkctl); > this.maxblkext = maxblkext; > this.outovropt = outovropt; > this.qryrowset = qryrowset; > this.qryclsimp = (qryclsimpl == CodePoint.QRYCLSIMP_SERVER_CHOICE) > ? DRDAResultSet.QRYCLSIMP_DEFAULT : qryclsimpl; > } > Thereafter change to the DRDAStatement.setOPNQRYOptions() to a delegation method which calls the method in DRDAResultSet > e.g. > DRDAStatement.setOPNQRYOptions(int blksize, int qryblkctl, int maxblkext, int outovropt,int qryrowset,int qryclsimpl) > { > currentDrdaRs.setOPNQRYOptions(blksize, qryblkctl, maxblkext, > outovropt, qryrowset, qryclsimpl); > } > ################################### > Step 3: > Add org.apache.derby.impl.drda.DRDAResultSet.isRSCloseImplicit() which will test to see if the resultset should close implicitly > e.g. > boolean DRDAResultSet.isRSCloseImplicit() { > return currentDrdaRs.qryclsimp == CodePoint.QRYCLSIMP_YES && > stmt.getQryprctyp() != CodePoint.LMTBLKPRC > } > Then add a corresponding delegation method in org.apache.derby.impl.drda.DRDAStatement() > boolean DRDAStatement.isRSCloseImplicit() { > return currentDrdaRs.isRSCloseImplicit(); > } > ################################### > Step 4: > Remove org.apache.derby.impl.drda.DRDAStatment.setQryclsimp(int value) > ################################### > Step 5: > Remove all references to > if (qryclsimp == CodePoint.QRYCLSIMP_YES && > stmt.getQryprctyp() != CodePoint.LMTBLKPRC) { ... > logic and replace with > if (drdaStatement.isRSCloseImplicit()) { ... > This should remove all references to org.apache.derby.impl.drda.DRDAStatment.getQryclsimp() which can in turn be removed. > ################################### > Step 6: > In org.apache.derby.drda.impl.DRDAResultSet change: > protected int qryclsimp > to > private int qryclsimp; > ################################### > Step 7: > In org.apache.derby.drda.impl.DRDAConnThread.parseOPNQRY() change the line > int qryclsimp = CodePoint.QRYCLSIMP_DEFAULT; > to > int qryclsimp = DRDAResultSet.QRYCLSIMP_DEFAULT > ################################### > Step 8: > In org.apache.derby.drda.impl.CodePoint remove > static final int QRYCLSIMP_DEFAULT = QRYCLSIMP_SERVER_CHOICE; > ################################### > Step 9: Insure that the new methods and changed methods have appropriate java documentation. > ################################### > Step 10: Organize the import for the DRDAConnThread, DRDAStatement and DRDAResultSet classes found in the org.apache.derby.drda.impl package. -- 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