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_rec1 extends OnlineCompressTest 39 { 40 41 public oc_rec1() 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 createAndLoadTable(conn, true, table_name, 5000, 0); 61 executeQuery(conn, "delete from " + table_name, true); 62 callCompress(conn, "APP", table_name, true, true, true, true); 63 endTest(conn, test_name); 64 } 65 66 public void testList(Connection conn) 67 throws SQLException 68 { 69 test1(conn, "test1", "TEST1"); 70 } 71 72 public static void main(String [] argv) 73 throws Throwable 74 { 75 oc_rec1 test = new oc_rec1(); 76 77 ij.getPropertyArg(argv); 78 Connection conn = ij.startJBMS(); 79 conn.setAutoCommit(false); 80 81 try 82 { 83 test.testList(conn); 84 } 85 catch (SQLException sqle) 86 { 87 org.apache.derby.tools.JDBCDisplayUtil.ShowSQLException( 88 System.out, sqle); 89 sqle.printStackTrace(System.out); 90 } 91 } 92 } 93 | Popular Tags |