db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r552908 - /db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CastNode.java
Date Tue, 03 Jul 2007 16:54:24 GMT
Author: mamta
Date: Tue Jul  3 09:54:23 2007
New Revision: 552908

URL: http://svn.apache.org/viewvc?view=rev&rev=552908
Log:
DERBY-2765

Dan found that Cast Node was using the collation of current schema rather than the compilation
schema. This commit fixes that problem.


Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CastNode.java

Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CastNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CastNode.java?view=diff&rev=552908&r1=552907&r2=552908
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CastNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CastNode.java Tue Jul
 3 09:54:23 2007
@@ -31,6 +31,7 @@
 import org.apache.derby.iapi.sql.compile.C_NodeTypes;
 
 import org.apache.derby.iapi.types.DataTypeUtilities;
+import org.apache.derby.iapi.types.StringDataValue;
 import org.apache.derby.iapi.types.TypeId;
 import org.apache.derby.iapi.reference.Limits;
 
@@ -376,11 +377,10 @@
 		//If the result type of cast is string data type, then that data type 
 		//should get it's collation type from the current schema. 
 		if (externallyGeneratedCastNode && getTypeId().isStringTypeId()) {
-			//set the collation type to be same as the current schema's 
-			//collation type. Collation derivation is already initialized
-			//to correct value by default which is "IMPLICIT"
-			getTypeServices().setCollationType(
-					getLanguageConnectionContext().getDefaultSchema().getCollationType());
+			//set the collation type to be same as the compilation schema's 
+			//collation type. Collation derivation will be set to "IMPLICIT".
+			setCollationUsingCompilationSchema(
+					StringDataValue.COLLATION_DERIVATION_IMPLICIT);
 		}
 		/* 
 		** If it is a java cast, do some work to make sure



Mime
View raw message