db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r153095 - in incubator/derby/code/trunk/java: engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj testing/org/apache/derbyTesting/functionTests/master/identifier.out testing/org/apache/derbyTesting/functionTests/tests/lang/identifier.sql
Date Wed, 09 Feb 2005 17:55:56 GMT
Author: djd
Date: Wed Feb  9 09:55:54 2005
New Revision: 153095

URL: http://svn.apache.org/viewcvs?view=rev&rev=153095
Log:
Fix Derby-139 - remove LOCAL as a SQL reserved word.

Modified:
    incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj
    incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/identifier.out
    incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/identifier.sql

Modified: incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj
URL: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj?view=diff&r1=153094&r2=153095
==============================================================================
--- incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj
(original)
+++ incubator/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj
Wed Feb  9 09:55:54 2005
@@ -1682,7 +1682,6 @@
 |	<LAST: "last">
 |	<LEFT: "left">
 |	<LIKE: "like">
-|	<LOCAL: "local">
 |	<LOWER: "lower">
 |	<MATCH: "match">
 |	<MAX: "max">
@@ -11096,6 +11095,9 @@
 
 		NOTE: The same ones are commented out here as above in the token
 		rule, for the same reason.
+		
+		Derby-139 - LOCAL removed as reserved word as most other
+		databases do not enforce it. LOCAL not used at all in grammar so token removed.
 	 */
 	(
  	/* SQL92 reserved Keywords */
@@ -11210,7 +11212,6 @@
 |	tok = <LAST>
 |	tok = <LEFT>
 |	tok = <LIKE>
-|	tok = <LOCAL>
 |	tok = <LOWER>
 |	tok = <MATCH>
 |	tok = <MAX>

Modified: incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/identifier.out
URL: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/identifier.out?view=diff&r1=153094&r2=153095
==============================================================================
--- incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/identifier.out
(original)
+++ incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/identifier.out
Wed Feb  9 09:55:54 2005
@@ -252,6 +252,29 @@
 2          |2          
 ij> DROP TABLE ZONE;
 0 rows inserted/updated/deleted
+ij> CREATE TABLE LOCAL (LOCAL INT, A INT);
+0 rows inserted/updated/deleted
+ij> INSERT INTO LOCAL (LOCAL) VALUES (1);
+1 row inserted/updated/deleted
+ij> INSERT INTO LOCAL VALUES (2, 2);
+1 row inserted/updated/deleted
+ij> SELECT * FROM LOCAL;
+LOCAL      |A          
+-----------------------
+1          |NULL       
+2          |2          
+ij> SELECT LOCAL.LOCAL, LOCAL FROM LOCAL;
+LOCAL      |LOCAL      
+-----------------------
+1          |1          
+2          |2          
+ij> SELECT LOCAL.LOCAL, LOCAL FROM LOCAL LOCAL;
+LOCAL      |LOCAL      
+-----------------------
+1          |1          
+2          |2          
+ij> DROP TABLE LOCAL;
+0 rows inserted/updated/deleted
 ij> -- Negative tests
 -- Novera wanted 0-length delimited identifiers but for db2-compatibility, we are going to
stop supporting 0-length delimited identifiers
 -- test1

Modified: incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/identifier.sql
URL: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/identifier.sql?view=diff&r1=153094&r2=153095
==============================================================================
--- incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/identifier.sql
(original)
+++ incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/identifier.sql
Wed Feb  9 09:55:54 2005
@@ -150,6 +150,13 @@
 SELECT ZONE.ZONE, ZONE FROM ZONE ZONE;
 DROP TABLE ZONE;
 
+CREATE TABLE LOCAL (LOCAL INT, A INT);
+INSERT INTO LOCAL (LOCAL) VALUES (1);
+INSERT INTO LOCAL VALUES (2, 2);
+SELECT * FROM LOCAL;
+SELECT LOCAL.LOCAL, LOCAL FROM LOCAL;
+SELECT LOCAL.LOCAL, LOCAL FROM LOCAL LOCAL;
+DROP TABLE LOCAL;
 
 -- Negative tests
 -- Novera wanted 0-length delimited identifiers but for db2-compatibility, we are going to
stop supporting 0-length delimited identifiers



Mime
View raw message