Examples of assertNoStatsTable()


Examples of org.apache.derbyTesting.junit.IndexStatsUtil.assertNoStatsTable()

                "ADD CONSTRAINT TEST_TAB_2_FK_1 "+
            "FOREIGN KEY(c21) REFERENCES TEST_TAB_1(c11)");
        //DERBY-5702 Like primary key earlier, adding foreign key constraint
        // didn't automatically add a statistics row for it. Have to run update
        // statistics manually to get a row added for it's stat
        stats.assertNoStatsTable("TEST_TAB_2");
        s.execute("CALL SYSCS_UTIL.SYSCS_UPDATE_STATISTICS('APP','TEST_TAB_2', null)");
        stats.assertTableStats("TEST_TAB_2",1);
        //Number of statistics row for TEST_TAB_1 will remain unchanged since
        // it has only primary key defined on it
        stats.assertNoStatsTable("TEST_TAB_1");
View Full Code Here

Examples of org.apache.derbyTesting.junit.IndexStatsUtil.assertNoStatsTable()

        stats.assertNoStatsTable("TEST_TAB_2");
        s.execute("CALL SYSCS_UTIL.SYSCS_UPDATE_STATISTICS('APP','TEST_TAB_2', null)");
        stats.assertTableStats("TEST_TAB_2",1);
        //Number of statistics row for TEST_TAB_1 will remain unchanged since
        // it has only primary key defined on it
        stats.assertNoStatsTable("TEST_TAB_1");
        s.executeUpdate("ALTER TABLE TEST_TAB_2 "+
                "DROP CONSTRAINT TEST_TAB_2_FK_1");
        //Dropping the foreign key constraint should cause the statistics row
        // for TEST_TAB_2 to be dropped as well.
        stats.assertNoStatsTable("TEST_TAB_2");
View Full Code Here

Examples of org.apache.derbyTesting.junit.IndexStatsUtil.assertNoStatsTable()

        stats.assertNoStatsTable("TEST_TAB_1");
        s.executeUpdate("ALTER TABLE TEST_TAB_2 "+
                "DROP CONSTRAINT TEST_TAB_2_FK_1");
        //Dropping the foreign key constraint should cause the statistics row
        // for TEST_TAB_2 to be dropped as well.
        stats.assertNoStatsTable("TEST_TAB_2");
        s.execute("CALL SYSCS_UTIL.SYSCS_UPDATE_STATISTICS('APP','TEST_TAB_2', null)");
        stats.assertNoStatsTable("TEST_TAB_2");
        s.execute("CALL SYSCS_UTIL.SYSCS_DROP_STATISTICS('APP','TEST_TAB_2', null)");
        //After DERBY-4115 is implemented, we will see no statistics
        // for TEST_TAB_2 after calling SYSCS_DROP_STATISTICS on it.
View Full Code Here

Examples of org.apache.derbyTesting.junit.IndexStatsUtil.assertNoStatsTable()

                "DROP CONSTRAINT TEST_TAB_2_FK_1");
        //Dropping the foreign key constraint should cause the statistics row
        // for TEST_TAB_2 to be dropped as well.
        stats.assertNoStatsTable("TEST_TAB_2");
        s.execute("CALL SYSCS_UTIL.SYSCS_UPDATE_STATISTICS('APP','TEST_TAB_2', null)");
        stats.assertNoStatsTable("TEST_TAB_2");
        s.execute("CALL SYSCS_UTIL.SYSCS_DROP_STATISTICS('APP','TEST_TAB_2', null)");
        //After DERBY-4115 is implemented, we will see no statistics
        // for TEST_TAB_2 after calling SYSCS_DROP_STATISTICS on it.
        stats.assertNoStatsTable("TEST_TAB_2");
        s.execute("drop table TEST_TAB_2");
View Full Code Here

Examples of org.apache.derbyTesting.junit.IndexStatsUtil.assertNoStatsTable()

        s.execute("CALL SYSCS_UTIL.SYSCS_UPDATE_STATISTICS('APP','TEST_TAB_2', null)");
        stats.assertNoStatsTable("TEST_TAB_2");
        s.execute("CALL SYSCS_UTIL.SYSCS_DROP_STATISTICS('APP','TEST_TAB_2', null)");
        //After DERBY-4115 is implemented, we will see no statistics
        // for TEST_TAB_2 after calling SYSCS_DROP_STATISTICS on it.
        stats.assertNoStatsTable("TEST_TAB_2");
        s.execute("drop table TEST_TAB_2");
        s.execute("drop table TEST_TAB_1");
        stats.release();
    }
View Full Code Here

Examples of org.apache.derbyTesting.junit.IndexStatsUtil.assertNoStatsTable()

        commit();
        setAutoCommit(true);
        IndexStatsUtil stats = new IndexStatsUtil(getConnection());
        // Expected FK table: 0
        // Expected main table: 2xPK, 1 non-unique, 1 FK = 4
        stats.assertNoStatsTable(tbl_fk);
        stats.assertTableStats(tbl, 4);
        IndexStatsUtil.IdxStats[] tbl_stats_0 = stats.getStatsTable(tbl);

        // Run the update statistics procedure.
        // Sleep at least one tick to ensure the timestamps differ.
View Full Code Here

Examples of org.apache.derbyTesting.junit.IndexStatsUtil.assertNoStatsTable()

        ps.execute();
        ps.setString(1, tbl_fk);
        ps.execute();

        // Check the counts.
        stats.assertNoStatsTable(tbl_fk);
        stats.assertTableStats(tbl, 4);
        // Check the timestamps (i.e. were they actually updated?).
        IndexStatsUtil.IdxStats[] tbl_stats_1 = stats.getStatsTable(tbl);
        assertEquals(tbl_stats_0.length, tbl_stats_1.length);
        for (int i=0; i < tbl_stats_1.length; i++) {
View Full Code Here

Examples of org.apache.derbyTesting.junit.IndexStatsUtil.assertNoStatsTable()

        ps.execute();
        // Just use any of the previous stats as a reference point.
        IndexStatsUtil.IdxStats nonUniqueIdx = stats.getStatsIndex(nuIdx)[0];
        assertTrue(nonUniqueIdx.after(tbl_stats_1[0]));
        // Check the counts again.
        stats.assertNoStatsTable(tbl_fk);
        stats.assertTableStats(tbl, 4);

        // Cleanup
        dropTable(tbl);
        dropTable(tbl_fk);
View Full Code Here

Examples of org.apache.derbyTesting.junit.IndexStatsUtil.assertNoStatsTable()

        stmt.close();

        // Trigger stats update on secondary table.
        IndexStatsUtil myStats =
                new IndexStatsUtil(ds.getConnection(), DEFAULT_TIMEOUT);
        myStats.assertNoStatsTable(TAB2);
        con.prepareStatement("select * from " + TAB2 + " where id = ?");
        myStats.assertTableStats(TAB2, 1);
        myStats.release();

        // Shutdown, then delete database directory.
View Full Code Here

Examples of org.apache.derbyTesting.junit.IndexStatsUtil.assertNoStatsTable()

                new IndexStatsUtil(ds.getConnection(), DEFAULT_TIMEOUT);
        myStats.assertTableStats(TAB1, 1);

        // Trigger stats update on secondary table, make sure the daemon can
        // still process work.
        myStats.assertNoStatsTable(TAB2);
        con.prepareStatement("select * from " + TAB2 + " where id = ?");
        myStats.assertTableStats(TAB2, 1);
        myStats.release();

        // Shutdown database and try to delete it.
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.