Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 53841 invoked from network); 28 Sep 2010 13:26:59 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 28 Sep 2010 13:26:59 -0000 Received: (qmail 47410 invoked by uid 500); 28 Sep 2010 13:26:59 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 47211 invoked by uid 500); 28 Sep 2010 13:26:56 -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 47204 invoked by uid 99); 28 Sep 2010 13:26:54 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Sep 2010 13:26:54 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Sep 2010 13:26:53 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o8SDQXVo026259 for ; Tue, 28 Sep 2010 13:26:33 GMT Message-ID: <26401418.442281285680393077.JavaMail.jira@thor> Date: Tue, 28 Sep 2010 09:26:33 -0400 (EDT) From: "Martin Monperrus (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Created: (DERBY-4822) [patch] DropSchemaConstantAction: could reuse the current connection provided by the available activation object MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [patch] DropSchemaConstantAction: could reuse the current connection provided by the available activation object ---------------------------------------------------------------------------------------------------------------- Key: DERBY-4822 URL: https://issues.apache.org/jira/browse/DERBY-4822 Project: Derby Issue Type: Improvement Components: Network Server Reporter: Martin Monperrus Priority: Minor In DropSchemaConstantAction.executeConstantAction, getSchemaDescriptor is called with a null parameter. Instead, one could reuse the current transaction controller directly available with "activation.getLanguageConnectionContext().getTransactionExecute()" as it's done with other subclasses of DDLConstantAction. Regards, --Martin Index: java/engine/org/apache/derby/impl/sql/execute/DropSchemaConstantAction.java =================================================================== --- java/engine/org/apache/derby/impl/sql/execute/DropSchemaConstantAction.java (revision 1001658) +++ java/engine/org/apache/derby/impl/sql/execute/DropSchemaConstantAction.java (working copy) @@ -27,6 +27,7 @@ import org.apache.derby.iapi.sql.dictionary.DataDictionary; import org.apache.derby.iapi.sql.dictionary.SchemaDescriptor; import org.apache.derby.iapi.sql.execute.ConstantAction; +import org.apache.derby.iapi.store.access.TransactionController; /** * This class describes actions that are ALWAYS performed for a @@ -82,6 +83,7 @@ { LanguageConnectionContext lcc = activation.getLanguageConnectionContext(); DataDictionary dd = lcc.getDataDictionary(); + TransactionController tc = lcc.getTransactionExecute(); /* ** Inform the data dictionary that we are about to write to it. @@ -94,7 +96,7 @@ */ dd.startWriting(lcc); - SchemaDescriptor sd = dd.getSchemaDescriptor(schemaName, null, true); + SchemaDescriptor sd = dd.getSchemaDescriptor(schemaName, tc, true); sd.drop(lcc, activation); -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.