db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r225812 - in /incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests: master/functions.out tests/lang/functions.sql
Date Thu, 28 Jul 2005 16:40:18 GMT
Author: djd
Date: Thu Jul 28 09:40:14 2005
New Revision: 225812

URL: http://svn.apache.org/viewcvs?rev=225812&view=rev
Log:
DERBY-479 Add test case to demostrate bug using the return of a function declared
RETURNS NULL ON NULL INPUT into another function.

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

Modified: incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/functions.out
URL: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/functions.out?rev=225812&r1=225811&r2=225812&view=diff
==============================================================================
--- incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/functions.out
(original)
+++ incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/functions.out
Thu Jul 28 09:40:14 2005
@@ -527,4 +527,46 @@
 0 rows inserted/updated/deleted
 ij> DROP FUNCTION SIGNATURE_BUG_DERBY_258_NS;
 0 rows inserted/updated/deleted
+ij> -- Test for DERBY-479 the commented out VALUES clauses
+-- below cause linkage errors loading the generated class.;
+CREATE FUNCTION RN_COS(A DOUBLE) RETURNS DOUBLE
+EXTERNAL NAME 'java.lang.Math.cos(double)'
+RETURNS NULL ON NULL INPUT
+LANGUAGE JAVA PARAMETER STYLE JAVA;
+0 rows inserted/updated/deleted
+ij> CREATE FUNCTION RN_RADIANS(A DOUBLE) RETURNS DOUBLE
+EXTERNAL NAME 'java.lang.Math.toRadians(double)'
+RETURNS NULL ON NULL INPUT
+LANGUAGE JAVA PARAMETER STYLE JAVA;
+0 rows inserted/updated/deleted
+ij> CREATE FUNCTION CALL_COS(A DOUBLE) RETURNS DOUBLE
+EXTERNAL NAME 'java.lang.Math.cos(double)'
+CALLED ON NULL INPUT
+LANGUAGE JAVA PARAMETER STYLE JAVA;
+0 rows inserted/updated/deleted
+ij> CREATE FUNCTION CALL_RADIANS(A DOUBLE) RETURNS DOUBLE
+EXTERNAL NAME 'java.lang.Math.toRadians(double)'
+CALLED ON NULL INPUT
+LANGUAGE JAVA PARAMETER STYLE JAVA;
+0 rows inserted/updated/deleted
+ij> -- DERBY-479;
+-- VALUES CAST( RN_COS(RN_RADIANS(90.0)) AS DECIMAL(3,2));
+VALUES CAST( CALL_COS(CALL_RADIANS(90.0)) AS DECIMAL(3,2));
+1     
+------
+0.00  
+ij> -- DERBY-479;
+-- VALUES CAST( CALL_COS(RN_RADIANS(90.0)) AS DECIMAL(3,2));
+VALUES CAST( RN_COS(CALL_RADIANS(90.0)) AS DECIMAL(3,2));
+1     
+------
+0.00  
+ij> DROP FUNCTION RN_COS;
+0 rows inserted/updated/deleted
+ij> DROP FUNCTION RN_RADIANS;
+0 rows inserted/updated/deleted
+ij> DROP FUNCTION CALL_COS;
+0 rows inserted/updated/deleted
+ij> DROP FUNCTION CALL_RADIANS;
+0 rows inserted/updated/deleted
 ij> 

Modified: incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/functions.sql
URL: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/functions.sql?rev=225812&r1=225811&r2=225812&view=diff
==============================================================================
--- incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/functions.sql
(original)
+++ incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/functions.sql
Thu Jul 28 09:40:14 2005
@@ -224,5 +224,37 @@
 DROP FUNCTION SIGNATURE_BUG_DERBY_258_NS;
 
 
+-- Test for DERBY-479 the commented out VALUES clauses
+-- below cause linkage errors loading the generated class.;
 
+CREATE FUNCTION RN_COS(A DOUBLE) RETURNS DOUBLE
+EXTERNAL NAME 'java.lang.Math.cos(double)'
+RETURNS NULL ON NULL INPUT
+LANGUAGE JAVA PARAMETER STYLE JAVA;
 
+CREATE FUNCTION RN_RADIANS(A DOUBLE) RETURNS DOUBLE
+EXTERNAL NAME 'java.lang.Math.toRadians(double)'
+RETURNS NULL ON NULL INPUT
+LANGUAGE JAVA PARAMETER STYLE JAVA;
+
+CREATE FUNCTION CALL_COS(A DOUBLE) RETURNS DOUBLE
+EXTERNAL NAME 'java.lang.Math.cos(double)'
+CALLED ON NULL INPUT
+LANGUAGE JAVA PARAMETER STYLE JAVA;
+
+CREATE FUNCTION CALL_RADIANS(A DOUBLE) RETURNS DOUBLE
+EXTERNAL NAME 'java.lang.Math.toRadians(double)'
+CALLED ON NULL INPUT
+LANGUAGE JAVA PARAMETER STYLE JAVA;
+
+-- DERBY-479;
+-- VALUES CAST( RN_COS(RN_RADIANS(90.0)) AS DECIMAL(3,2));
+VALUES CAST( CALL_COS(CALL_RADIANS(90.0)) AS DECIMAL(3,2));
+-- DERBY-479;
+-- VALUES CAST( CALL_COS(RN_RADIANS(90.0)) AS DECIMAL(3,2));
+VALUES CAST( RN_COS(CALL_RADIANS(90.0)) AS DECIMAL(3,2));
+
+DROP FUNCTION RN_COS;
+DROP FUNCTION RN_RADIANS;
+DROP FUNCTION CALL_COS;
+DROP FUNCTION CALL_RADIANS;
\ No newline at end of file



Mime
View raw message