In hdb_dn2idl_internal, skip cursor get when dkids == 1

This commit is contained in:
Howard Chu 2005-11-20 22:32:39 +00:00
parent 165fb447be
commit 2b9c8076cc

View File

@ -948,6 +948,7 @@ hdb_dn2idl_internal(
cx->data.ulen = BDB_IDL_UM_SIZE * sizeof(ID);
cx->data.flags = DB_DBT_USERMEM;
if ( dkids > 1 ) {
/* Fetch the rest of the IDs in a loop... */
while ( (cx->rc = cx->dbc->c_get( cx->dbc, &cx->key, &cx->data,
DB_MULTIPLE | DB_NEXT_DUP )) == 0 ) {
@ -977,6 +978,8 @@ hdb_dn2idl_internal(
}
}
}
}
cx->rc = cx->dbc->c_close( cx->dbc );
done_one:
bdb_cache_entryinfo_lock( cx->ei );