| 1 21 22 package org.apache.derbyTesting.functionTests.tests.store; 23 24 import org.apache.derby.iapi.db.OnlineCompress; 25 26 import org.apache.derby.iapi.services.sanity.SanityManager; 27 28 import java.sql.CallableStatement ; 29 import java.sql.Connection ; 30 import java.sql.PreparedStatement ; 31 import java.sql.ResultSet ; 32 import java.sql.SQLException ; 33 import java.sql.Statement ; 34 35 import org.apache.derby.tools.ij; 36 37 38 public class oc_rec3 extends OnlineCompressTest 39 { 40 41 public oc_rec3() 42 { 43 } 44 45 53 private void test1( 54 Connection conn, 55 String test_name, 56 String table_name) 57 throws SQLException  58 { 59 beginTest(conn, test_name); 60 61 String table_name_2 = table_name + "_2"; 62 if (!checkConsistency(conn, "APP", table_name_2)) 63 { 64 logError("conistency check failed."); 65 } 66 67 createAndLoadTable(conn, false, table_name, 2000, 0); 70 if (!checkConsistency(conn, "APP", table_name)) 71 { 72 logError("conistency check failed."); 73 } 74 75 createAndLoadTable(conn, false, table_name_2, 4000, 2000); 78 executeQuery(conn, "delete from " + table_name_2, true); 79 callCompress(conn, "APP", table_name_2, true, true, true, false); 80 81 endTest(conn, test_name); 82 } 83 84 public void testList(Connection conn) 85 throws SQLException  86 { 87 test1(conn, "test1", "TEST1"); 88 } 89 90 public static void main(String [] argv) 91 throws Throwable  92 { 93 oc_rec3 test = new oc_rec3(); 94 95 ij.getPropertyArg(argv); 96 Connection conn = ij.startJBMS(); 97 conn.setAutoCommit(false); 98 99 try 100 { 101 test.testList(conn); 102 } 103 catch (SQLException sqle) 104 { 105 org.apache.derby.tools.JDBCDisplayUtil.ShowSQLException( 106 System.out, sqle); 107 sqle.printStackTrace(System.out); 108 } 109 } 110 } 111 | Popular Tags |