db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r393337 - in /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests: master/triggerGeneral.out tests/lang/triggerGeneral.sql
Date Wed, 12 Apr 2006 00:11:51 GMT
Author: djd
Date: Tue Apr 11 17:11:49 2006
New Revision: 393337

URL: http://svn.apache.org/viewcvs?rev=393337&view=rev
Log:
DERBY-1204 (test only) Add additional test cases that shows what work and what doesn't
with trigger actions and INSERT clauses with multiple rows. Test case that shows the 1204
bug is commented out.

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=393337&r1=393336&r2=393337&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
Tue Apr 11 17:11:49 2006
@@ -871,7 +871,62 @@
 0 rows inserted/updated/deleted
 ij> delete from x;
 1 row inserted/updated/deleted
-ij> drop table x;
+ij> create trigger tgood after insert on x
+for each statement mode db2sql insert into x values (666), (999), (333);
+0 rows inserted/updated/deleted
+ij> insert into x values 1;
+1 row inserted/updated/deleted
+ij> select * from x order by 1;
+X          
+-----------
+1          
+333        
+666        
+999        
+ij> drop trigger tgood;
+0 rows inserted/updated/deleted
+ij> delete from x;
+4 rows inserted/updated/deleted
+ij> create trigger tgood after insert on x
+referencing new as n
+for each row mode db2sql insert into x values (n.x);
+0 rows inserted/updated/deleted
+ij> insert into x values 7;
+1 row inserted/updated/deleted
+ij> select * from x order by 1;
+X          
+-----------
+7          
+7          
+ij> drop trigger tgood;
+0 rows inserted/updated/deleted
+ij> delete from x;
+2 rows inserted/updated/deleted
+ij> create trigger tgood after insert on x
+referencing new as n
+for each row mode db2sql insert into x values (333), (999), (333);
+0 rows inserted/updated/deleted
+ij> insert into x values 1;
+1 row inserted/updated/deleted
+ij> select * from x order by 1;
+X          
+-----------
+1          
+333        
+333        
+999        
+ij> drop trigger tgood;
+0 rows inserted/updated/deleted
+ij> -- DERBY-1204 trigger causes StringIndexOutOfBoundsException
+-- which half closes connection and causes rest of test to
+-- fail. Enable this trigger test case to resolve 1204.
+-- create trigger tgood after insert on x
+-- referencing new as n
+-- for each row mode db2sql insert into x values (n.x), (999), (333);
+-- insert into x values 1;
+-- select * from x order by 1;
+-- drop trigger tgood;
+drop table x;
 0 rows inserted/updated/deleted
 ij> -- Derby-388: When a set of inserts/updates is performed on a table
 -- and each update fires a trigger that in turn performs other updates,

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=393337&r1=393336&r2=393337&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
Tue Apr 11 17:11:49 2006
@@ -478,6 +478,38 @@
 drop trigger tgood;
 delete from x;
 
+create trigger tgood after insert on x
+for each statement mode db2sql insert into x values (666), (999), (333);
+insert into x values 1;
+select * from x order by 1;
+drop trigger tgood;
+delete from x;
+
+create trigger tgood after insert on x
+referencing new as n
+for each row mode db2sql insert into x values (n.x);
+insert into x values 7;
+select * from x order by 1;
+drop trigger tgood;
+delete from x;
+
+create trigger tgood after insert on x
+referencing new as n
+for each row mode db2sql insert into x values (333), (999), (333);
+insert into x values 1;
+select * from x order by 1;
+drop trigger tgood;
+
+-- DERBY-1204 trigger causes StringIndexOutOfBoundsException
+-- which half closes connection and causes rest of test to
+-- fail. Enable this trigger test case to resolve 1204.
+-- create trigger tgood after insert on x
+-- referencing new as n
+-- for each row mode db2sql insert into x values (n.x), (999), (333);
+-- insert into x values 1;
+-- select * from x order by 1;
+-- drop trigger tgood;
+
 drop table x;
 
 -- Derby-388: When a set of inserts/updates is performed on a table



Mime
View raw message