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 fu...@apache.org on 2006/09/28 17:48:26 UTC
svn commit: r450904 [4/4] - in
/db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests:
master/ master/DerbyNet/ master/DerbyNetClient/ suites/ tests/lang/
Added: db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/tests/lang/wisconsin.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/tests/lang/wisconsin.java?view=auto&rev=450904
==============================================================================
--- db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/tests/lang/wisconsin.java (added)
+++ db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/tests/lang/wisconsin.java Thu Sep 28 08:48:24 2006
@@ -0,0 +1,210 @@
+/*
+
+Derby - Class org.apache.derbyTesting.functionTests.tests.lang.wisconsin
+
+Copyright 1999, 2004 The Apache Software Foundation or its licensors, as applicable.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+*/
+package org.apache.derbyTesting.functionTests.tests.lang;
+
+import java.io.BufferedInputStream;
+import java.io.FileInputStream;
+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;
+import org.apache.derby.iapi.tools.i18n.LocalizedOutput;
+import org.apache.derby.iapi.tools.i18n.LocalizedResource;
+import org.apache.derby.impl.tools.ij.utilMain;
+import org.apache.derby.tools.ij;
+import java.util.Hashtable;
+
+public class wisconsin {
+
+ public static void main(String[] args) throws Throwable{
+ ij.getPropertyArg(args);
+ Connection conn = ij.startJBMS();
+
+ conn.setAutoCommit(false);
+ conn.setTransactionIsolation(Connection.TRANSACTION_SERIALIZABLE);
+
+ createTables(conn);
+
+ utilMain utilInstance;
+ LocalizedInput is;
+ BufferedInputStream inStream;
+
+ // set input stream
+ String filePath = "wisc_setup.sql";
+
+ try
+ {
+ inStream = new BufferedInputStream(new FileInputStream(filePath),
+ utilMain.BUFFEREDFILESIZE);
+ } catch (FileNotFoundException e)
+ {
+ System.out.println("unable to find input file "+filePath);
+ throw e;
+ }
+ is = LocalizedResource.getInstance().getNewInput(inStream);
+
+ LocalizedInput [] in = { is };
+ LocalizedOutput out = new LocalizedOutput(System.out);
+
+
+ utilInstance = new utilMain(1, out, (Hashtable)null);
+ utilInstance.go(in, out, (java.util.Properties) null);
+ //log.flush();
+ out.flush();
+
+
+ }
+
+ private static void createTables(Connection conn) throws SQLException{
+ Statement stmt = conn.createStatement();
+
+ stmt.execute("create table TENKTUP1 ( unique1 int not null, " +
+ "unique2 int not null, " +
+ "two int, " +
+ "four int, " +
+ "ten int, " +
+ "twenty int, " +
+ "onePercent int, " +
+ "tenPercent int, " +
+ "twentyPercent int, " +
+ "fiftyPercent int, " +
+ "unique3 int, " +
+ "evenOnePercent int, " +
+ "oddOnePercent int, " +
+ "stringu1 char(52) not null, " +
+ "stringu2 char(52) not null, " +
+ "string4 char(52) )");
+ //--insert 10000 rows into TENKTUP1
+ WISCInsert wi = new WISCInsert();
+ wi.doWISCInsert(10000, "TENKTUP1", conn);
+
+ stmt.execute("create unique index TK1UNIQUE1 on TENKTUP1(unique1)");
+ stmt.execute("create unique index TK1UNIQUE2 on TENKTUP1(unique2)");
+ stmt.execute("create index TK1TWO on TENKTUP1(two)");
+ stmt.execute("create index TK1FOUR on TENKTUP1(four)");
+ stmt.execute("create index TK1TEN on TENKTUP1(ten)");
+ stmt.execute("create index TK1TWENTY on TENKTUP1(twenty)");
+ stmt.execute("create index TK1ONEPERCENT on TENKTUP1(onePercent)");
+ stmt.execute("create index TK1TWENTYPERCENT on TENKTUP1(twentyPercent)");
+ stmt.execute("create index TK1EVENONEPERCENT on TENKTUP1(evenOnePercent)");
+ stmt.execute("create index TK1ODDONEPERCENT on TENKTUP1(oddOnePercent)");
+ stmt.execute("create unique index TK1STRINGU1 on TENKTUP1(stringu1)");
+ stmt.execute("create unique index TK1STRINGU2 on TENKTUP1(stringu2)");
+ stmt.execute("create index TK1STRING4 on TENKTUP1(string4)");
+
+ stmt.execute("create table TENKTUP2 (unique1 int not null, " +
+ "unique2 int not null, " +
+ "two int, " +
+ "four int, " +
+ "ten int, " +
+ "twenty int, " +
+ "onePercent int, " +
+ "tenPercent int, " +
+ "twentyPercent int, " +
+ "fiftyPercent int, " +
+ "unique3 int, " +
+ "evenOnePercent int, " +
+ "oddOnePercent int, " +
+ "stringu1 char(52), " +
+ "stringu2 char(52), " +
+ "string4 char(52) )");
+ //-- insert 10000 rows into TENKTUP2
+ wi = new WISCInsert();
+ wi.doWISCInsert(10000, "TENKTUP2", conn);
+
+ stmt.execute("create unique index TK2UNIQUE1 on TENKTUP2(unique1)");
+ stmt.execute("create unique index TK2UNIQUE2 on TENKTUP2(unique2)");
+
+ stmt.execute("create table ONEKTUP ( unique1 int not null, " +
+ "unique2 int not null, " +
+ "two int, " +
+ "four int, " +
+ "ten int, " +
+ "twenty int, " +
+ "onePercent int, " +
+ "tenPercent int, " +
+ "twentyPercent int, " +
+ "fiftyPercent int, " +
+ "unique3 int, " +
+ "evenOnePercent int, " +
+ "oddOnePercent int, " +
+ "stringu1 char(52), " +
+ "stringu2 char(52), " +
+ "string4 char(52) )");
+
+ //-- insert 1000 rows into ONEKTUP
+ wi = new WISCInsert();
+ wi.doWISCInsert(1000, "ONEKTUP", conn);
+
+ stmt.execute("create unique index ONEKUNIQUE1 on ONEKTUP(unique1)");
+ stmt.execute("create unique index ONEKUNIQUE2 on ONEKTUP(unique2)");
+
+ stmt.execute("create table BPRIME ( unique1 int, " +
+ "unique2 int, " +
+ "two int, " +
+ "four int, " +
+ "ten int, " +
+ "twenty int, " +
+ "onePercent int, " +
+ "tenPercent int, " +
+ "twentyPercent int, " +
+ "fiftyPercent int, " +
+ "unique3 int, " +
+ "evenOnePercent int, " +
+ "oddOnePercent int, " +
+ "stringu1 char(52), " +
+ "stringu2 char(52), " +
+ "string4 char(52))");
+
+ 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();
+ }
+
+}
Propchange: db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/tests/lang/wisconsin.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/tests/lang/wisconsin_app.properties
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/tests/lang/wisconsin_app.properties?view=diff&rev=450904&r1=450903&r2=450904
==============================================================================
--- db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/tests/lang/wisconsin_app.properties (original)
+++ db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/tests/lang/wisconsin_app.properties Thu Sep 28 08:48:24 2006
@@ -17,3 +17,5 @@
jvmflags=-ms32M -mx128M
usedefaults=true
+
+supportfiles=tests/lang/wisc_setup.sql
Modified: db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/tests/lang/wisconsin_derby.properties
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/tests/lang/wisconsin_derby.properties?view=diff&rev=450904&r1=450903&r2=450904
==============================================================================
--- db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/tests/lang/wisconsin_derby.properties (original)
+++ db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/tests/lang/wisconsin_derby.properties Thu Sep 28 08:48:24 2006
@@ -10,3 +10,4 @@
derby.storage.checkpointInterval=100000
# override derby.debug.true to speed up test execution.
derby.debug.true=
+derby.optimizer.noTimeout=true
Modified: db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/tests/lang/wisconsin_sed.properties
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/tests/lang/wisconsin_sed.properties?view=diff&rev=450904&r1=450903&r2=450904
==============================================================================
--- db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/tests/lang/wisconsin_sed.properties (original)
+++ db/derby/code/branches/10.1/java/testing/org/apache/derbyTesting/functionTests/tests/lang/wisconsin_sed.properties Thu Sep 28 08:48:24 2006
@@ -7,7 +7,10 @@
# substitute=pattern1;substitute1,pattern2;substitute2,...,patternn;substituten
# No commas or semicolons can be allowed in the patterns/subsitutes.
---------------------------------------------------------------------------------
-# need for JCC. true shows up as |1 | false as |0 |
-# also cursor names do not show up in rt statistics
-substitute=SQL_CURSN200C1;C,99349.65000000001 ;99349.65000000&
-
+# Cursor names and the amount of pre-fetched data differ between the
+# frameworks. Since we are just testing which plan is chosen, we
+# filter out run-time statistics that are not relevant for the test.
+substitute=SQL_CURS[HN]200C1;C,99349.65000000001 ;99349.65000000& ,SQL_CURLH000C1;C,Number of opens ?=.*;<filtered number of opens>,Number of pages visited ?=.*;<filtered number of pages visited>,Number of rows qualified ?=.*;<filtered number of rows qualified>,Number of rows visited ?=.*;<filtered number of rows visited>,Rows returned ?=.*;<filtered rows returned>,Rows seen ?=.*;<filtered rows seen>,Rows seen from the left ?=.*;<filtered rows seen from the left>,Rows seen from the right ?=.*;<filtered rows seen from the right>,Statement executed\.;0 rows inserted/updated/deleted
+# next time does not always show up, so we remove it from the
+# output. Warning 01J01 only appears in embedded.
+delete=next time in milliseconds/row.*,WARNING 01J01:.*