mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
Merge remote-tracking branch 'origin/mdb.RE/0.9'
This commit is contained in:
commit
b6974ccd9f
@ -7643,9 +7643,9 @@ mdb_page_merge(MDB_cursor *csrc, MDB_cursor *cdst)
|
||||
uint16_t depth = cdst->mc_db->md_depth;
|
||||
mdb_cursor_pop(cdst);
|
||||
rc = mdb_rebalance(cdst);
|
||||
/* Did the tree shrink? */
|
||||
if (depth > cdst->mc_db->md_depth)
|
||||
snum--;
|
||||
/* Did the tree height change? */
|
||||
if (depth != cdst->mc_db->md_depth)
|
||||
snum += cdst->mc_db->md_depth - depth;
|
||||
cdst->mc_snum = snum;
|
||||
cdst->mc_top = snum-1;
|
||||
}
|
||||
@ -7837,7 +7837,7 @@ mdb_rebalance(MDB_cursor *mc)
|
||||
*/
|
||||
if (PAGEFILL(mc->mc_txn->mt_env, mn.mc_pg[mn.mc_top]) >= thresh && NUMKEYS(mn.mc_pg[mn.mc_top]) > minkeys) {
|
||||
rc = mdb_node_move(&mn, mc);
|
||||
if (mc->mc_ki[ptop]) {
|
||||
if (mc->mc_ki[mc->mc_top-1]) {
|
||||
oldki++;
|
||||
}
|
||||
} else {
|
||||
@ -8050,8 +8050,7 @@ mdb_page_split(MDB_cursor *mc, MDB_val *newkey, MDB_val *newdata, pgno_t newpgno
|
||||
mc->mc_ki[0] = 0;
|
||||
mc->mc_db->md_root = pp->mp_pgno;
|
||||
DPRINTF(("root split! new root = %"Z"u", pp->mp_pgno));
|
||||
mc->mc_db->md_depth++;
|
||||
new_root = 1;
|
||||
new_root = mc->mc_db->md_depth++;
|
||||
|
||||
/* Add left (implicit) pointer. */
|
||||
if ((rc = mdb_node_add(mc, 0, NULL, NULL, mp->mp_pgno, 0)) != MDB_SUCCESS) {
|
||||
@ -8364,7 +8363,7 @@ mdb_page_split(MDB_cursor *mc, MDB_val *newkey, MDB_val *newdata, pgno_t newpgno
|
||||
if (new_root) {
|
||||
int k;
|
||||
/* root split */
|
||||
for (k=m3->mc_top; k>=0; k--) {
|
||||
for (k=new_root; k>=0; k--) {
|
||||
m3->mc_ki[k+1] = m3->mc_ki[k];
|
||||
m3->mc_pg[k+1] = m3->mc_pg[k];
|
||||
}
|
||||
|
@ -5,7 +5,6 @@
|
||||
mdb_dump \- LMDB environment export tool
|
||||
.SH SYNOPSIS
|
||||
.B mdb_dump
|
||||
.BR \ envpath
|
||||
[\c
|
||||
.BR \-V ]
|
||||
[\c
|
||||
@ -19,6 +18,7 @@ mdb_dump \- LMDB environment export tool
|
||||
[\c
|
||||
.BR \-a \ |
|
||||
.BI \-s \ subdb\fR]
|
||||
.BR \ envpath
|
||||
.SH DESCRIPTION
|
||||
The
|
||||
.B mdb_dump
|
||||
|
@ -155,7 +155,7 @@ static int dumpit(MDB_txn *txn, MDB_dbi dbi, char *name)
|
||||
|
||||
static void usage(char *prog)
|
||||
{
|
||||
fprintf(stderr, "usage: %s dbpath [-V] [-f output] [-l] [-n] [-p] [-a|-s subdb]\n", prog);
|
||||
fprintf(stderr, "usage: %s [-V] [-f output] [-l] [-n] [-p] [-a|-s subdb] dbpath\n", prog);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
|
@ -5,7 +5,6 @@
|
||||
mdb_load \- LMDB environment import tool
|
||||
.SH SYNOPSIS
|
||||
.B mdb_load
|
||||
.BR \ envpath
|
||||
[\c
|
||||
.BR \-V ]
|
||||
[\c
|
||||
@ -18,6 +17,7 @@ mdb_load \- LMDB environment import tool
|
||||
.BR \-N ]
|
||||
[\c
|
||||
.BR \-T ]
|
||||
.BR \ envpath
|
||||
.SH DESCRIPTION
|
||||
The
|
||||
.B mdb_load
|
||||
|
@ -276,7 +276,7 @@ badend:
|
||||
|
||||
static void usage(void)
|
||||
{
|
||||
fprintf(stderr, "usage: %s dbpath [-V] [-f input] [-n] [-s name] [-N] [-T]\n", prog);
|
||||
fprintf(stderr, "usage: %s [-V] [-f input] [-n] [-s name] [-N] [-T] dbpath\n", prog);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
|
@ -5,7 +5,6 @@
|
||||
mdb_stat \- LMDB environment status tool
|
||||
.SH SYNOPSIS
|
||||
.B mdb_stat
|
||||
.BR \ envpath
|
||||
[\c
|
||||
.BR \-V ]
|
||||
[\c
|
||||
@ -19,6 +18,7 @@ mdb_stat \- LMDB environment status tool
|
||||
[\c
|
||||
.BR \-a \ |
|
||||
.BI \-s \ subdb\fR]
|
||||
.BR \ envpath
|
||||
.SH DESCRIPTION
|
||||
The
|
||||
.B mdb_stat
|
||||
|
@ -37,7 +37,7 @@ static void prstat(MDB_stat *ms)
|
||||
|
||||
static void usage(char *prog)
|
||||
{
|
||||
fprintf(stderr, "usage: %s dbpath [-V] [-n] [-e] [-r[r]] [-f[f[f]]] [-a|-s subdb]\n", prog);
|
||||
fprintf(stderr, "usage: %s [-V] [-n] [-e] [-r[r]] [-f[f[f]]] [-a|-s subdb] dbpath\n", prog);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user