Hallvard Breien Furuseth wrote: > Howard Chu writes: >>> Append mode now does no key comparisons, input must be in sorted order. >>> page_split was not updating cursor parents correctly. >> >> MDB_APPEND mode is meant to be used for bulk loading of pre-sorted >> keys. (e.g., if someone wanted to write an mdb_load utility and the >> corresponding mdb_dump program, you would use this mode for the >> loader.) New key/data pairs are simply appended to the last page of >> the database, with no key comparisons at all. (...) > > As a user, I'd feel safer with a mode which kept the DB consistent: > Return failure if (key to append) < (current max key). Presumably > that'd mean 1 key comparison per added entry. And maybe giving the > root pages a reference to the last key, I don't know.
I had a check for (key == current last key) but now I've changed it to (key <= current last key). > Does this affect OpenLDAP (slapadd -q) users, or should I be saying > "as a libmdb user"? Yes, this affects slapadd (not just -q). Append mode is used for the id2entry DB since new entries all get consecutively incremented entryIDs. Append mode is also used for the dn2id DB when adding a new entry. Append mode is also used for index records if adding a new entryID to an index slot that already exists. -- -- Howard Chu CTO, Symas Corp. http://www.symas.com Director, Highland Sun http://highlandsun.com/hyc/ Chief Architect, OpenLDAP http://www.openldap.org/project/