]> git.sur5r.net Git - openldap/blobdiff - libraries/liblmdb/lmdb.h
Merge remote-tracking branch 'origin/mdb.master' into OPENLDAP_REL_ENG_2_4
[openldap] / libraries / liblmdb / lmdb.h
index 0bc97cdf407b4adf23cedf8d8ec0566334f4a9fe..11b46bfa4866faca3c5eefacabc0d445ed8393e1 100644 (file)
@@ -194,7 +194,7 @@ typedef int mdb_filehandle_t;
        MDB_VERINT(MDB_VERSION_MAJOR,MDB_VERSION_MINOR,MDB_VERSION_PATCH)
 
 /** The release date of this library version */
-#define MDB_VERSION_DATE       "June 20, 2014"
+#define MDB_VERSION_DATE       "July 24, 2014"
 
 /** A stringifier for the version info */
 #define MDB_VERSTR(a,b,c,d)    "LMDB " #a "." #b "." #c ": (" d ")"
@@ -421,7 +421,10 @@ typedef enum MDB_cursor_op {
 #define MDB_BAD_TXN                    (-30782)
        /** Unsupported size of key/DB name/data, or wrong DUPFIXED size */
 #define MDB_BAD_VALSIZE                (-30781)
-#define MDB_LAST_ERRCODE       MDB_BAD_VALSIZE
+       /** The specified DBI was changed unexpectedly */
+#define MDB_BAD_DBI            (-30780)
+       /** The last defined error code */
+#define MDB_LAST_ERRCODE       MDB_BAD_DBI
 /** @} */
 
 /** @brief Statistics for a database in the environment */
@@ -784,7 +787,13 @@ int  mdb_env_get_fd(MDB_env *env, mdb_filehandle_t *fd);
         * this process. Note that the library does not check for this condition,
         * the caller must ensure it explicitly.
         *
-        * If the mapsize is changed by another process, #mdb_txn_begin() will
+        * The new size takes effect immediately for the current process but
+        * will not be persisted to any others until a write transaction has been
+        * committed by the current process. Also, only mapsize increases are
+        * persisted into the environment.
+        *
+        * If the mapsize is increased by another process, and data has grown
+        * beyond the range of the current mapsize, #mdb_txn_begin() will
         * return #MDB_MAP_RESIZED. This function may be called with a size
         * of zero to adopt the new size.
         *
@@ -1401,7 +1410,10 @@ int  mdb_cursor_get(MDB_cursor *cursor, MDB_val *key, MDB_val *data,
         * <ul>
         *      <li>#MDB_CURRENT - replace the item at the current cursor position.
         *              The \b key parameter must still be provided, and must match it.
-        *              So must \b data if using sorted duplicates (#MDB_DUPSORT).
+        *              If using sorted duplicates (#MDB_DUPSORT) the data item must still
+        *              sort into the same place. This is intended to be used when the
+        *              new data is the same size as the old. Otherwise it will simply
+        *              perform a delete of the old record followed by an insert.
         *      <li>#MDB_NODUPDATA - enter the new key/data pair only if it does not
         *              already appear in the database. This flag may only be specified
         *              if the database was opened with #MDB_DUPSORT. The function will