db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r551793 - in /db/derby/code/trunk/java: engine/org/apache/derby/impl/sql/compile/CreateAliasNode.java testing/org/apache/derbyTesting/functionTests/tests/lang/CollationTest.java
Date Fri, 29 Jun 2007 05:11:04 GMT
Author: mamta
Date: Thu Jun 28 22:11:03 2007
New Revision: 551793

URL: http://svn.apache.org/viewvc?view=rev&rev=551793
Log:
DERBY-2831 Creating a function that returns a character string literal inside a schema that
doesnot exist should not give
a null pointer exception. This was happening while we were trying to look up the collation.
The collation lookup should be
done using the super class's getSchemaDescriptor method.


Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CreateAliasNode.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/CollationTest.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CreateAliasNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CreateAliasNode.java?view=diff&rev=551793&r1=551792&r2=551793
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CreateAliasNode.java
(original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CreateAliasNode.java
Thu Jun 28 22:11:03 2007
@@ -285,7 +285,7 @@
 			//Use the collation type and info of the schema in which this
 			//function is defined for the return value of the function
 			newTDWithCorrectCollation.setCollationType(
-		    	     getSchemaDescriptor(getObjectName().getSchemaName(), false).getCollationType());
+					getSchemaDescriptor().getCollationType());
 			newTDWithCorrectCollation.setCollationDerivation(
 	        		StringDataValue.COLLATION_DERIVATION_IMPLICIT);
 			return newTDWithCorrectCollation;

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/CollationTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/CollationTest.java?view=diff&rev=551793&r1=551792&r2=551793
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/CollationTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/CollationTest.java
Thu Jun 28 22:11:03 2007
@@ -717,6 +717,8 @@
     		" RETURNS VARCHAR(20) RETURNS NULL ON NULL INPUT EXTERNAL NAME " + 
 			"'org.apache.derbyTesting.functionTests.tests.lang.RoutineTest.concat' "+
 			" LANGUAGE JAVA PARAMETER STYLE JAVA");
+    //DERBY-2831 Creating a function inside a non-existent schema should not
+    //fail when it's return type is of character string type.
 
     //Start of parameter testing
     //Start with simple ? param in a string comparison



Mime
View raw message