You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by km...@apache.org on 2009/06/19 03:11:02 UTC
svn commit: r786347 - in /db/derby/code/branches/10.3/java:
engine/org/apache/derby/impl/sql/compile/
testing/org/apache/derbyTesting/functionTests/master/
testing/org/apache/derbyTesting/functionTests/tests/lang/
Author: kmarsden
Date: Fri Jun 19 01:11:02 2009
New Revision: 786347
URL: http://svn.apache.org/viewvc?rev=786347&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.3/java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj
db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/master/nonreserved.out
db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/tests/lang/nonreserved.sql
Modified: db/derby/code/branches/10.3/java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.3/java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj?rev=786347&r1=786346&r2=786347&view=diff
==============================================================================
--- db/derby/code/branches/10.3/java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj (original)
+++ db/derby/code/branches/10.3/java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj Fri Jun 19 01:11:02 2009
@@ -13030,6 +13030,7 @@
| tok = <RS>
| tok = <SCALE>
| tok = <SAVEPOINT>
+ | tok = <SECURITY>
| tok = <SEQUENCE>
| tok = <SEQUENTIAL>
| tok = <SERIALIZABLE>
Modified: db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/master/nonreserved.out
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/master/nonreserved.out?rev=786347&r1=786346&r2=786347&view=diff
==============================================================================
--- db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/master/nonreserved.out (original)
+++ db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/master/nonreserved.out Fri Jun 19 01:11:02 2009
@@ -472,4 +472,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>
\ No newline at end of file
Modified: db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/tests/lang/nonreserved.sql
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/tests/lang/nonreserved.sql?rev=786347&r1=786346&r2=786347&view=diff
==============================================================================
--- db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/tests/lang/nonreserved.sql (original)
+++ db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/tests/lang/nonreserved.sql Fri Jun 19 01:11:02 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;