db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r385376 - in /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests: master/triggerGeneral.out tests/lang/triggerGeneral.sql
Date Sun, 12 Mar 2006 22:18:59 GMT
Author: djd
Date: Sun Mar 12 14:18:58 2006
New Revision: 385376

URL: http://svn.apache.org/viewcvs?rev=385376&view=rev
Log:
DERBY-1102 (partial) Remove triggers that only display trigger context information
since this is no longer part of the api. No need to rewrite any of the test cases
as they are not applicable for the triggers that Derby supports.

Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/triggerGeneral.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/triggerGeneral.sql

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/triggerGeneral.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/triggerGeneral.out?rev=385376&r1=385375&r2=385376&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/triggerGeneral.out
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/triggerGeneral.out
Sun Mar 12 14:18:58 2006
@@ -1,10 +1,7 @@
 ij> --
 -- General trigger test
 --
-create function printTriggerInfo() returns varchar(1) PARAMETER STYLE JAVA LANGUAGE JAVA
NO SQL
-  EXTERNAL NAME 'org.apache.derbyTesting.functionTests.util.Triggers.printTriggerInfo';
-0 rows inserted/updated/deleted
-ij> create function triggerFiresMin(s varchar(128)) returns varchar(1) PARAMETER STYLE
JAVA LANGUAGE JAVA NO SQL
+create function triggerFiresMin(s varchar(128)) returns varchar(1) PARAMETER STYLE JAVA LANGUAGE
JAVA NO SQL
   EXTERNAL NAME 'org.apache.derbyTesting.functionTests.util.Triggers.triggerFiresMinimal';
 0 rows inserted/updated/deleted
 ij> create function triggerFires(s varchar(128)) returns varchar(1) PARAMETER STYLE JAVA
LANGUAGE JAVA NO SQL
@@ -204,188 +201,7 @@
 ij> -- ok this time
 drop schema test restrict;
 0 rows inserted/updated/deleted
-ij> --
--- Test the information in the trigger information context
---
-create table t (x int, y int, c char(1));
-0 rows inserted/updated/deleted
-ij> create trigger t1 NO CASCADE before insert on t for each statement mode db2sql
-	values app.printTriggerInfo();
-0 rows inserted/updated/deleted
-ij> insert into t values (1,1,'1');
-TriggerInformation
-------------------
-getEventStatetmentText(): insert into t values (1,1,'1')
-getEventType(): INSERT
-getModifiedColumns(): { <all> }
-wasColumnModified() on each column
-	X:	true
-	Y:	true
-	C:	true
-BEFORE RESULT SET
-<NULL>
-AFTER RESULT SET
-	 X,Y,C
-	 - - -
-	{1,1,1}
-1 row inserted/updated/deleted
-ij> delete from t;
-1 row inserted/updated/deleted
-ij> drop trigger t1;
-0 rows inserted/updated/deleted
-ij> create trigger t1 after insert on t for each statement mode db2sql
-	values app.printTriggerInfo();
-0 rows inserted/updated/deleted
-ij> insert into t values (1,1,'1');
-TriggerInformation
-------------------
-getEventStatetmentText(): insert into t values (1,1,'1')
-getEventType(): INSERT
-getModifiedColumns(): { <all> }
-wasColumnModified() on each column
-	X:	true
-	Y:	true
-	C:	true
-BEFORE RESULT SET
-<NULL>
-AFTER RESULT SET
-	 X,Y,C
-	 - - -
-	{1,1,1}
-1 row inserted/updated/deleted
-ij> drop trigger t1;
-0 rows inserted/updated/deleted
-ij> create trigger t1 NO CASCADE before update on t for each statement mode db2sql
-	values app.printTriggerInfo();
-0 rows inserted/updated/deleted
-ij> update t set x = 2;
-TriggerInformation
-------------------
-getEventStatetmentText(): update t set x = 2
-getEventType(): UPDATE
-getModifiedColumns(): {X}
-wasColumnModified() on each column
-	X:	true
-	Y:	false
-	C:	false
-BEFORE RESULT SET
-	 X,Y,C
-	 - - -
-	{1,1,1}
-AFTER RESULT SET
-	 X,Y,C
-	 - - -
-	{2,1,1}
-1 row inserted/updated/deleted
-ij> update t set y = 2, c = '2';
-TriggerInformation
-------------------
-getEventStatetmentText(): update t set y = 2, c = '2'
-getEventType(): UPDATE
-getModifiedColumns(): {Y, C}
-wasColumnModified() on each column
-	X:	false
-	Y:	true
-	C:	true
-BEFORE RESULT SET
-	 X,Y,C
-	 - - -
-	{2,1,1}
-AFTER RESULT SET
-	 X,Y,C
-	 - - -
-	{2,2,2}
-1 row inserted/updated/deleted
-ij> drop trigger t1;
-0 rows inserted/updated/deleted
-ij> create trigger t1 after update on t for each statement mode db2sql
-	values app.printTriggerInfo();
-0 rows inserted/updated/deleted
-ij> update t set x = 3;
-TriggerInformation
-------------------
-getEventStatetmentText(): update t set x = 3
-getEventType(): UPDATE
-getModifiedColumns(): {X}
-wasColumnModified() on each column
-	X:	true
-	Y:	false
-	C:	false
-BEFORE RESULT SET
-	 X,Y,C
-	 - - -
-	{2,2,2}
-AFTER RESULT SET
-	 X,Y,C
-	 - - -
-	{3,2,2}
-1 row inserted/updated/deleted
-ij> update t set y = 3, c = '3';
-TriggerInformation
-------------------
-getEventStatetmentText(): update t set y = 3, c = '3'
-getEventType(): UPDATE
-getModifiedColumns(): {Y, C}
-wasColumnModified() on each column
-	X:	false
-	Y:	true
-	C:	true
-BEFORE RESULT SET
-	 X,Y,C
-	 - - -
-	{3,2,2}
-AFTER RESULT SET
-	 X,Y,C
-	 - - -
-	{3,3,3}
-1 row inserted/updated/deleted
-ij> drop trigger t1;
-0 rows inserted/updated/deleted
-ij> create trigger t1 no cascade before delete on t for each statement mode db2sql
-	values app.printTriggerInfo();
-0 rows inserted/updated/deleted
-ij> delete from t;
-TriggerInformation
-------------------
-getEventStatetmentText(): delete from t
-getEventType(): DELETE
-getModifiedColumns(): { <all> }
-wasColumnModified() on each column
-	X:	true
-	Y:	true
-	C:	true
-BEFORE RESULT SET
-	 X,Y,C
-	 - - -
-	{3,3,3}
-AFTER RESULT SET
-<NULL>
-1 row inserted/updated/deleted
-ij> drop trigger t1;
-0 rows inserted/updated/deleted
-ij> insert into t values(3,3,'3');
-1 row inserted/updated/deleted
-ij> create trigger t1 after delete on t for each statement mode db2sql
-	values app.printTriggerInfo();
-0 rows inserted/updated/deleted
-ij> delete from t;
-TriggerInformation
-------------------
-getEventStatetmentText(): delete from t
-getEventType(): DELETE
-getModifiedColumns(): { <all> }
-wasColumnModified() on each column
-	X:	true
-	Y:	true
-	C:	true
-BEFORE RESULT SET
-	 X,Y,C
-	 - - -
-	{3,3,3}
-AFTER RESULT SET
-<NULL>
-1 row inserted/updated/deleted
-ij> drop trigger t1;
+ij> create table t (x int, y int, c char(1));
 0 rows inserted/updated/deleted
 ij> --
 -- Test trigger firing order
@@ -631,140 +447,6 @@
 ij> drop trigger t2;
 0 rows inserted/updated/deleted
 ij> drop table x;
-0 rows inserted/updated/deleted
-ij> --
--- After alter table, should pick up the new columns
---
-create table talt(c1 int);
-0 rows inserted/updated/deleted
-ij> create trigger tins after insert on talt for each statement mode db2sql
-	values app.printTriggerInfo();
-0 rows inserted/updated/deleted
-ij> create trigger tdel no cascade before delete on talt for each row mode db2sql
-	values app.printTriggerInfo();
-0 rows inserted/updated/deleted
-ij> create trigger tupd after update on talt for each statement mode db2sql
-	values app.printTriggerInfo();
-0 rows inserted/updated/deleted
-ij> insert into talt values (1);
-TriggerInformation
-------------------
-getEventStatetmentText(): insert into talt values (1)
-getEventType(): INSERT
-getModifiedColumns(): { <all> }
-wasColumnModified() on each column
-	C1:	true
-BEFORE RESULT SET
-<NULL>
-AFTER RESULT SET
-	 C1
-	 --
-	{1}
-1 row inserted/updated/deleted
-ij> alter table talt add column cnew int default null;
-0 rows inserted/updated/deleted
-ij> select * from talt;
-C1         |CNEW       
------------------------
-1          |NULL       
-ij> insert into talt values (2,2);
-TriggerInformation
-------------------
-getEventStatetmentText(): insert into talt values (2,2)
-getEventType(): INSERT
-getModifiedColumns(): { <all> }
-wasColumnModified() on each column
-	C1:	true
-	CNEW:	true
-BEFORE RESULT SET
-<NULL>
-AFTER RESULT SET
-	 C1,CNEW
-	 -- ----
-	{2,2}
-1 row inserted/updated/deleted
-ij> delete from talt;
-TriggerInformation
-------------------
-getEventStatetmentText(): delete from talt
-getEventType(): DELETE
-getModifiedColumns(): { <all> }
-wasColumnModified() on each column
-	C1:	true
-	CNEW:	true
-BEFORE RESULT SET
-	 C1,CNEW
-	 -- ----
-	{1,null}
-AFTER RESULT SET
-<NULL>
-TriggerInformation
-------------------
-getEventStatetmentText(): delete from talt
-getEventType(): DELETE
-getModifiedColumns(): { <all> }
-wasColumnModified() on each column
-	C1:	true
-	CNEW:	true
-BEFORE RESULT SET
-	 C1,CNEW
-	 -- ----
-	{2,2}
-AFTER RESULT SET
-<NULL>
-2 rows inserted/updated/deleted
-ij> insert into talt values (3,3);
-TriggerInformation
-------------------
-getEventStatetmentText(): insert into talt values (3,3)
-getEventType(): INSERT
-getModifiedColumns(): { <all> }
-wasColumnModified() on each column
-	C1:	true
-	CNEW:	true
-BEFORE RESULT SET
-<NULL>
-AFTER RESULT SET
-	 C1,CNEW
-	 -- ----
-	{3,3}
-1 row inserted/updated/deleted
-ij> update talt set cnew = 666;
-TriggerInformation
-------------------
-getEventStatetmentText(): update talt set cnew = 666
-getEventType(): UPDATE
-getModifiedColumns(): {CNEW}
-wasColumnModified() on each column
-	C1:	false
-	CNEW:	true
-BEFORE RESULT SET
-	 C1,CNEW
-	 -- ----
-	{3,3}
-AFTER RESULT SET
-	 C1,CNEW
-	 -- ----
-	{3,666}
-1 row inserted/updated/deleted
-ij> drop trigger tins;
-0 rows inserted/updated/deleted
-ij> drop trigger tdel;
-0 rows inserted/updated/deleted
-ij> drop trigger tupd;
-0 rows inserted/updated/deleted
-ij> -- make sure update w/ columns doesn't pick up new col
-create trigger tupd after update of c1 on talt for each statement mode db2sql
-	values app.printTriggerInfo();
-0 rows inserted/updated/deleted
-ij> alter table talt add column cnew2 int default null;
-0 rows inserted/updated/deleted
-ij> insert into talt values (1,1,1);
-1 row inserted/updated/deleted
-ij> update talt set cnew2 = 666;
-2 rows inserted/updated/deleted
-ij> -- clean up
-drop table talt;
 0 rows inserted/updated/deleted
 ij> --
 -- Trigger ordering wrt constraints

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/triggerGeneral.sql
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/triggerGeneral.sql?rev=385376&r1=385375&r2=385376&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/triggerGeneral.sql
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/triggerGeneral.sql
Sun Mar 12 14:18:58 2006
@@ -2,8 +2,6 @@
 -- General trigger test
 --
 
-create function printTriggerInfo() returns varchar(1) PARAMETER STYLE JAVA LANGUAGE JAVA
NO SQL
-  EXTERNAL NAME 'org.apache.derbyTesting.functionTests.util.Triggers.printTriggerInfo';
 create function triggerFiresMin(s varchar(128)) returns varchar(1) PARAMETER STYLE JAVA LANGUAGE
JAVA NO SQL
   EXTERNAL NAME 'org.apache.derbyTesting.functionTests.util.Triggers.triggerFiresMinimal';
 create function triggerFires(s varchar(128)) returns varchar(1) PARAMETER STYLE JAVA LANGUAGE
JAVA NO SQL
@@ -154,43 +152,7 @@
 -- ok this time
 drop schema test restrict;
 
---
--- Test the information in the trigger information context
---
 create table t (x int, y int, c char(1));
-create trigger t1 NO CASCADE before insert on t for each statement mode db2sql
-	values app.printTriggerInfo();
-insert into t values (1,1,'1');
-
-delete from t;
-drop trigger t1;
-create trigger t1 after insert on t for each statement mode db2sql
-	values app.printTriggerInfo();
-insert into t values (1,1,'1');
-
-drop trigger t1;
-create trigger t1 NO CASCADE before update on t for each statement mode db2sql
-	values app.printTriggerInfo();
-update t set x = 2;
-update t set y = 2, c = '2';
-
-drop trigger t1;
-create trigger t1 after update on t for each statement mode db2sql
-	values app.printTriggerInfo();
-update t set x = 3;
-update t set y = 3, c = '3';
-
-drop trigger t1;
-create trigger t1 no cascade before delete on t for each statement mode db2sql
-	values app.printTriggerInfo();
-delete from t;
-drop trigger t1;
-
-insert into t values(3,3,'3');
-create trigger t1 after delete on t for each statement mode db2sql
-	values app.printTriggerInfo();
-delete from t;
-drop trigger t1;
 
 --
 -- Test trigger firing order
@@ -265,40 +227,6 @@
 drop trigger t1;
 drop trigger t2;
 drop table x;
-
-
---
--- After alter table, should pick up the new columns
---
-create table talt(c1 int);
-create trigger tins after insert on talt for each statement mode db2sql
-	values app.printTriggerInfo();
-create trigger tdel no cascade before delete on talt for each row mode db2sql
-	values app.printTriggerInfo();
-create trigger tupd after update on talt for each statement mode db2sql
-	values app.printTriggerInfo();
-insert into talt values (1);
-alter table talt add column cnew int default null;
-select * from talt;
-
-insert into talt values (2,2);
-delete from talt;
-insert into talt values (3,3);
-update talt set cnew = 666;
-drop trigger tins;
-drop trigger tdel;
-drop trigger tupd;
-
--- make sure update w/ columns doesn't pick up new col
-create trigger tupd after update of c1 on talt for each statement mode db2sql
-	values app.printTriggerInfo();
-alter table talt add column cnew2 int default null;
-insert into talt values (1,1,1);
-update talt set cnew2 = 666;
-
--- clean up
-drop table talt;
-
 
 --
 -- Trigger ordering wrt constraints



Mime
View raw message