db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r545716 - in /db/derby/code/trunk/java: engine/org/apache/derby/impl/sql/compile/ResultSetNode.java testing/org/apache/derbyTesting/functionTests/tests/lang/CollationTest.java
Date Sat, 09 Jun 2007 09:10:25 GMT
Author: mamta
Date: Sat Jun  9 02:10:25 2007
New Revision: 545716

URL: http://svn.apache.org/viewvc?view=rev&rev=545716
Log:
DERBY-2777
ResultSetNode was using current compilation schema's collation if there is a parameter involved.
Instead, let the parameter pick up it's
collation from it's context.



Modified:
    db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ResultSetNode.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/ResultSetNode.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ResultSetNode.java?view=diff&rev=545716&r1=545715&r2=545716
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ResultSetNode.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/sql/compile/ResultSetNode.java Sat
Jun  9 02:10:25 2007
@@ -336,9 +336,6 @@
 				** corresponding column of the target table.
 				*/
 				re.setType(typeCol.getTypeServices());
-				//collation of ? operand should be same as the compilation schema
-				re.setCollationUsingCompilationSchema(
-						StringDataValue.COLLATION_DERIVATION_IMPLICIT);
 			}
 			else if (re instanceof CharConstantNode)
 			{

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=545716&r1=545715&r2=545716
==============================================================================
--- 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
Sat Jun  9 02:10:25 2007
@@ -871,6 +871,11 @@
     s.executeUpdate("INSERT INTO APP.CUSTOMER(NAME) VALUES('abc')");
     rs = s.executeQuery("SELECT COUNT(*) FROM APP.CUSTOMER ");
     JDBC.assertFullResultSet(rs,new String[][] {{"9"}});
+    //following will fail because NAME has collation type of territory based
+    //but 'abc' has collation type of UCS_BASIC
+    assertStatementError("42818", s, "DELETE FROM APP.CUSTOMER WHERE NAME = 'abc'");
+    //changing to APP schema will fix the problem
+    s.executeUpdate("set schema APP");
     s.executeUpdate("DELETE FROM APP.CUSTOMER WHERE NAME = 'abc'");
     rs = s.executeQuery("SELECT COUNT(*) FROM APP.CUSTOMER ");
     JDBC.assertFullResultSet(rs,new String[][] {{"8"}});



Mime
View raw message