You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by dj...@apache.org on 2005/09/01 20:36:00 UTC
svn commit: r265763 - in
/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests:
master/dcl.out master/jdk15/dcl.out tests/lang/copyfiles.ant
tests/lang/dcl.sql tests/lang/dcl_emc2.jar tests/lang/dcl_emc2s.jar
tests/lang/dcl_readOnly.sql
Author: djd
Date: Thu Sep 1 11:35:38 2005
New Revision: 265763
URL: http://svn.apache.org/viewcvs?rev=265763&view=rev
Log:
DERBY-538 Merge test cases from dbjar.sql into dcl.sql to avoid having to write
test cases in two places. Add tests for reading resources from jarfiles stored
in the database when the database is archived in a jar file.
Added:
db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/dcl_readOnly.sql (with props)
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/copyfiles.ant
db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/dcl.sql
db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/dcl_emc2.jar
db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/dcl_emc2s.jar
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=265763&r1=265762&r2=265763&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 Thu Sep 1 11:35:38 2005
@@ -167,6 +167,22 @@
1
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
NULL
+ij> -- Jar up this database (wombat) for use in database in a jar testing
+-- at the end of this script.
+disconnect;
+ij> connect 'jdbc:derby:wombat;shutdown=true';
+ERROR 08006: Database 'wombat' shutdown.
+ij> -- jar up the database
+connect 'jdbc:derby:db1;create=true';
+ij> create procedure CREATEARCHIVE(jarName VARCHAR(20), path VARCHAR(20), dbName VARCHAR(20))
+LANGUAGE JAVA PARAMETER STYLE JAVA
+NO SQL
+EXTERNAL NAME 'org.apache.derbyTesting.functionTests.tests.lang.dbjarUtil.createArchive';
+0 rows inserted/updated/deleted
+ij> call CREATEARCHIVE('ina.jar', 'wombat', 'db7');
+0 rows inserted/updated/deleted
+ij> disconnect;
+ij> connect 'jdbc:derby:wombat';
ij> -- replace with a hacked jar file, emc.class modified to diable
-- valid e-mail address check but using same signatures.
-- ie direct replacement of the .class file.
@@ -215,4 +231,132 @@
0 rows inserted/updated/deleted
ij> DROP TABLE EMC.CONTACTS;
0 rows inserted/updated/deleted
+ij> disconnect;
+ij> -- test reading a database from a jar file and loading
+-- classes etc. from the jars within the database.
+-- first using the jar protocol and then the classpath option.
+connect 'jdbc:derby:jar:(ina.jar)db7' AS DB7;
+ij> run resource '/org/apache/derbyTesting/functionTests/tests/lang/dcl_readOnly.sql';
+ij> -- common tests for read-only jarred database
+select * from EMC.CONTACTS;
+ID |E_MAIL |OK
+-------------------------------------------------
+1 |bill@ruletheworld.com |NULL
+2 |penguin@antartic.com |NULL
+3 |big@blue.com |NULL
+4 |spammer@ripoff.com |0
+5 |open@source.org |1
+ij> select e_mail, "emcAddOn".VALIDCONTACT(e_mail) from EMC.CONTACTS;
+E_MAIL |2
+-------------------------------------
+bill@ruletheworld.com |0
+penguin@antartic.com |0
+big@blue.com |0
+spammer@ripoff.com |0
+open@source.org |1
+ij> insert into EMC.CONTACTS values(3, 'no@is_read_only.gov', NULL);
+ERROR 25502: An SQL data change is not permitted for a read-only connection, user or database.
+ij> CALL EMC.ADDCONTACT(3, 'really@is_read_only.gov');
+ERROR 25502: An SQL data change is not permitted for a read-only connection, user or database.
+ij> -- same set as dcl.sql for reading resources
+-- VALUES EMC.GETARTICLE('graduate.txt');
+-- VALUES EMC.GETARTICLE('/article/release.txt');
+-- VALUES EMC.GETARTICLE('/article/fred.txt');
+-- VALUES EMC.GETARTICLE('barney.txt');
+-- VALUES EMC.GETARTICLE('emc.class');
+-- VALUES EMC.GETARTICLE('/org/apache/derbyTesting/databaseclassloader/emc.class');
+-- signed
+VALUES EMC.GETSIGNERS('org.apache.derbyTesting.databaseclassloader.emc');
+1
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+CN=EMC CTO, OU=EMC APP, O=Easy Mail Company, C=US
+ij> -- not signed
+VALUES EMC.GETSIGNERS('org.apache.derbyTesting.databaseclassloader.addon.vendor.util');
+1
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+NULL
+ij> -- ensure that a read-only database automatically gets table locking
+autocommit off;
+ij> select * from EMC.CONTACTS WITH RR;
+ID |E_MAIL |OK
+-------------------------------------------------
+1 |bill@ruletheworld.com |NULL
+2 |penguin@antartic.com |NULL
+3 |big@blue.com |NULL
+4 |spammer@ripoff.com |0
+5 |open@source.org |1
+ij> select TYPE, MODE, TABLENAME from new org.apache.derby.diag.LockTable() AS L ORDER BY 1,2,3;
+TYPE |MODE|TABLENAME
+-------------------------------------------------------------------------------------------------------------------------------------------
+TABLE|S |CONTACTS
+ij> disconnect;
+ij> -- connect to database in jar file via classpath
+-- should fail as it is not on the classpath yet.
+connect 'jdbc:derby:classpath:db7' AS DB7CLF;
+ERROR XJ004: Database 'classpath:db7' not found.
+ij> -- create a class loader for this current thread
+connect 'jdbc:derby:db1';
+ij> create procedure setDBContextClassLoader(JARNAME VARCHAR(20))
+LANGUAGE JAVA PARAMETER STYLE JAVA
+NO SQL
+EXTERNAL NAME 'org.apache.derbyTesting.functionTests.tests.lang.dbjarUtil.setDBContextClassLoader';
+0 rows inserted/updated/deleted
+ij> call setDBContextClassLoader('ina.jar');
+0 rows inserted/updated/deleted
+ij> disconnect;
+ij> connect 'jdbc:derby:classpath:db7' AS DB7CL;
+ij> run resource '/org/apache/derbyTesting/functionTests/tests/lang/dcl_readOnly.sql';
+ij> -- common tests for read-only jarred database
+select * from EMC.CONTACTS;
+ID |E_MAIL |OK
+-------------------------------------------------
+1 |bill@ruletheworld.com |NULL
+2 |penguin@antartic.com |NULL
+3 |big@blue.com |NULL
+4 |spammer@ripoff.com |0
+5 |open@source.org |1
+ij> select e_mail, "emcAddOn".VALIDCONTACT(e_mail) from EMC.CONTACTS;
+E_MAIL |2
+-------------------------------------
+bill@ruletheworld.com |0
+penguin@antartic.com |0
+big@blue.com |0
+spammer@ripoff.com |0
+open@source.org |1
+ij> insert into EMC.CONTACTS values(3, 'no@is_read_only.gov', NULL);
+ERROR 25502: An SQL data change is not permitted for a read-only connection, user or database.
+ij> CALL EMC.ADDCONTACT(3, 'really@is_read_only.gov');
+ERROR 25502: An SQL data change is not permitted for a read-only connection, user or database.
+ij> -- same set as dcl.sql for reading resources
+-- VALUES EMC.GETARTICLE('graduate.txt');
+-- VALUES EMC.GETARTICLE('/article/release.txt');
+-- VALUES EMC.GETARTICLE('/article/fred.txt');
+-- VALUES EMC.GETARTICLE('barney.txt');
+-- VALUES EMC.GETARTICLE('emc.class');
+-- VALUES EMC.GETARTICLE('/org/apache/derbyTesting/databaseclassloader/emc.class');
+-- signed
+VALUES EMC.GETSIGNERS('org.apache.derbyTesting.databaseclassloader.emc');
+1
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+CN=EMC CTO, OU=EMC APP, O=Easy Mail Company, C=US
+ij> -- not signed
+VALUES EMC.GETSIGNERS('org.apache.derbyTesting.databaseclassloader.addon.vendor.util');
+1
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+NULL
+ij> -- ensure that a read-only database automatically gets table locking
+autocommit off;
+ij> select * from EMC.CONTACTS WITH RR;
+ID |E_MAIL |OK
+-------------------------------------------------
+1 |bill@ruletheworld.com |NULL
+2 |penguin@antartic.com |NULL
+3 |big@blue.com |NULL
+4 |spammer@ripoff.com |0
+5 |open@source.org |1
+ij> select TYPE, MODE, TABLENAME from new org.apache.derby.diag.LockTable() AS L ORDER BY 1,2,3;
+TYPE |MODE|TABLENAME
+-------------------------------------------------------------------------------------------------------------------------------------------
+TABLE|S |CONTACTS
+ij> disconnect;
ij>
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=265763&r1=265762&r2=265763&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 Thu Sep 1 11:35:38 2005
@@ -167,6 +167,22 @@
1
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
NULL
+ij> -- Jar up this database (wombat) for use in database in a jar testing
+-- at the end of this script.
+disconnect;
+ij> connect 'jdbc:derby:wombat;shutdown=true';
+ERROR 08006: Database 'wombat' shutdown.
+ij> -- jar up the database
+connect 'jdbc:derby:db1;create=true';
+ij> create procedure CREATEARCHIVE(jarName VARCHAR(20), path VARCHAR(20), dbName VARCHAR(20))
+LANGUAGE JAVA PARAMETER STYLE JAVA
+NO SQL
+EXTERNAL NAME 'org.apache.derbyTesting.functionTests.tests.lang.dbjarUtil.createArchive';
+0 rows inserted/updated/deleted
+ij> call CREATEARCHIVE('ina.jar', 'wombat', 'db7');
+0 rows inserted/updated/deleted
+ij> disconnect;
+ij> connect 'jdbc:derby:wombat';
ij> -- replace with a hacked jar file, emc.class modified to diable
-- valid e-mail address check but using same signatures.
-- ie direct replacement of the .class file.
@@ -215,4 +231,132 @@
0 rows inserted/updated/deleted
ij> DROP TABLE EMC.CONTACTS;
0 rows inserted/updated/deleted
+ij> disconnect;
+ij> -- test reading a database from a jar file and loading
+-- classes etc. from the jars within the database.
+-- first using the jar protocol and then the classpath option.
+connect 'jdbc:derby:jar:(ina.jar)db7' AS DB7;
+ij> run resource '/org/apache/derbyTesting/functionTests/tests/lang/dcl_readOnly.sql';
+ij> -- common tests for read-only jarred database
+select * from EMC.CONTACTS;
+ID |E_MAIL |OK
+-------------------------------------------------
+1 |bill@ruletheworld.com |NULL
+2 |penguin@antartic.com |NULL
+3 |big@blue.com |NULL
+4 |spammer@ripoff.com |0
+5 |open@source.org |1
+ij> select e_mail, "emcAddOn".VALIDCONTACT(e_mail) from EMC.CONTACTS;
+E_MAIL |2
+-------------------------------------
+bill@ruletheworld.com |0
+penguin@antartic.com |0
+big@blue.com |0
+spammer@ripoff.com |0
+open@source.org |1
+ij> insert into EMC.CONTACTS values(3, 'no@is_read_only.gov', NULL);
+ERROR 25502: An SQL data change is not permitted for a read-only connection, user or database.
+ij> CALL EMC.ADDCONTACT(3, 'really@is_read_only.gov');
+ERROR 25502: An SQL data change is not permitted for a read-only connection, user or database.
+ij> -- same set as dcl.sql for reading resources
+-- VALUES EMC.GETARTICLE('graduate.txt');
+-- VALUES EMC.GETARTICLE('/article/release.txt');
+-- VALUES EMC.GETARTICLE('/article/fred.txt');
+-- VALUES EMC.GETARTICLE('barney.txt');
+-- VALUES EMC.GETARTICLE('emc.class');
+-- VALUES EMC.GETARTICLE('/org/apache/derbyTesting/databaseclassloader/emc.class');
+-- signed
+VALUES EMC.GETSIGNERS('org.apache.derbyTesting.databaseclassloader.emc');
+1
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+NULL
+ij> -- not signed
+VALUES EMC.GETSIGNERS('org.apache.derbyTesting.databaseclassloader.addon.vendor.util');
+1
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+NULL
+ij> -- ensure that a read-only database automatically gets table locking
+autocommit off;
+ij> select * from EMC.CONTACTS WITH RR;
+ID |E_MAIL |OK
+-------------------------------------------------
+1 |bill@ruletheworld.com |NULL
+2 |penguin@antartic.com |NULL
+3 |big@blue.com |NULL
+4 |spammer@ripoff.com |0
+5 |open@source.org |1
+ij> select TYPE, MODE, TABLENAME from new org.apache.derby.diag.LockTable() AS L ORDER BY 1,2,3;
+TYPE |MODE|TABLENAME
+-------------------------------------------------------------------------------------------------------------------------------------------
+TABLE|S |CONTACTS
+ij> disconnect;
+ij> -- connect to database in jar file via classpath
+-- should fail as it is not on the classpath yet.
+connect 'jdbc:derby:classpath:db7' AS DB7CLF;
+ERROR XJ004: Database 'classpath:db7' not found.
+ij> -- create a class loader for this current thread
+connect 'jdbc:derby:db1';
+ij> create procedure setDBContextClassLoader(JARNAME VARCHAR(20))
+LANGUAGE JAVA PARAMETER STYLE JAVA
+NO SQL
+EXTERNAL NAME 'org.apache.derbyTesting.functionTests.tests.lang.dbjarUtil.setDBContextClassLoader';
+0 rows inserted/updated/deleted
+ij> call setDBContextClassLoader('ina.jar');
+0 rows inserted/updated/deleted
+ij> disconnect;
+ij> connect 'jdbc:derby:classpath:db7' AS DB7CL;
+ij> run resource '/org/apache/derbyTesting/functionTests/tests/lang/dcl_readOnly.sql';
+ij> -- common tests for read-only jarred database
+select * from EMC.CONTACTS;
+ID |E_MAIL |OK
+-------------------------------------------------
+1 |bill@ruletheworld.com |NULL
+2 |penguin@antartic.com |NULL
+3 |big@blue.com |NULL
+4 |spammer@ripoff.com |0
+5 |open@source.org |1
+ij> select e_mail, "emcAddOn".VALIDCONTACT(e_mail) from EMC.CONTACTS;
+E_MAIL |2
+-------------------------------------
+bill@ruletheworld.com |0
+penguin@antartic.com |0
+big@blue.com |0
+spammer@ripoff.com |0
+open@source.org |1
+ij> insert into EMC.CONTACTS values(3, 'no@is_read_only.gov', NULL);
+ERROR 25502: An SQL data change is not permitted for a read-only connection, user or database.
+ij> CALL EMC.ADDCONTACT(3, 'really@is_read_only.gov');
+ERROR 25502: An SQL data change is not permitted for a read-only connection, user or database.
+ij> -- same set as dcl.sql for reading resources
+-- VALUES EMC.GETARTICLE('graduate.txt');
+-- VALUES EMC.GETARTICLE('/article/release.txt');
+-- VALUES EMC.GETARTICLE('/article/fred.txt');
+-- VALUES EMC.GETARTICLE('barney.txt');
+-- VALUES EMC.GETARTICLE('emc.class');
+-- VALUES EMC.GETARTICLE('/org/apache/derbyTesting/databaseclassloader/emc.class');
+-- signed
+VALUES EMC.GETSIGNERS('org.apache.derbyTesting.databaseclassloader.emc');
+1
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+NULL
+ij> -- not signed
+VALUES EMC.GETSIGNERS('org.apache.derbyTesting.databaseclassloader.addon.vendor.util');
+1
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+NULL
+ij> -- ensure that a read-only database automatically gets table locking
+autocommit off;
+ij> select * from EMC.CONTACTS WITH RR;
+ID |E_MAIL |OK
+-------------------------------------------------
+1 |bill@ruletheworld.com |NULL
+2 |penguin@antartic.com |NULL
+3 |big@blue.com |NULL
+4 |spammer@ripoff.com |0
+5 |open@source.org |1
+ij> select TYPE, MODE, TABLENAME from new org.apache.derby.diag.LockTable() AS L ORDER BY 1,2,3;
+TYPE |MODE|TABLENAME
+-------------------------------------------------------------------------------------------------------------------------------------------
+TABLE|S |CONTACTS
+ij> disconnect;
ij>
Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/copyfiles.ant
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/copyfiles.ant?rev=265763&r1=265762&r2=265763&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/copyfiles.ant (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/copyfiles.ant Thu Sep 1 11:35:38 2005
@@ -60,6 +60,7 @@
dcl_emc2s.jar
dcl_emc2sm.jar
dcl_emcaddon.jar
+dcl_readOnly.sql
ddlTableLockMode.sql
ddlTableLockMode_app.properties
deadlockMode_derby.properties
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=265763&r1=265762&r2=265763&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 Thu Sep 1 11:35:38 2005
@@ -113,6 +113,23 @@
-- other jar should not be signed
VALUES EMC.GETSIGNERS('org.apache.derbyTesting.databaseclassloader.addon.vendor.util');
+-- Jar up this database (wombat) for use in database in a jar testing
+-- at the end of this script.
+disconnect;
+connect 'jdbc:derby:wombat;shutdown=true';
+
+-- jar up the database
+connect 'jdbc:derby:db1;create=true';
+create procedure CREATEARCHIVE(jarName VARCHAR(20), path VARCHAR(20), dbName VARCHAR(20))
+LANGUAGE JAVA PARAMETER STYLE JAVA
+NO SQL
+EXTERNAL NAME 'org.apache.derbyTesting.functionTests.tests.lang.dbjarUtil.createArchive';
+
+call CREATEARCHIVE('ina.jar', 'wombat', 'db7');
+disconnect;
+
+connect 'jdbc:derby:wombat';
+
-- replace with a hacked jar file, emc.class modified to diable
-- valid e-mail address check but using same signatures.
-- ie direct replacement of the .class file.
@@ -140,3 +157,30 @@
DROP FUNCTION "emcAddOn".VALIDCONTACT;
DROP TABLE EMC.CONTACTS;
+disconnect;
+
+-- test reading a database from a jar file and loading
+-- classes etc. from the jars within the database.
+-- first using the jar protocol and then the classpath option.
+
+connect 'jdbc:derby:jar:(ina.jar)db7' AS DB7;
+run resource '/org/apache/derbyTesting/functionTests/tests/lang/dcl_readOnly.sql';
+disconnect;
+
+-- connect to database in jar file via classpath
+-- should fail as it is not on the classpath yet.
+connect 'jdbc:derby:classpath:db7' AS DB7CLF;
+
+-- create a class loader for this current thread
+connect 'jdbc:derby:db1';
+create procedure setDBContextClassLoader(JARNAME VARCHAR(20))
+LANGUAGE JAVA PARAMETER STYLE JAVA
+NO SQL
+EXTERNAL NAME 'org.apache.derbyTesting.functionTests.tests.lang.dbjarUtil.setDBContextClassLoader';
+
+call setDBContextClassLoader('ina.jar');
+disconnect;
+
+connect 'jdbc:derby:classpath:db7' AS DB7CL;
+run resource '/org/apache/derbyTesting/functionTests/tests/lang/dcl_readOnly.sql';
+disconnect;
Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/dcl_emc2.jar
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/dcl_emc2.jar?rev=265763&r1=265762&r2=265763&view=diff
==============================================================================
Binary files - no diff available.
Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/dcl_emc2s.jar
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/dcl_emc2s.jar?rev=265763&r1=265762&r2=265763&view=diff
==============================================================================
Binary files - no diff available.
Added: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/dcl_readOnly.sql
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/dcl_readOnly.sql?rev=265763&view=auto
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/dcl_readOnly.sql (added)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/dcl_readOnly.sql Thu Sep 1 11:35:38 2005
@@ -0,0 +1,24 @@
+-- common tests for read-only jarred database
+
+select * from EMC.CONTACTS;
+select e_mail, "emcAddOn".VALIDCONTACT(e_mail) from EMC.CONTACTS;
+insert into EMC.CONTACTS values(3, 'no@is_read_only.gov', NULL);
+CALL EMC.ADDCONTACT(3, 'really@is_read_only.gov');
+
+-- same set as dcl.sql for reading resources
+-- VALUES EMC.GETARTICLE('graduate.txt');
+-- VALUES EMC.GETARTICLE('/article/release.txt');
+-- VALUES EMC.GETARTICLE('/article/fred.txt');
+-- VALUES EMC.GETARTICLE('barney.txt');
+-- VALUES EMC.GETARTICLE('emc.class');
+-- VALUES EMC.GETARTICLE('/org/apache/derbyTesting/databaseclassloader/emc.class');
+
+-- signed
+VALUES EMC.GETSIGNERS('org.apache.derbyTesting.databaseclassloader.emc');
+-- not signed
+VALUES EMC.GETSIGNERS('org.apache.derbyTesting.databaseclassloader.addon.vendor.util');
+
+-- ensure that a read-only database automatically gets table locking
+autocommit off;
+select * from EMC.CONTACTS WITH RR;
+select TYPE, MODE, TABLENAME from new org.apache.derby.diag.LockTable() AS L ORDER BY 1,2,3;
\ No newline at end of file
Propchange: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/dcl_readOnly.sql
------------------------------------------------------------------------------
svn:eol-style = native