]> git.ipfire.org Git - thirdparty/openldap.git/commitdiff
ITS#9637 back-mdb fix max idlexp
authorHoward Chu <hyc@openldap.org>
Mon, 16 Aug 2021 21:44:54 +0000 (22:44 +0100)
committerHoward Chu <hyc@openldap.org>
Mon, 16 Aug 2021 21:44:54 +0000 (22:44 +0100)
doc/guide/admin/slapdconf2.sdf
doc/guide/admin/slapdconfig.sdf
doc/man/man5/slapd-mdb.5
servers/slapd/back-mdb/config.c

index c5c82e1307e0a9e5518225679eb178bd210af52f..764763f4e38028fe6eaa13e415c7316e3c81af02 100644 (file)
@@ -740,7 +740,7 @@ H4: olcBkMdbIdlExp <exponent>
 
 Specify a power of 2 for the maximum size of an index slot.
 The default is 16, yielding a maximum slot size of 2^16 or 65536.
-The specified value must be in the range of 16-31.
+The specified value must be in the range of 16-30.
 
 This setting helps with the case where certain search filters are
 slow to return results due to an index slot having collapsed to a
index 2ebc671ad4ea03735ea84b36f52b5a70a542e894..3156b521e04a254ac282970185c85c5720bceb54 100644 (file)
@@ -595,7 +595,7 @@ H4: idlexp <exponent>
 
 Specify a power of 2 for the maximum size of an index slot.
 The default is 16, yielding a maximum slot size of 2^16 or 65536.
-The specified value must be in the range of 16-31.
+The specified value must be in the range of 16-30.
 
 This setting helps with the case where certain search filters are
 slow to return results due to an index slot having collapsed to a
index 9e1bb1ab59219e4d409a3f0e158df2ebe5e06dbb..75f93359148f2264ac2edabec74b5d0b03e64f93 100644 (file)
@@ -27,7 +27,7 @@ come before any subsequent "backend" or "database" lines.
 Specify a power of 2 for the maximum size of an index slot.
 The default is 16, yielding a maximum slot size of 2^16 or 65536.
 Once set, this option applies to every \fBmdb\fP database instance.
-The specified value must be in the range of 16-31.
+The specified value must be in the range of 16-30.
 .LP
 
 These
index c0c4b4013ceb6dc74f4cd4af2ea5f79cd57242a0..380e4ff5eb7197df8c71336b2c08b9495edf5419 100644 (file)
@@ -167,7 +167,8 @@ mdb_bk_cfg( ConfigArgs *c )
                mdb_idl_reset();
                c->bi->bi_private = 0;
        } else {
-               if ( c->value_int >= MDB_IDL_LOGN && c->value_int < sizeof(int) * CHAR_BIT ) {
+               /* with 32 bit ints, db_size max is 2^30 and um_size max is 2^31 */
+               if ( c->value_int >= MDB_IDL_LOGN && ( c->value_int < sizeof(int) * CHAR_BIT - 1 )) {
                        MDB_idl_logn = c->value_int;
                        mdb_idl_reset();
                        c->bi->bi_private = (void *)8;  /* non-NULL to show we're using it */