| java.lang.Object org.apache.derbyTesting.functionTests.util.T_ConsistencyChecker
T_ConsistencyChecker | public class T_ConsistencyChecker (Code) | | This class has methods for corrupting a database.
IT MUST NOT BE DISTRIBUTED WITH THE PRODUCT.
NOTE: The entry points to this class are all static,
for easy access via the query language. Each of the
static methods instantiates an object from the class
and calls methods off of that object. This allows
the sharing of code across the various static methods.
|
Method Summary | |
public static String | countDependencies() Check to make sure that there are no active dependencies (stored or
in memory).
String If an inconsistency is found, and if DEBUG is on, then a string will be returned with more info. | public static String | countOpens() Check to make sure that there are no open conglomerates, scans or sorts.
String If an inconsistency is found, and if DEBUG is on, then a string will be returned with more info. | public static void | deleteFirstHeapRow(String schemaName, String tableName) Delete the first row from the heap, without
deleting it from the indexes on the table.
Parameters: schemaName - The schema name. Parameters: tableName - The table name. | public static void | insertBadRowLocation(String schemaName, String tableName, String indexName) Get the first row from the heap and insert it into
the specified index, with a bad row location, without
inserting it into the heap or the other indexes on the table.
Parameters: schemaName - The schema name. Parameters: tableName - The table name. Parameters: indexName - The specified index. | public static void | nullFirstHeapRow(String schemaName, String tableName) Set all of the columns in the first row from
the heap to null, without
updating the indexes on the table.
Parameters: schemaName - The schema name. Parameters: tableName - The table name. | public static void | reinsertFirstHeapRow(String schemaName, String tableName) Get the first row from the heap and insert it into
the heap again, without
inserting it from the indexes on the table.
Parameters: schemaName - The schema name. Parameters: tableName - The table name. | public static String | runConsistencyChecker() Run all of the consistency checkers which do not take parameters.
Actually, just run the ones that "make sense" to run. | public static void | swapColumnsInFirstHeapRow(String schemaName, String tableName, int firstColumn, int secondColumn) Swap the values in the specified columns of the
first row from the heap, without
updating the indexes on the table.
Parameters: schemaName - The schema name. Parameters: tableName - The table name. Parameters: firstColumn - First column #. Parameters: secondColumn - Second column #. |
countDependencies | public static String countDependencies() throws StandardException, java.sql.SQLException(Code) | | Check to make sure that there are no active dependencies (stored or
in memory).
String If an inconsistency is found, and if DEBUG is on, then a string will be returned with more info. If DEBUG is off, then a simple string will be returned stating whether or not there are open scans. exception: StandardException - Thrown on error exception: java.sql.SQLException - Thrown on error |
countOpens | public static String countOpens() throws StandardException(Code) | | Check to make sure that there are no open conglomerates, scans or sorts.
String If an inconsistency is found, and if DEBUG is on, then a string will be returned with more info. If DEBUG is off, then a simple string will be returned stating whether or not there are open scans. exception: StandardException - Thrown on error |
deleteFirstHeapRow | public static void deleteFirstHeapRow(String schemaName, String tableName) throws StandardException(Code) | | Delete the first row from the heap, without
deleting it from the indexes on the table.
Parameters: schemaName - The schema name. Parameters: tableName - The table name. Nothing. exception: StandardException - Thrown on error |
insertBadRowLocation | public static void insertBadRowLocation(String schemaName, String tableName, String indexName) throws StandardException(Code) | | Get the first row from the heap and insert it into
the specified index, with a bad row location, without
inserting it into the heap or the other indexes on the table.
Parameters: schemaName - The schema name. Parameters: tableName - The table name. Parameters: indexName - The specified index. Nothing. exception: StandardException - Thrown on error |
nullFirstHeapRow | public static void nullFirstHeapRow(String schemaName, String tableName) throws StandardException(Code) | | Set all of the columns in the first row from
the heap to null, without
updating the indexes on the table.
Parameters: schemaName - The schema name. Parameters: tableName - The table name. Nothing. exception: StandardException - Thrown on error |
reinsertFirstHeapRow | public static void reinsertFirstHeapRow(String schemaName, String tableName) throws StandardException(Code) | | Get the first row from the heap and insert it into
the heap again, without
inserting it from the indexes on the table.
Parameters: schemaName - The schema name. Parameters: tableName - The table name. Nothing. exception: StandardException - Thrown on error |
runConsistencyChecker | public static String runConsistencyChecker() throws StandardException, java.sql.SQLException(Code) | | Run all of the consistency checkers which do not take parameters.
Actually, just run the ones that "make sense" to run. Today,
that is:
countOpens()
String If an inconsistency is found, and if DEBUG is on, then a string will be returned with more info. If DEBUG is off, then a simple string will be returned stating whether or not there are open scans. exception: StandardException - Thrown on error exception: java.sql.SQLException - Thrown on error |
swapColumnsInFirstHeapRow | public static void swapColumnsInFirstHeapRow(String schemaName, String tableName, int firstColumn, int secondColumn) throws StandardException(Code) | | Swap the values in the specified columns of the
first row from the heap, without
updating the indexes on the table.
Parameters: schemaName - The schema name. Parameters: tableName - The table name. Parameters: firstColumn - First column #. Parameters: secondColumn - Second column #. Nothing. exception: StandardException - Thrown on error |
|
|