long conglomid,
DataValueDescriptor[] search_key,
DataValueDescriptor[] template)
throws StandardException
{
SQLLongint column0 = new SQLLongint(-1);
SQLLongint column1 = new SQLLongint(-1);
// open a new scan
ScanController scan =
tc.openScan(conglomid, false,
TransactionController.OPENMODE_FORUPDATE,
TransactionController.MODE_RECORD,
TransactionController.ISOLATION_SERIALIZABLE,
(FormatableBitSet) null,
search_key, ScanController.GE,
null,
search_key, ScanController.GT);
long expect_key =
((SQLLongint) search_key[1]).getLong();
int numrows = 0;
DataValueDescriptor[] partialRow = new DataValueDescriptor[2];
partialRow[0] = column0;
partialRow[1] = column1;
while (scan.next())
{
numrows++;
scan.fetch(partialRow);
if (column0.getLong() != 1)
return(FAIL("(t_delete) column[0] value is not 1"));
if (column1.getLong() != expect_key)
return(
FAIL("(t_delete) column[1] value is not " + expect_key));
if (!scan.delete())
{