db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r630149 - /db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj
Date Fri, 22 Feb 2008 10:51:52 GMT
Author: dag
Date: Fri Feb 22 02:51:49 2008
New Revision: 630149

URL: http://svn.apache.org/viewvc?rev=630149&view=rev
Log:
DERBY-3073 SQL roles: add parser support

Small cleanup of GRANT <role> production to a position we are sure it is a role
grant that is attempted.

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj

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=630149&r1=630148&r2=630149&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 Feb
22 02:51:49 2008
@@ -12723,14 +12723,8 @@
 				   getToken(3).kind == TO)) ||
 				 !isPrivilegeKeywordExceptTrigger(getToken(2).kind)) } )
 	<GRANT>
-	{
-		checkSqlStandardAccess("GRANT <role>");
-		checkVersion( DataDictionary.DD_VERSION_DERBY_10_4, "ROLES");
-	}
 	( node = roleGrantStatement() )
 	{
-		checkVersion( DataDictionary.DD_VERSION_DERBY_10_2, "GRANT");
-		checkSqlStandardAccess( "GRANT");
 		return node;
 	}
 }
@@ -12970,6 +12964,9 @@
 	<TO>
 	grantees = granteeList()
 	{
+		checkSqlStandardAccess("GRANT <role>");
+		checkVersion( DataDictionary.DD_VERSION_DERBY_10_4, "ROLES");
+
 		return (StatementNode) nodeFactory.getNode
 			(C_NodeTypes.GRANT_ROLE_NODE,
 			 rolesGranted,



Mime
View raw message