db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mi...@apache.org
Subject svn commit: r418108 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/wisconsin.java
Date Thu, 29 Jun 2006 18:27:52 GMT
Author: mikem
Date: Thu Jun 29 11:27:51 2006
New Revision: 418108

URL: http://svn.apache.org/viewvc?rev=418108&view=rev
Log:
DERBY-937, committing change by      Andreas Korneliussen.

notes by Andreas:
I was able to reproduce this problem on every run on a very fast laptop (it was not reproducible
on any other Windows lab machine I have tried). This laptop happens to be the same kind as
Ole uses for the nightly tests.

Adding a 10 second sleeping period after the population of the tables, did not have any effect.
I therefore tried to do run a compress on the tables (based on the assumption that statistics
is updated on compress), and now the test does not fail for me anymore.

Attached is the patch which makes this test stop failing. The patch does not seem to have
any sideeffects on other platforms (Solaris) tested, however the test will use more time.


note by mike:
I ran this change 20 times and it worked on my laptop, it would always fail
a few times out of 20 before the fix.  I am not sure why this fix works as
the test seems to already create indexes after tables so statistics should
already be up to date. 


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

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/wisconsin.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/wisconsin.java?rev=418108&r1=418107&r2=418108&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/wisconsin.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/wisconsin.java
Thu Jun 29 11:27:51 2006
@@ -24,6 +24,7 @@
 import java.io.FileNotFoundException;
 import java.sql.Connection;
 import java.sql.SQLException;
+import java.sql.PreparedStatement;
 import java.sql.Statement;
 
 import org.apache.derby.iapi.tools.i18n.LocalizedInput;
@@ -178,7 +179,32 @@
 		stmt.execute("insert into BPRIME select * from TENKTUP2 where TENKTUP2.unique2 < 1000");
 
 		conn.commit();
+		
+		PreparedStatement ps2 = conn.prepareStatement
+			("call SYSCS_UTIL.SYSCS_COMPRESS_TABLE(?, ?, ?)");
+		ps2.setString(1, "APP");
+		ps2.setString(2, "BPRIME");
+		ps2.setInt(3, 0);
+		ps2.executeUpdate();
+		conn.commit();
 
+		ps2.setString(1, "APP");
+		ps2.setString(2, "TENKTUP1");
+		ps2.setInt(3, 0);
+		ps2.executeUpdate();
+		conn.commit();
+		
+		ps2.setString(1, "APP");
+		ps2.setString(2, "TENKTUP2");
+		ps2.setInt(3, 0);
+		ps2.executeUpdate();
+		conn.commit();
+
+		ps2.setString(1, "APP");
+		ps2.setString(2, "ONEKTUP");
+		ps2.setInt(3, 0);
+		ps2.executeUpdate();
+		conn.commit();
 	}
 	
 }



Mime
View raw message