db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mi...@apache.org
Subject svn commit: r962152 - /db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/tests/lang/DistinctTest.java
Date Thu, 08 Jul 2010 23:26:28 GMT
Author: mikem
Date: Thu Jul  8 23:26:28 2010
New Revision: 962152

URL: http://svn.apache.org/viewvc?rev=962152&view=rev
Log:
DERBY-4457: 'Column value mismatch' in 'testDistinctInsertWithGeneratedColumn(...lang.DistinctTest)'
on Jvm 1.5, 1.4, phoneME.

backported fix #885726 from trunk to 10.5 branch.

SELECT DISTINCT may return rows in different order on different JVMs. Made the test independent
of the actual ordering. 


Modified:
    db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/tests/lang/DistinctTest.java

Modified: db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/tests/lang/DistinctTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/tests/lang/DistinctTest.java?rev=962152&r1=962151&r2=962152&view=diff
==============================================================================
--- db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/tests/lang/DistinctTest.java
(original)
+++ db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/tests/lang/DistinctTest.java
Thu Jul  8 23:26:28 2010
@@ -457,14 +457,20 @@ public class DistinctTest extends BaseJD
 		assertEquals(2, s.executeUpdate("insert into destWithAI(c12) select distinct(c31) from
source"));
 		
 		// we should not see gaps in the autoincrement column
-		String [][] expected = { {"1", "1"}, 
-				                 {"2", "2"} };
-		JDBC.assertFullResultSet(s.executeQuery("select * from destWithAI"), expected);
+		String [][] expected = { {"1"}, {"2"} };
+		JDBC.assertFullResultSet(
+				s.executeQuery("select c11 from destWithAI order by c11"),
+				expected);
+		JDBC.assertFullResultSet(
+				s.executeQuery("select c12 from destWithAI order by c12"),
+				expected);
 		
 		assertEquals(2, s.executeUpdate("insert into destWithNoAI(c22) select distinct(c31) from
source"));
 		expected = new String [][] { {null, "1"}, 
 				                     {null, "2"} };
-		JDBC.assertFullResultSet(s.executeQuery("select * from destWithNoAI"), expected);
+		JDBC.assertFullResultSet(
+				s.executeQuery("select * from destWithNoAI order by c22"),
+				expected);
 		
 		s.execute("drop table source");
 		s.execute("drop table destWithNoAI");



Mime
View raw message