db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bpendle...@apache.org
Subject svn commit: r492392 - in /db/derby/code/branches/10.2/java: engine/org/apache/derby/impl/sql/compile/ testing/org/apache/derbyTesting/functionTests/master/ testing/org/apache/derbyTesting/functionTests/master/j9_foundation/ testing/org/apache/derbyTest...
Date Thu, 04 Jan 2007 03:01:01 GMT
Author: bpendleton
Date: Wed Jan  3 19:00:59 2007
New Revision: 492392

URL: http://svn.apache.org/viewvc?view=rev&rev=492392
Log:
DERBY-2202: DROP PROCEDURE depends on SET SCHEMA

This patch was contributed by Yip Ng (yipng168@gmail.com)

This change includes derby2202-10.2-diff01.txt as prepared by Yip Ng, and
also includes svn merge -r 492252:492253 to pick up Myrna's j9 fix.

Modified:
    db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/DropAliasNode.java
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/depend.out
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/grantRevokeDDL.out
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/j9_foundation/grantRevokeDDL.out
    db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/lang/depend.sql

Modified: db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/DropAliasNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/DropAliasNode.java?view=diff&rev=492392&r1=492391&r2=492392
==============================================================================
--- db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/DropAliasNode.java
(original)
+++ db/derby/code/branches/10.2/java/engine/org/apache/derby/impl/sql/compile/DropAliasNode.java
Wed Jan  3 19:00:59 2007
@@ -125,6 +125,9 @@
 			throw StandardException.newException(SQLState.LANG_CANNOT_DROP_SYSTEM_ALIASES, aliasName);
 		}
 
+		// Statement is dependent on the AliasDescriptor
+		getCompilerContext().createDependency(ad);
+		
 		return this;
 	}
 

Modified: db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/depend.out
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/depend.out?view=diff&rev=492392&r1=492391&r2=492392
==============================================================================
--- db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/depend.out
(original)
+++ db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/depend.out
Wed Jan  3 19:00:59 2007
@@ -239,4 +239,109 @@
 4          |4          
 ij> -- cleanup, roll everything back to the beginning
 rollback;
+ij> -- DERBY-2202
+-- test various DROP statements
+-- test procedure
+autocommit off;
+ij> CREATE SCHEMA datamgmt;
+0 rows inserted/updated/deleted
+ij> CREATE PROCEDURE datamgmt.exit ( IN value INTEGER )
+ MODIFIES SQL DATA
+ PARAMETER STYLE JAVA
+ LANGUAGE JAVA
+ EXTERNAL NAME 'java.lang.System.exit';
+0 rows inserted/updated/deleted
+ij> DROP PROCEDURE datamgmt.exit;
+0 rows inserted/updated/deleted
+ij> DROP SCHEMA datamgmt RESTRICT;
+0 rows inserted/updated/deleted
+ij> CREATE SCHEMA datamgmt;
+0 rows inserted/updated/deleted
+ij> CREATE PROCEDURE datamgmt.exit ( IN value INTEGER )
+ MODIFIES SQL DATA
+ PARAMETER STYLE JAVA
+ LANGUAGE JAVA
+ EXTERNAL NAME 'java.lang.System.exit';
+0 rows inserted/updated/deleted
+ij> DROP PROCEDURE datamgmt.exit;
+0 rows inserted/updated/deleted
+ij> DROP SCHEMA datamgmt RESTRICT;
+0 rows inserted/updated/deleted
+ij> autocommit on;
+ij> CREATE SCHEMA datamgmt;
+0 rows inserted/updated/deleted
+ij> CREATE PROCEDURE datamgmt.exit ( IN value INTEGER )
+ MODIFIES SQL DATA
+ PARAMETER STYLE JAVA
+ LANGUAGE JAVA
+ EXTERNAL NAME 'java.lang.System.exit';
+0 rows inserted/updated/deleted
+ij> DROP PROCEDURE datamgmt.exit;
+0 rows inserted/updated/deleted
+ij> DROP SCHEMA datamgmt RESTRICT;
+0 rows inserted/updated/deleted
+ij> CREATE SCHEMA datamgmt;
+0 rows inserted/updated/deleted
+ij> CREATE PROCEDURE datamgmt.exit ( IN value INTEGER )
+ MODIFIES SQL DATA
+ PARAMETER STYLE JAVA
+ LANGUAGE JAVA
+ EXTERNAL NAME 'java.lang.System.exit';
+0 rows inserted/updated/deleted
+ij> DROP PROCEDURE datamgmt.exit;
+0 rows inserted/updated/deleted
+ij> DROP SCHEMA datamgmt RESTRICT;
+0 rows inserted/updated/deleted
+ij> -- test function
+CREATE SCHEMA datamgmt;
+0 rows inserted/updated/deleted
+ij> CREATE FUNCTION datamgmt.f_abs(P1 INT)
+ RETURNS INT
+ NO SQL
+ RETURNS NULL ON NULL INPUT
+ EXTERNAL NAME 'java.lang.Math.abs'
+ LANGUAGE JAVA PARAMETER STYLE JAVA;
+0 rows inserted/updated/deleted
+ij> DROP FUNCTION datamgmt.f_abs;
+0 rows inserted/updated/deleted
+ij> DROP SCHEMA datamgmt RESTRICT;
+0 rows inserted/updated/deleted
+ij> CREATE SCHEMA datamgmt;
+0 rows inserted/updated/deleted
+ij> CREATE FUNCTION datamgmt.f_abs(P1 INT)
+ RETURNS INT
+ NO SQL
+ RETURNS NULL ON NULL INPUT
+ EXTERNAL NAME 'java.lang.Math.abs'
+ LANGUAGE JAVA PARAMETER STYLE JAVA;
+0 rows inserted/updated/deleted
+ij> DROP FUNCTION datamgmt.f_abs;
+0 rows inserted/updated/deleted
+ij> DROP SCHEMA datamgmt RESTRICT;
+0 rows inserted/updated/deleted
+ij> -- test synonym
+CREATE SCHEMA datamgmt;
+0 rows inserted/updated/deleted
+ij> CREATE TABLE datamgmt.t1 (c1 int);
+0 rows inserted/updated/deleted
+ij> CREATE SYNONYM datamgmt.s1 for datamgmt.t1;
+0 rows inserted/updated/deleted
+ij> DROP SYNONYM datamgmt.s1;
+0 rows inserted/updated/deleted
+ij> DROP TABLE datamgmt.t1;
+0 rows inserted/updated/deleted
+ij> DROP SCHEMA datamgmt RESTRICT;
+0 rows inserted/updated/deleted
+ij> CREATE SCHEMA datamgmt;
+0 rows inserted/updated/deleted
+ij> CREATE TABLE datamgmt.t1 (c1 int);
+0 rows inserted/updated/deleted
+ij> CREATE SYNONYM datamgmt.s1 for datamgmt.t1;
+0 rows inserted/updated/deleted
+ij> DROP SYNONYM datamgmt.s1;
+0 rows inserted/updated/deleted
+ij> DROP TABLE datamgmt.t1;
+0 rows inserted/updated/deleted
+ij> DROP SCHEMA datamgmt RESTRICT;
+0 rows inserted/updated/deleted
 ij> 

Modified: db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/grantRevokeDDL.out
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/grantRevokeDDL.out?view=diff&rev=492392&r1=492391&r2=492392
==============================================================================
--- db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/grantRevokeDDL.out
(original)
+++ db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/grantRevokeDDL.out
Wed Jan  3 19:00:59 2007
@@ -2200,7 +2200,7 @@
 ij(MAMTA1)> grant select on t12RoutineTest to mamta3;
 0 rows inserted/updated/deleted
 ij(MAMTA1)> drop function selectFromSpecificSchema;
-ERROR: Failed with SQLSTATE 42X94
+ERROR: Failed with SQLSTATE 42Y55
 ij(MAMTA1)> CREATE FUNCTION selectFromSpecificSchema (P1 INT)
         RETURNS INT 
         RETURNS NULL ON NULL INPUT

Modified: db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/j9_foundation/grantRevokeDDL.out
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/j9_foundation/grantRevokeDDL.out?view=diff&rev=492392&r1=492391&r2=492392
==============================================================================
--- db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/j9_foundation/grantRevokeDDL.out
(original)
+++ db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/master/j9_foundation/grantRevokeDDL.out
Wed Jan  3 19:00:59 2007
@@ -2194,7 +2194,7 @@
 ij(MAMTA1)> grant select on t12RoutineTest to mamta3;
 0 rows inserted/updated/deleted
 ij(MAMTA1)> drop function selectFromSpecificSchema;
-ERROR: Failed with SQLSTATE 42X94
+ERROR: Failed with SQLSTATE 42Y55
 ij(MAMTA1)> CREATE FUNCTION selectFromSpecificSchema (P1 INT)
         RETURNS INT 
         RETURNS NULL ON NULL INPUT

Modified: db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/lang/depend.sql
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/lang/depend.sql?view=diff&rev=492392&r1=492391&r2=492392
==============================================================================
--- db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/lang/depend.sql
(original)
+++ db/derby/code/branches/10.2/java/testing/org/apache/derbyTesting/functionTests/tests/lang/depend.sql
Wed Jan  3 19:00:59 2007
@@ -158,3 +158,80 @@
 
 -- cleanup, roll everything back to the beginning
 rollback;
+
+-- DERBY-2202
+-- test various DROP statements
+
+-- test procedure
+autocommit off;
+CREATE SCHEMA datamgmt;
+CREATE PROCEDURE datamgmt.exit ( IN value INTEGER )
+ MODIFIES SQL DATA
+ PARAMETER STYLE JAVA
+ LANGUAGE JAVA
+ EXTERNAL NAME 'java.lang.System.exit';
+DROP PROCEDURE datamgmt.exit;
+DROP SCHEMA datamgmt RESTRICT;
+CREATE SCHEMA datamgmt;
+CREATE PROCEDURE datamgmt.exit ( IN value INTEGER )
+ MODIFIES SQL DATA
+ PARAMETER STYLE JAVA
+ LANGUAGE JAVA
+ EXTERNAL NAME 'java.lang.System.exit';
+DROP PROCEDURE datamgmt.exit;
+DROP SCHEMA datamgmt RESTRICT;
+
+autocommit on;
+CREATE SCHEMA datamgmt;
+CREATE PROCEDURE datamgmt.exit ( IN value INTEGER )
+ MODIFIES SQL DATA
+ PARAMETER STYLE JAVA
+ LANGUAGE JAVA
+ EXTERNAL NAME 'java.lang.System.exit';
+DROP PROCEDURE datamgmt.exit;
+DROP SCHEMA datamgmt RESTRICT;
+
+CREATE SCHEMA datamgmt;
+CREATE PROCEDURE datamgmt.exit ( IN value INTEGER )
+ MODIFIES SQL DATA
+ PARAMETER STYLE JAVA
+ LANGUAGE JAVA
+ EXTERNAL NAME 'java.lang.System.exit';
+DROP PROCEDURE datamgmt.exit;
+DROP SCHEMA datamgmt RESTRICT;
+
+-- test function
+CREATE SCHEMA datamgmt;
+CREATE FUNCTION datamgmt.f_abs(P1 INT)
+ RETURNS INT
+ NO SQL
+ RETURNS NULL ON NULL INPUT
+ EXTERNAL NAME 'java.lang.Math.abs'
+ LANGUAGE JAVA PARAMETER STYLE JAVA;
+DROP FUNCTION datamgmt.f_abs;
+DROP SCHEMA datamgmt RESTRICT;
+
+CREATE SCHEMA datamgmt;
+CREATE FUNCTION datamgmt.f_abs(P1 INT)
+ RETURNS INT
+ NO SQL
+ RETURNS NULL ON NULL INPUT
+ EXTERNAL NAME 'java.lang.Math.abs'
+ LANGUAGE JAVA PARAMETER STYLE JAVA;
+DROP FUNCTION datamgmt.f_abs;
+DROP SCHEMA datamgmt RESTRICT;
+
+-- test synonym
+CREATE SCHEMA datamgmt;
+CREATE TABLE datamgmt.t1 (c1 int);
+CREATE SYNONYM datamgmt.s1 for datamgmt.t1;
+DROP SYNONYM datamgmt.s1;
+DROP TABLE datamgmt.t1;
+DROP SCHEMA datamgmt RESTRICT;
+
+CREATE SCHEMA datamgmt;
+CREATE TABLE datamgmt.t1 (c1 int);
+CREATE SYNONYM datamgmt.s1 for datamgmt.t1;
+DROP SYNONYM datamgmt.s1;
+DROP TABLE datamgmt.t1;
+DROP SCHEMA datamgmt RESTRICT;



Mime
View raw message