db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From be...@apache.org
Subject svn commit: r597604 - in /db/derby/code/trunk/java: engine/org/apache/derby/impl/sql/compile/ testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/ testing/org/apache/derbyTesting/functionTests/tests/lang/
Date Fri, 23 Nov 2007 09:00:47 GMT
Author: bernt
Date: Fri Nov 23 01:00:46 2007
New Revision: 597604

URL: http://svn.apache.org/viewvc?rev=597604&view=rev
Log:
DERBY-3220 <transition table or variable list> (ReferencingClause) in CREATE TRIGGER
statement not SQL compliant

Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CreateTriggerNode.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/tests/jdbcapi/BlobClob4BlobTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/TriggerTest.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CreateTriggerNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CreateTriggerNode.java?rev=597604&r1=597603&r2=597604&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CreateTriggerNode.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CreateTriggerNode.java
Fri Nov 23 01:00:46 2007
@@ -755,7 +755,7 @@
 			** 4) Additional restriction on BEFORE triggers
 			*/
 			if (this.isBefore && !trn.isRow) {
-			// OLD_TABLE and NEW_TABLE not allowed for BEFORE triggers.
+			// OLD TABLE and NEW TABLE not allowed for BEFORE triggers.
 				throw StandardException.newException(SQLState.LANG_TRIGGER_BAD_REF_MISMATCH, "BEFORE",
"row");
 			}
 

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=597604&r1=597603&r2=597604&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 Nov
23 01:00:46 2007
@@ -10491,9 +10491,9 @@
 }
 {
 	(
-	  <NEW> 
+	  <NEW> [ <ROW> | <TABLE> { isRow = false;} ]
 	  |
-	  <OLD> {isNew = false;}
+	  <OLD> {isNew = false;} [ <ROW> | <TABLE> { isRow = false;} ]
 	  |
 	  <NEW_TABLE> { isRow = false;}
 	  |

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/BlobClob4BlobTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/BlobClob4BlobTest.java?rev=597604&r1=597603&r2=597604&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/BlobClob4BlobTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/BlobClob4BlobTest.java
Fri Nov 23 01:00:46 2007
@@ -369,12 +369,12 @@
         stmt.executeUpdate(
                 "create trigger T13A after update on testClob " +
                 "referencing new as n old as o " +
-                "for each row mode db2sql "+
+                "for each row "+
                 "insert into testClobTriggerA(a, b) values (n.a, n.b)");
         stmt.executeUpdate(
                 "create trigger T13B after INSERT on testClobTriggerA " +
-                "referencing new_table as n " +
-                "for each statement mode db2sql "+
+                "referencing new table as n " +
+                "for each statement "+
                 "insert into testClobTriggerB(a, b) select n.a, n.b from n");
 
         commit();
@@ -1904,13 +1904,13 @@
         stmt.executeUpdate(
                 "create trigger T8A after update on testBlob " +
                 "referencing new as n old as o " +
-                "for each row mode db2sql "+
+                "for each row "+
                 "insert into blobTest8TriggerA(a, b, crc32) " +
                 "values (n.a, n.b, n.crc32)");
         stmt.executeUpdate(
                 "create trigger T8B after INSERT on blobTest8TriggerA " +
-                "referencing new_table as n " +
-                "for each statement mode db2sql "+
+                "referencing new table as n " +
+                "for each statement "+
                 "insert into blobTest8TriggerB(a, b, crc32) " +
                 "select n.a, n.b, n.crc32 from n");
 

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/TriggerTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/TriggerTest.java?rev=597604&r1=597603&r2=597604&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/TriggerTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/TriggerTest.java
Fri Nov 23 01:00:46 2007
@@ -484,7 +484,7 @@
         
         s.executeUpdate("CREATE TRIGGER AIS " +
                 "AFTER INSERT ON T_MAIN " +
-                "REFERENCING NEW_TABLE AS N " +
+                "REFERENCING NEW TABLE AS N " +
                 "FOR EACH STATEMENT " +      
                 "INSERT INTO T_ACTION_STATEMENT(A, V1, ID, V2) " +
                 "SELECT 'I', V, ID, V FROM N");
@@ -499,7 +499,7 @@
         
         s.executeUpdate("CREATE TRIGGER AUS " +
                 "AFTER UPDATE OF V ON T_MAIN " +
-                "REFERENCING NEW_TABLE AS N OLD_TABLE AS O " +
+                "REFERENCING NEW TABLE AS N OLD TABLE AS O " +
                 "FOR EACH STATEMENT " +      
                 "INSERT INTO T_ACTION_STATEMENT(A, V1, ID, V2) " +
                 "SELECT 'U', N.V, N.ID, O.V FROM N,O WHERE O.ID = N.ID");
@@ -514,7 +514,7 @@
         
         s.executeUpdate("CREATE TRIGGER ADS " +
                 "AFTER DELETE ON T_MAIN " +
-                "REFERENCING OLD_TABLE AS O " +
+                "REFERENCING OLD TABLE AS O " +
                 "FOR EACH STATEMENT " +      
                 "INSERT INTO T_ACTION_STATEMENT(A, V1, ID, V2) " +
                 "SELECT 'D', O.V, O.ID, O.V FROM O");        



Mime
View raw message