db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kmars...@apache.org
Subject svn commit: r787502 - in /db/derby/code/branches/10.2/java: engine/org/apache/derby/impl/sql/compile/ testing/org/apache/derbyTesting/functionTests/master/ testing/org/apache/derbyTesting/functionTests/tests/lang/
Date Tue, 23 Jun 2009 00:21:08 GMT
Author: kmarsden
Date: Tue Jun 23 00:21:08 2009
New Revision: 787502

URL: http://svn.apache.org/viewvc?rev=787502&view=rev
Log:
DERBY-4268 "SECURITY" is reserved as SQL keyword

Contributed by Lily Wei (lilywei at yahoo dot com)


Modified:
    db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/nonreserved.out
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/lang/nonreserved.sql

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj?rev=787502&r1=787501&r2=787502&view=diff
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj
(original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj
Tue Jun 23 00:21:08 2009
@@ -12873,6 +12873,7 @@
 	|   tok = <RS>
 	|	tok = <SCALE>
 	|	tok = <SAVEPOINT>
+	|	tok = <SECURITY>
 	|	tok = <SEQUENCE>
 	|	tok = <SEQUENTIAL>
 	|	tok = <SERIALIZABLE>

Modified: db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/nonreserved.out
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/nonreserved.out?rev=787502&r1=787501&r2=787502&view=diff
==============================================================================
--- db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/nonreserved.out
(original)
+++ db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/nonreserved.out
Tue Jun 23 00:21:08 2009
@@ -471,4 +471,31 @@
 ERROR 42903: Invalid use of an aggregate function.
 ij> drop table t1;
 0 rows inserted/updated/deleted
+ij> -- making SECURITY keyword nonreserved as fix for Derby-4268
+create table SECURITY (security int);
+0 rows inserted/updated/deleted
+ij> insert into security values (1);
+1 row inserted/updated/deleted
+ij> select security from security where security > 0;
+SECURITY   
+-----------
+1          
+ij> select security from security security where security > 0;
+SECURITY   
+-----------
+1          
+ij> select security.security from security where security.security > 0;
+SECURITY   
+-----------
+1          
+ij> prepare security as 'select * from security';
+ij> execute security;
+SECURITY   
+-----------
+1          
+ij> create index security on security(security);
+0 rows inserted/updated/deleted
+ij> drop table SECURITY;
+0 rows inserted/updated/deleted
+ij> remove security;
 ij> 

Modified: db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/lang/nonreserved.sql
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/lang/nonreserved.sql?rev=787502&r1=787501&r2=787502&view=diff
==============================================================================
--- db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/lang/nonreserved.sql
(original)
+++ db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/lang/nonreserved.sql
Tue Jun 23 00:21:08 2009
@@ -223,3 +223,15 @@
 select count(i) from t1;
 select * from t1 where count(i)=i;
 drop table t1; 
+
+-- making SECURITY keyword nonreserved as fix for Derby-4268
+create table SECURITY (security int);
+insert into security values (1);
+select security from security where security > 0;
+select security from security security where security > 0;
+select security.security from security where security.security > 0;
+prepare security as 'select * from security';
+execute security;
+create index security on security(security);
+drop table SECURITY;
+remove security;



Mime
View raw message