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 ma...@apache.org on 2007/07/03 18:54:24 UTC
svn commit: r552908 -
/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/CastNode.java
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