index_cc.checkConsistency();
// Create a row and insert into base table, remembering it's location.
DataValueDescriptor[] r1 = TemplateRow.newU8Row(2);
T_SecondaryIndexRow index_row1 = new T_SecondaryIndexRow();
RowLocation base_rowloc1 = base_cc.newRowLocationTemplate();
index_row1.init(r1, base_rowloc1, 3);
((SQLLongint) r1[0]).setValue(2);
((SQLLongint) r1[1]).setValue(2);
// Insert the row into the base table and remember its location.
base_cc.insertAndFetchLocation(r1, base_rowloc1);
// Insert the row into the secondary index.
if (index_cc.insert(index_row1.getRow()) != 0)
throw T_Fail.testFailMsg("insert failed");
// Make sure we read back the value we wrote from base and index table.
DataValueDescriptor[] r2 = TemplateRow.newU8Row(2);
T_SecondaryIndexRow index_row2 = new T_SecondaryIndexRow();
RowLocation base_rowloc2 = base_cc.newRowLocationTemplate();
index_row2.init(r2, base_rowloc2, 3);
// base table check:
if (!base_cc.fetch(base_rowloc1, r2, (FormatableBitSet) null))