Hi, Howard.
As you told before, I will write to openldap-devel.
So, please take look to MDB_INTEGERDUP in mdb_attr_dbs_open(). I cutout ones and all tests are passing.
For my mdb_chk tool this is also solves a problem with checking INTEGER-keys. With MDB_INTEGERDUP removal a logic become spotless: keys must be sizeof(int) or sizeof(size_t) only if MDB_INTEGERDUP or MDB_INTEGERKEY is in a dbi-flags.
Would you agree to remove MDB_INTEGERDUP from the mdb_attr_dbs_open()?
Leonid.
2015-04-30 4:12 GMT+03:00 Howard Chu hyc@symas.com:
Leonid Yuriev wrote:
OK, but then - what is the purpose of MDB_INTEGERDUP in mdb_attr_dbs_open()?
flags = MDB_DUPSORT|MDB_DUPFIXED|MDB_INTEGERDUP; if ( !(slapMode & SLAP_TOOL_READONLY) ) flags |= MDB_CREATE;
Think it is not necessary, is it?
You really think so? Have you thought about what the actual *values* are in an index, instead of just the keys?
Anyway, this ITS is resolved. Thank you for reporting the bug. If you want to ask further questions about how the indexer works take it to openldap-devel.
-- -- Howard Chu CTO, Symas Corp. http://www.symas.com Director, Highland Sun http://highlandsun.com/hyc/ Chief Architect, OpenLDAP http://www.openldap.org/project/
Леонид Юрьев wrote:
Hi, Howard.
As you told before, I will write to openldap-devel.
So, please take look to MDB_INTEGERDUP in mdb_attr_dbs_open(). I cutout ones and all tests are passing.
For my mdb_chk tool this is also solves a problem with checking INTEGER-keys. With MDB_INTEGERDUP removal a logic become spotless: keys must be sizeof(int) or sizeof(size_t) only if MDB_INTEGERDUP or MDB_INTEGERKEY is in a dbi-flags.
Would you agree to remove MDB_INTEGERDUP from the mdb_attr_dbs_open()?
No. The MDB_INTEGERDUP function was created for use in back-mdb's indexer. It's a significant optimization; that is not going away.
Leonid.
2015-04-30 4:12 GMT+03:00 Howard Chu <hyc@symas.com mailto:hyc@symas.com>:
Leonid Yuriev wrote: OK, but then - what is the purpose of MDB_INTEGERDUP in mdb_attr_dbs_open()? flags = MDB_DUPSORT|MDB_DUPFIXED|MDB_INTEGERDUP; if ( !(slapMode & SLAP_TOOL_READONLY) ) flags |= MDB_CREATE; Think it is not necessary, is it? You really think so? Have you thought about what the actual *values* are in an index, instead of just the keys? Anyway, this ITS is resolved. Thank you for reporting the bug. If you want to ask further questions about how the indexer works take it to openldap-devel.
30.04.2015 19:11 пользователь "Howard Chu" hyc@symas.com написал:
Леонид Юрьев wrote:
Hi, Howard.
As you told before, I will write to openldap-devel.
So, please take look to MDB_INTEGERDUP in mdb_attr_dbs_open(). I cutout ones and all tests are passing.
For my mdb_chk tool this is also solves a problem with checking INTEGER-keys. With MDB_INTEGERDUP removal a logic become spotless: keys must be sizeof(int) or sizeof(size_t) only if MDB_INTEGERDUP or MDB_INTEGERKEY is in a dbi-flags.
Would you agree to remove MDB_INTEGERDUP from the mdb_attr_dbs_open()?
No. The MDB_INTEGERDUP function was created for use in back-mdb's
indexer. It's a significant optimization; that is not going away.
Ok.
Could you explain more details?
I want to understand - in which cases I could check that key-size is "good" for a integer-modes?