[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: (ITS#7661) LMDB: Can't get the current flags of MAIN_DBI
- To: openldap-its@OpenLDAP.org
- Subject: Re: (ITS#7661) LMDB: Can't get the current flags of MAIN_DBI
- From: hyc@symas.com
- Date: Sat, 10 Aug 2013 11:07:32 GMT
- Auto-submitted: auto-generated (OpenLDAP-ITS)
sog@msg.com.mx wrote:
> Full_Name: Salvador Ortiz
> Version: 24
> OS: Linux
> URL:
> Submission from: (NULL) (187.162.45.111)
>
>
> The API allows to set the flags of the unnamed db (MAIN_DBI), but try to get
> them back fails with EINVAL.
>
> The fix is trivial:
Thanks, fixed in mdb.master
> --- a/libraries/liblmdb/mdb.c
> +++ b/libraries/liblmdb/mdb.c
> @@ -7871,7 +7871,7 @@ void mdb_dbi_close(MDB_env *env, MDB_dbi dbi)
> int mdb_dbi_flags(MDB_env *env, MDB_dbi dbi, unsigned int *flags)
> {
> /* We could return the flags for the FREE_DBI too but what's the point?
> */
> - if (dbi <= MAIN_DBI || dbi >= env->me_numdbs)
> + if (dbi < MAIN_DBI || dbi >= env->me_numdbs)
> return EINVAL;
> *flags = env->me_dbflags[dbi];
> return MDB_SUCCESS;
>
>
--
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/