*/
private void addData(Database db)
throws DatabaseException {
DatabaseImpl dbImpl = DbInternal.dbGetDatabaseImpl(db);
EnvironmentImpl envImpl = DbInternal.envGetEnvironmentImpl(env);
CheckpointConfig ckptConfig = new CheckpointConfig();
ckptConfig.setForce(true);
/*
* Create a one element dup tree by making a dupe and then reducing it
* back to one element.
*/
put(db, "cfhaa", "yrhwlvlgvq");
put(db, "cfhaa", "blort");
delete(db, "cfhaa", "blort");
env.compress();
env.sync();
/* Same thing for cfgaa. */
put(db, "cfgaa", "urhwlvlgvq");
put(db, "cfgaa", "blort");
delete(db, "cfgaa", "blort");
put(db, "cfiaa", "yrhwlvlgvq");
put(db, "cffaa", "yrhwlvlgvq");
env.sync();
env.sync();
/* Write out the DelDupLN and DupCountLN. */
delete(db, "cfhaa", "yrhwlvlgvq");
BIN bin = (BIN) dbImpl.getTree().search("cfhaa".getBytes(),
SearchType.NORMAL,
-1,
null,
true);
assertNotNull(bin);
int idx = bin.findEntry("cfhaa".getBytes(), false, true);
DIN din = (DIN) bin.getTarget(idx);
assertNotNull(din);
idx = din.findEntry("yrhwlvlgvq".getBytes(), false, true);
DBIN dbin = (DBIN) din.getTarget(idx);
Key.DUMP_BINARY = false;
dbin.log(envImpl.getLogManager());
din.log(envImpl.getLogManager());
bin.releaseLatch();
env.compress();
bin.log(envImpl.getLogManager());
}