db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r279451 - in /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests: master/dcl.out master/jdk15/dcl.out tests/lang/dcl.sql
Date Wed, 07 Sep 2005 22:48:17 GMT
Author: djd
Date: Wed Sep  7 15:48:13 2005
New Revision: 279451

URL: http://svn.apache.org/viewcvs?rev=279451&view=rev
Log:
DERBY-538 add test case for transactional state of modifying a jar file using sqlj.install_jar,
with rollback.

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

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/dcl.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/dcl.out?rev=279451&r1=279450&r2=279451&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/dcl.out
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/dcl.out
Wed Sep  7 15:48:13 2005
@@ -92,6 +92,41 @@
 1          |bill@ruletheworld.com         |NULL  
 2          |penguin@antartic.com          |NULL  
 3          |big@blue.com                  |NULL  
+ij> -- check the roll back of class loading.
+-- install a new jar in a transaction, see
+-- that the new class is used and then rollback
+-- the old class should be used after the rollback.
+AUTOCOMMIT OFF;
+ij> CALL SQLJ.REPLACE_JAR('file:extin/dcl_emc2.jar', 'EMC.MAIL_APP');
+0 rows inserted/updated/deleted
+ij> CALL EMC.ADDCONTACT(99, 'wormspam@soil.com');
+0 rows inserted/updated/deleted
+ij> SELECT id, e_mail, ok from EMC.CONTACTS;
+ID         |E_MAIL                        |OK    
+-------------------------------------------------
+1          |bill@ruletheworld.com         |NULL  
+2          |penguin@antartic.com          |NULL  
+3          |big@blue.com                  |NULL  
+99         |wormspam@soil.com             |0     
+ij> rollback;
+ij> AUTOCOMMIT ON;
+ij> SELECT id, e_mail, ok from EMC.CONTACTS;
+ID         |E_MAIL                        |OK    
+-------------------------------------------------
+1          |bill@ruletheworld.com         |NULL  
+2          |penguin@antartic.com          |NULL  
+3          |big@blue.com                  |NULL  
+ij> CALL EMC.ADDCONTACT(99, 'wormspam2@soil.com');
+0 rows inserted/updated/deleted
+ij> SELECT id, e_mail, ok from EMC.CONTACTS;
+ID         |E_MAIL                        |OK    
+-------------------------------------------------
+1          |bill@ruletheworld.com         |NULL  
+2          |penguin@antartic.com          |NULL  
+3          |big@blue.com                  |NULL  
+99         |wormspam2@soil.com            |NULL  
+ij> DELETE FROM EMC.CONTACTS WHERE ID = 99;
+1 row inserted/updated/deleted
 ij> -- now change the application to run checks on the e-mail
 -- address to ensure it is valid (in this case by seeing if
 -- simply includes 'spam' in the title.

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/jdk15/dcl.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/jdk15/dcl.out?rev=279451&r1=279450&r2=279451&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/jdk15/dcl.out
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/jdk15/dcl.out
Wed Sep  7 15:48:13 2005
@@ -92,6 +92,41 @@
 1          |bill@ruletheworld.com         |NULL  
 2          |penguin@antartic.com          |NULL  
 3          |big@blue.com                  |NULL  
+ij> -- check the roll back of class loading.
+-- install a new jar in a transaction, see
+-- that the new class is used and then rollback
+-- the old class should be used after the rollback.
+AUTOCOMMIT OFF;
+ij> CALL SQLJ.REPLACE_JAR('file:extin/dcl_emc2.jar', 'EMC.MAIL_APP');
+0 rows inserted/updated/deleted
+ij> CALL EMC.ADDCONTACT(99, 'wormspam@soil.com');
+0 rows inserted/updated/deleted
+ij> SELECT id, e_mail, ok from EMC.CONTACTS;
+ID         |E_MAIL                        |OK    
+-------------------------------------------------
+1          |bill@ruletheworld.com         |NULL  
+2          |penguin@antartic.com          |NULL  
+3          |big@blue.com                  |NULL  
+99         |wormspam@soil.com             |0     
+ij> rollback;
+ij> AUTOCOMMIT ON;
+ij> SELECT id, e_mail, ok from EMC.CONTACTS;
+ID         |E_MAIL                        |OK    
+-------------------------------------------------
+1          |bill@ruletheworld.com         |NULL  
+2          |penguin@antartic.com          |NULL  
+3          |big@blue.com                  |NULL  
+ij> CALL EMC.ADDCONTACT(99, 'wormspam2@soil.com');
+0 rows inserted/updated/deleted
+ij> SELECT id, e_mail, ok from EMC.CONTACTS;
+ID         |E_MAIL                        |OK    
+-------------------------------------------------
+1          |bill@ruletheworld.com         |NULL  
+2          |penguin@antartic.com          |NULL  
+3          |big@blue.com                  |NULL  
+99         |wormspam2@soil.com            |NULL  
+ij> DELETE FROM EMC.CONTACTS WHERE ID = 99;
+1 row inserted/updated/deleted
 ij> -- now change the application to run checks on the e-mail
 -- address to ensure it is valid (in this case by seeing if
 -- simply includes 'spam' in the title.

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/dcl.sql
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/dcl.sql?rev=279451&r1=279450&r2=279451&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/dcl.sql
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/dcl.sql
Wed Sep  7 15:48:13 2005
@@ -59,6 +59,21 @@
 CALL EMC.ADDCONTACT(3, 'big@blue.com');
 SELECT id, e_mail, ok from EMC.CONTACTS;
 
+-- check the roll back of class loading.
+-- install a new jar in a transaction, see
+-- that the new class is used and then rollback
+-- the old class should be used after the rollback.
+AUTOCOMMIT OFF;
+CALL SQLJ.REPLACE_JAR('file:extin/dcl_emc2.jar', 'EMC.MAIL_APP');
+CALL EMC.ADDCONTACT(99, 'wormspam@soil.com');
+SELECT id, e_mail, ok from EMC.CONTACTS;
+rollback;
+AUTOCOMMIT ON;
+SELECT id, e_mail, ok from EMC.CONTACTS;
+CALL EMC.ADDCONTACT(99, 'wormspam2@soil.com');
+SELECT id, e_mail, ok from EMC.CONTACTS;
+DELETE FROM EMC.CONTACTS WHERE ID = 99;
+
 -- now change the application to run checks on the e-mail
 -- address to ensure it is valid (in this case by seeing if
 -- simply includes 'spam' in the title.



Mime
View raw message