Return-Path: Delivered-To: apmail-db-derby-commits-archive@www.apache.org Received: (qmail 60147 invoked from network); 3 Oct 2008 12:44:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Oct 2008 12:44:57 -0000 Received: (qmail 97888 invoked by uid 500); 3 Oct 2008 12:44:56 -0000 Delivered-To: apmail-db-derby-commits-archive@db.apache.org Received: (qmail 97865 invoked by uid 500); 3 Oct 2008 12:44:56 -0000 Mailing-List: contact derby-commits-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: "Derby Development" List-Id: Delivered-To: mailing list derby-commits@db.apache.org Received: (qmail 97854 invoked by uid 99); 3 Oct 2008 12:44:56 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Oct 2008 05:44:56 -0700 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.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Oct 2008 12:44:01 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 3DA4C23888F4; Fri, 3 Oct 2008 05:44:36 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r701367 - in /db/derby/code/trunk/java: engine/org/apache/derby/catalog/types/ engine/org/apache/derby/impl/sql/compile/ testing/org/apache/derbyTesting/functionTests/master/ testing/org/apache/derbyTesting/functionTests/master/DerbyNet/ te... Date: Fri, 03 Oct 2008 12:44:35 -0000 To: derby-commits@db.apache.org From: rhillegas@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20081003124436.3DA4C23888F4@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: rhillegas Date: Fri Oct 3 05:44:34 2008 New Revision: 701367 URL: http://svn.apache.org/viewvc?rev=701367&view=rev Log: DERBY-3570: Add ability to declare DETERMINISTIC routines. Modified: db/derby/code/trunk/java/engine/org/apache/derby/catalog/types/RoutineAliasInfo.java db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/dblook_test_net.out db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/dblook_test_net_territory.out db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/dblook_test_net.out db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/dblook_test_net_territory.out db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/dblook_test.out db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/dblook_test_territory.out db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/GeneratedColumnsTest.java db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/dblook_makeDB.sql db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/Changes10_5.java Modified: db/derby/code/trunk/java/engine/org/apache/derby/catalog/types/RoutineAliasInfo.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/catalog/types/RoutineAliasInfo.java?rev=701367&r1=701366&r2=701367&view=diff ============================================================================== --- db/derby/code/trunk/java/engine/org/apache/derby/catalog/types/RoutineAliasInfo.java (original) +++ db/derby/code/trunk/java/engine/org/apache/derby/catalog/types/RoutineAliasInfo.java Fri Oct 3 05:44:34 2008 @@ -366,11 +366,16 @@ } sb.append(" LANGUAGE JAVA PARAMETER STYLE " ); + switch( parameterStyle ) { case PS_JAVA: sb.append( "JAVA " ); break; case PS_DERBY_JDBC_RESULT_SET: sb.append( "DERBY_JDBC_RESULT_SET " ); break; } + + if ( isDeterministic() ) + { sb.append( " DETERMINISTIC " ); } + sb.append(RoutineAliasInfo.SQL_CONTROL[getSQLAllowed()]); if ((returnType == null) && (dynamicResultSets != 0)) Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj?rev=701367&r1=701366&r2=701367&view=diff ============================================================================== --- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj (original) +++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj Fri Oct 3 05:44:34 2008 @@ -2151,6 +2151,7 @@ | | | +| | | | @@ -10027,6 +10028,20 @@ | { clauseValue = "JAVA"; clausePosition = CreateAliasNode.LANGUAGE; } | + + { + clauseValue = Boolean.TRUE; + clausePosition = CreateAliasNode.DETERMINISTIC; + checkVersion(DataDictionary.DD_VERSION_DERBY_10_5, "DETERMINISTIC"); + } + | + + { + clauseValue = Boolean.FALSE; + clausePosition = CreateAliasNode.DETERMINISTIC; + checkVersion(DataDictionary.DD_VERSION_DERBY_10_5, "DETERMINISTIC"); + } + | clauseValue = string() { clausePosition = CreateAliasNode.EXTERNAL_NAME; } |