public class T_b2i extends T_MultiIterations
Modifier and Type | Field and Description |
---|---|
private org.apache.derby.iapi.services.context.ContextService |
contextService |
private java.lang.Object |
store_module |
private static java.lang.String |
testService |
out, shortModuleToTestName, startParams
Constructor and Description |
---|
T_b2i() |
Modifier and Type | Method and Description |
---|---|
(package private) void |
createCongloms(org.apache.derby.iapi.store.access.TransactionController tc,
int num_cols,
boolean unique,
boolean varying_first_col,
int max_btreerows_per_page,
T_CreateConglomRet ret_val)
Utility routine to create base table for tests.
|
private static java.lang.Object |
createPersistentService(java.lang.String factoryInterface,
java.lang.String serviceName,
java.util.Properties properties)
Privileged startup.
|
protected static java.util.Properties |
createProperties(java.util.Properties input_properties,
boolean input_allowduplicates,
int input_nkeyfields,
int input_nuniquecolumns,
boolean input_maintainparentlinks,
long input_baseconglomerateid,
int input_rowlocationcolumn) |
private static java.lang.Object |
findServiceModule(java.lang.Object serviceModule,
java.lang.String factoryInterface)
Privileged startup.
|
private static org.apache.derby.iapi.services.context.Context |
getContextOrNull(java.lang.String contextID)
Privileged lookup of a Context.
|
private static org.apache.derby.iapi.services.context.ContextService |
getContextService()
Privileged lookup of the ContextService.
|
java.lang.String |
getModuleToTestProtocolName()
Get the name of the protocol for the module to test.
|
boolean |
isdbActive()
Check wheather the database is active or not
|
static java.lang.String |
repeatString(java.lang.String data,
int repeat) |
protected void |
runTestSet()
Driver routine for the btree secondary index tests.
|
protected void |
setupTest()
Routine one once per invocation of the test by the driver.
|
protected boolean |
t_001(org.apache.derby.iapi.store.access.TransactionController tc)
Test BTreeController.insert()
Just verify that insert code works for a secondary index.
|
protected boolean |
t_002(org.apache.derby.iapi.store.access.TransactionController tc)
Test backout during critical times of splits.
|
private boolean |
t_003_scan_test_cases(org.apache.derby.iapi.store.access.TransactionController tc,
long index_conglomid,
T_SecondaryIndexRow template) |
protected boolean |
t_003(org.apache.derby.iapi.store.access.TransactionController tc)
Test BTree.openScan(), BtreeScan.init(), BtreeScan.next(),
BtreeScan.fetch().
|
protected boolean |
t_004(org.apache.derby.iapi.store.access.TransactionController tc)
Test qualifiers.
|
protected boolean |
t_005(org.apache.derby.iapi.store.access.TransactionController tc)
Test Branch splits - number of rows necessary to cause splits is raw
store implementation dependant (currently 5 rows per page in in-memory
implementation).
|
protected boolean |
t_006(org.apache.derby.iapi.store.access.TransactionController tc)
Test unimplemented interfaces.
|
protected boolean |
t_007(org.apache.derby.iapi.store.access.TransactionController tc)
Test multiple scans in a single page/no split
|
protected boolean |
t_008(org.apache.derby.iapi.store.access.TransactionController tc)
Test multiple scans in a single table/with splits
|
protected boolean |
t_009(org.apache.derby.iapi.store.access.TransactionController tc)
Test unique/nonunique indexes - both positive and negative cases.
|
protected boolean |
t_010(org.apache.derby.iapi.store.access.TransactionController tc)
Test restoreToNull
|
protected boolean |
t_011(org.apache.derby.iapi.store.access.TransactionController tc)
Test Special cases of split.
|
protected boolean |
t_012(org.apache.derby.iapi.store.access.TransactionController tc)
Test Special cases of split.
|
protected boolean |
t_013(org.apache.derby.iapi.store.access.TransactionController tc)
Test backout during critical times of splits.
|
protected boolean |
t_014(org.apache.derby.iapi.store.access.TransactionController tc)
Test getTableProperties() of BTreeController.
|
protected boolean |
t_015(org.apache.derby.iapi.store.access.TransactionController tc)
Test latch release during critical time during row level locking.
|
protected boolean |
t_016(org.apache.derby.iapi.store.access.TransactionController tc)
Test deadlocks during critical times of row level locking.
|
protected boolean |
t_017(org.apache.derby.iapi.store.access.TransactionController tc)
Test BTree.openScan(), BtreeScan.init(), BtreeScan.next(),
BtreeScan.fetch() with descending indexes.
|
protected boolean |
t_018(org.apache.derby.iapi.store.access.TransactionController tc)
Test BTree.openScan(), BtreeScan.init(), BtreeScan.next(),
BtreeScan.fetch() with alternating ascending and descending coulmn
sort order indexes.
|
protected boolean |
t_019(org.apache.derby.iapi.store.access.TransactionController tc)
Test BTree.openScan(), BtreeScan.init(), BtreeScan.next(),
BtreeScan.fetch() with alternating ascending and descending coulmn
sort order indexes.
|
protected boolean |
t_020(org.apache.derby.iapi.store.access.TransactionController tc)
Test read uncommitted cases on scan.
|
protected boolean |
t_021(org.apache.derby.iapi.store.access.TransactionController tc)
Test latch release at critical time during delete on an index scan that
uses update locks.
|
private boolean |
t_ascdesc_scan_test_cases(org.apache.derby.iapi.store.access.TransactionController tc,
long index_conglomid,
T_SecondaryIndexRow template) |
private boolean |
t_ascdesc1_scan_test_cases(org.apache.derby.iapi.store.access.TransactionController tc,
long index_conglomid,
T_SecondaryIndexRow template) |
protected boolean |
t_delete(org.apache.derby.iapi.store.access.TransactionController tc,
long conglomid,
org.apache.derby.iapi.types.DataValueDescriptor[] search_key,
boolean useUpdateLocks)
delete a single key, given key value.
|
private boolean |
t_desc_scan_test_cases(org.apache.derby.iapi.store.access.TransactionController tc,
long index_conglomid,
T_SecondaryIndexRow template) |
protected boolean |
t_perf(org.apache.derby.iapi.store.access.TransactionController tc)
Test simple btree insert performance
|
protected boolean |
t_scan(org.apache.derby.iapi.store.access.TransactionController tc,
long conglomid,
org.apache.derby.iapi.types.DataValueDescriptor[] template,
org.apache.derby.iapi.types.DataValueDescriptor[] start_key,
int start_op,
org.apache.derby.iapi.store.access.Qualifier[][] qualifier,
org.apache.derby.iapi.types.DataValueDescriptor[] stop_key,
int stop_op,
int expect_numrows,
int expect_key)
Test a single scan.
|
runTests
boot, Execute, FAIL, PASS, REPORT, stop, UnitTestDuration, UnitTestType
private static final java.lang.String testService
private java.lang.Object store_module
private org.apache.derby.iapi.services.context.ContextService contextService
protected void setupTest() throws T_Fail
Do work that should only be done once, no matter how many times runTests() may be executed.
setupTest
in class T_MultiIterations
T_Fail
- Thrown on any error.public java.lang.String getModuleToTestProtocolName()
T_Generic
getModuleToTestProtocolName
in class T_Generic
protected void runTestSet() throws T_Fail
runTestSet
in class T_MultiIterations
T_Fail
- Throws T_Fail on any test failure.void createCongloms(org.apache.derby.iapi.store.access.TransactionController tc, int num_cols, boolean unique, boolean varying_first_col, int max_btreerows_per_page, T_CreateConglomRet ret_val) throws org.apache.derby.iapi.error.StandardException
A little utility routine to create base tables for tests. Just here to make tests a little more readable. It currently just creates a heap table with "num_cols" SQLLongint columns.
num_cols
- the number of columns in the base table.org.apache.derby.iapi.error.StandardException
- Standard exception policy.protected static java.util.Properties createProperties(java.util.Properties input_properties, boolean input_allowduplicates, int input_nkeyfields, int input_nuniquecolumns, boolean input_maintainparentlinks, long input_baseconglomerateid, int input_rowlocationcolumn) throws org.apache.derby.iapi.error.StandardException
org.apache.derby.iapi.error.StandardException
protected boolean t_scan(org.apache.derby.iapi.store.access.TransactionController tc, long conglomid, org.apache.derby.iapi.types.DataValueDescriptor[] template, org.apache.derby.iapi.types.DataValueDescriptor[] start_key, int start_op, org.apache.derby.iapi.store.access.Qualifier[][] qualifier, org.apache.derby.iapi.types.DataValueDescriptor[] stop_key, int stop_op, int expect_numrows, int expect_key) throws org.apache.derby.iapi.error.StandardException
org.apache.derby.iapi.error.StandardException
- Standard exception policy.protected boolean t_delete(org.apache.derby.iapi.store.access.TransactionController tc, long conglomid, org.apache.derby.iapi.types.DataValueDescriptor[] search_key, boolean useUpdateLocks) throws org.apache.derby.iapi.error.StandardException
org.apache.derby.iapi.error.StandardException
- Standard exception policy.protected boolean t_001(org.apache.derby.iapi.store.access.TransactionController tc) throws org.apache.derby.iapi.error.StandardException, T_Fail
Just verify that insert code works for a secondary index. Just call the interface and make sure the row got there.
org.apache.derby.iapi.error.StandardException
- Standard exception policy.T_Fail
- Throws T_Fail on any test failure.protected boolean t_002(org.apache.derby.iapi.store.access.TransactionController tc) throws org.apache.derby.iapi.error.StandardException, T_Fail
Use trace points to force errors in split at critical points: leaf_split_abort{1,2,3,4}
org.apache.derby.iapi.error.StandardException
- Standard exception policy.T_Fail
- Throws T_Fail on any test failure.private boolean t_003_scan_test_cases(org.apache.derby.iapi.store.access.TransactionController tc, long index_conglomid, T_SecondaryIndexRow template) throws org.apache.derby.iapi.error.StandardException, T_Fail
org.apache.derby.iapi.error.StandardException
T_Fail
protected boolean t_003(org.apache.derby.iapi.store.access.TransactionController tc) throws org.apache.derby.iapi.error.StandardException, T_Fail
org.apache.derby.iapi.error.StandardException
- Standard exception policy.T_Fail
- Throws T_Fail on any test failure.protected boolean t_004(org.apache.derby.iapi.store.access.TransactionController tc) throws org.apache.derby.iapi.error.StandardException, T_Fail
org.apache.derby.iapi.error.StandardException
- Standard exception policy.T_Fail
- Throws T_Fail on any test failure.protected boolean t_005(org.apache.derby.iapi.store.access.TransactionController tc) throws org.apache.derby.iapi.error.StandardException, T_Fail
org.apache.derby.iapi.error.StandardException
- Standard exception policy.T_Fail
- Throws T_Fail on any test failure.protected boolean t_006(org.apache.derby.iapi.store.access.TransactionController tc) throws org.apache.derby.iapi.error.StandardException, T_Fail
org.apache.derby.iapi.error.StandardException
- Standard exception policy.T_Fail
- Throws T_Fail on any test failure.protected boolean t_007(org.apache.derby.iapi.store.access.TransactionController tc) throws org.apache.derby.iapi.error.StandardException, T_Fail
org.apache.derby.iapi.error.StandardException
- Standard exception policy.T_Fail
- Throws T_Fail on any test failure.protected boolean t_008(org.apache.derby.iapi.store.access.TransactionController tc) throws org.apache.derby.iapi.error.StandardException, T_Fail
org.apache.derby.iapi.error.StandardException
- Standard exception policy.T_Fail
- Throws T_Fail on any test failure.protected boolean t_009(org.apache.derby.iapi.store.access.TransactionController tc) throws org.apache.derby.iapi.error.StandardException, T_Fail
org.apache.derby.iapi.error.StandardException
- Standard exception policy.T_Fail
- Throws T_Fail on any test failure.protected boolean t_010(org.apache.derby.iapi.store.access.TransactionController tc) throws org.apache.derby.iapi.error.StandardException, T_Fail
org.apache.derby.iapi.error.StandardException
- Standard exception policy.T_Fail
- Throws T_Fail on any test failure.protected boolean t_011(org.apache.derby.iapi.store.access.TransactionController tc) throws org.apache.derby.iapi.error.StandardException, T_Fail
Testing: restartSplitFor() call in LeafControlRow(). The first case is where we split down the tree and reach the leaf, pick a split point, and then find that there is not enough room to insert row into parent branch page. The second case is the same as the first except the calling code is trying to split a branch page and the parent branch page doesn't have room for the row.
org.apache.derby.iapi.error.StandardException
- Standard exception policy.T_Fail
- Throws T_Fail on any test failure.protected boolean t_012(org.apache.derby.iapi.store.access.TransactionController tc) throws org.apache.derby.iapi.error.StandardException, T_Fail
Testing: restartSplitFor() call in BranchControlRow(). The second case is the same as the first except the calling code is trying to split a branch page and the parent branch page doesn't have room for the row.
org.apache.derby.iapi.error.StandardException
- Standard exception policy.T_Fail
- Throws T_Fail on any test failure.protected boolean t_013(org.apache.derby.iapi.store.access.TransactionController tc) throws org.apache.derby.iapi.error.StandardException, T_Fail
Force logical undo of an operation which generated an internal update of a btree record: case 1: o insert into unique btree key1, rowlocation_1 o delete from btree key1, rowlocation_1 - this will mark the record logically deleted. o insert enough records to move the logically deleted row to another page to exercise logical undo of the delete. o insert into btree key1, rowlocation_2 - this internally will generate a logical update field on the record. o insert enough records to move the logically deleted row to another page to exercise logical undo of the delete. o abort. case 2: o same as case 1 but don't change the rowlocation_1 value. This simulates what the language will generate on an update of a key field.
org.apache.derby.iapi.error.StandardException
- Standard exception policy.T_Fail
- Throws T_Fail on any test failure.protected boolean t_014(org.apache.derby.iapi.store.access.TransactionController tc) throws org.apache.derby.iapi.error.StandardException, T_Fail
org.apache.derby.iapi.error.StandardException
- Standard exception policy.T_Fail
- Throws T_Fail on any test failure.protected boolean t_015(org.apache.derby.iapi.store.access.TransactionController tc) throws org.apache.derby.iapi.error.StandardException, T_Fail
Use trace points to force errors in split at critical points: leaf_split_abort{1,2,3,4}
org.apache.derby.iapi.error.StandardException
- Standard exception policy.T_Fail
- Throws T_Fail on any test failure.protected boolean t_016(org.apache.derby.iapi.store.access.TransactionController tc) throws org.apache.derby.iapi.error.StandardException, T_Fail
Use trace points to force errors in split at critical points: leaf_split_abort{1,2,3,4}
org.apache.derby.iapi.error.StandardException
- Standard exception policy.T_Fail
- Throws T_Fail on any test failure.protected boolean t_perf(org.apache.derby.iapi.store.access.TransactionController tc) throws org.apache.derby.iapi.error.StandardException, T_Fail
org.apache.derby.iapi.error.StandardException
- Standard exception policy.T_Fail
- Throws T_Fail on any test failure.private boolean t_desc_scan_test_cases(org.apache.derby.iapi.store.access.TransactionController tc, long index_conglomid, T_SecondaryIndexRow template) throws org.apache.derby.iapi.error.StandardException, T_Fail
org.apache.derby.iapi.error.StandardException
T_Fail
protected boolean t_017(org.apache.derby.iapi.store.access.TransactionController tc) throws org.apache.derby.iapi.error.StandardException, T_Fail
org.apache.derby.iapi.error.StandardException
- Standard exception policy.T_Fail
- Throws T_Fail on any test failure.private boolean t_ascdesc_scan_test_cases(org.apache.derby.iapi.store.access.TransactionController tc, long index_conglomid, T_SecondaryIndexRow template) throws org.apache.derby.iapi.error.StandardException, T_Fail
org.apache.derby.iapi.error.StandardException
T_Fail
protected boolean t_018(org.apache.derby.iapi.store.access.TransactionController tc) throws org.apache.derby.iapi.error.StandardException, T_Fail
org.apache.derby.iapi.error.StandardException
- Standard exception policy.T_Fail
- Throws T_Fail on any test failure.private boolean t_ascdesc1_scan_test_cases(org.apache.derby.iapi.store.access.TransactionController tc, long index_conglomid, T_SecondaryIndexRow template) throws org.apache.derby.iapi.error.StandardException, T_Fail
org.apache.derby.iapi.error.StandardException
T_Fail
protected boolean t_019(org.apache.derby.iapi.store.access.TransactionController tc) throws org.apache.derby.iapi.error.StandardException, T_Fail
org.apache.derby.iapi.error.StandardException
- Standard exception policy.T_Fail
- Throws T_Fail on any test failure.protected boolean t_020(org.apache.derby.iapi.store.access.TransactionController tc) throws org.apache.derby.iapi.error.StandardException, T_Fail
org.apache.derby.iapi.error.StandardException
- Standard exception policy.T_Fail
- Throws T_Fail on any test failure.protected boolean t_021(org.apache.derby.iapi.store.access.TransactionController tc) throws org.apache.derby.iapi.error.StandardException, T_Fail
org.apache.derby.iapi.error.StandardException
T_Fail
public static java.lang.String repeatString(java.lang.String data, int repeat)
public boolean isdbActive()
true
if the database is active, false
otherwiseprivate static org.apache.derby.iapi.services.context.ContextService getContextService()
private static org.apache.derby.iapi.services.context.Context getContextOrNull(java.lang.String contextID)
private static java.lang.Object findServiceModule(java.lang.Object serviceModule, java.lang.String factoryInterface) throws org.apache.derby.iapi.error.StandardException
org.apache.derby.iapi.error.StandardException
private static java.lang.Object createPersistentService(java.lang.String factoryInterface, java.lang.String serviceName, java.util.Properties properties) throws org.apache.derby.iapi.error.StandardException
org.apache.derby.iapi.error.StandardException
Apache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.