db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1290919 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/CollationTest.java
Date Sun, 19 Feb 2012 01:32:32 GMT
Author: mamta
Date: Sun Feb 19 01:32:32 2012
New Revision: 1290919

URL: http://svn.apache.org/viewvc?rev=1290919&view=rev
Log:
DERBY-4631 Wrong join column returned by right outer join with NATURAL or USING and territory-based
collation

Adding test for subqueries.


Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/CollationTest.java

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?rev=1290919&r1=1290918&r2=1290919&view=diff
==============================================================================
--- 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
Sun Feb 19 01:32:32 2012
@@ -641,6 +641,12 @@ public void testUsingClauseAndNaturalJoi
 			  " (values('A','z'),('B','y')) v1(x,y) ", 
 			  " NATURAL LEFT OUTER JOIN ", "",
 			  new String[][] {{"b","Y","b","Y"},{"c","x","c","x"}});
+      //Test subqueries.
+	  joinTesting(s,"t2", "t1",
+			  " (select * from derby4631_t2) t2(x,y) ",
+			  " (select * from derby4631_t1) t1(x,y) ", 
+			  " NATURAL LEFT OUTER JOIN ", "",
+			  new String[][] {{"b","Y","b","Y"},{"c","x","c","x"}});
 	  
       //Do the same test as above, but this time using the USING clause
       // rather the NATURAL join
@@ -662,6 +668,12 @@ public void testUsingClauseAndNaturalJoi
 			  " (values('A','z'),('B','y')) v1(x,y) ", 
 			  " LEFT OUTER JOIN ", " USING(x,y)",
 			  new String[][] {{"b","Y","b","Y"},{"c","x","c","x"}});
+      //Test subqueries.
+	  joinTesting(s,"t2", "t1",
+			  " (select * from derby4631_t2) t2(x,y) ",
+			  " (select * from derby4631_t1) t1(x,y) ", 
+			  " LEFT OUTER JOIN ", " USING(x,y)",
+			  new String[][] {{"b","Y","b","Y"},{"c","x","c","x"}});
       
       if (collation != null && collation.equals("TERRITORY_BASED:SECONDARY")) {
     	  //Following query is returning INCORRECT data and once DERBY-4631 is
@@ -682,6 +694,12 @@ public void testUsingClauseAndNaturalJoi
     			  " (values('A','z'),('B','y')) v1(x,y) ", 
     			  " NATURAL RIGHT OUTER JOIN ", "",
     			  new String[][] {{"A","z","A","z"},{"B","y","b","Y"}});
+          //Test subqueries.
+    	  joinTesting(s,"t2", "t1",
+    			  " (select * from derby4631_t2) t2(x,y) ",
+    			  " (select * from derby4631_t1) t1(x,y) ", 
+    			  " NATURAL RIGHT OUTER JOIN ", "",
+    			  new String[][] {{"A","z","A","z"},{"B","y","b","Y"}});
           //Do the same test as above, but this time using the USING clause
           // rather the NATURAL join
           //
@@ -703,6 +721,12 @@ public void testUsingClauseAndNaturalJoi
     			  " (values('A','z'),('B','y')) v1(x,y) ", 
     			  " RIGHT OUTER JOIN ", " USING(x,y) ",
     			  new String[][] {{"A","z","A","z"},{"B","y","b","Y"}});
+          //Test subqueries.
+    	  joinTesting(s,"t2", "t1",
+    			  " (select * from derby4631_t2) t2(x,y) ",
+    			  " (select * from derby4631_t1) t1(x,y) ", 
+    			  " RIGHT OUTER JOIN ", " USING(x,y)",
+    			  new String[][] {{"A","z","A","z"},{"B","y","b","Y"}});
       } else {
     	  //Case-sensitive collation will not run into any problems for the
     	  // given data set and hence following is returning correct results.



Mime
View raw message