Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
OpenLDAP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
James Lowden
OpenLDAP
Commits
d7def7b7
Commit
d7def7b7
authored
11 years ago
by
Quanah Gibson-Mount
Browse files
Options
Downloads
Plain Diff
Merge remote-tracking branch 'origin/mdb.master' into OPENLDAP_REL_ENG_2_4
parents
94c99983
7233bc29
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
libraries/liblmdb/mdb.c
+21
-6
21 additions, 6 deletions
libraries/liblmdb/mdb.c
libraries/liblmdb/midl.h
+1
-1
1 addition, 1 deletion
libraries/liblmdb/midl.h
with
22 additions
and
7 deletions
libraries/liblmdb/mdb.c
+
21
−
6
View file @
d7def7b7
...
...
@@ -853,7 +853,7 @@ struct MDB_txn {
#define MDB_TXN_DIRTY 0x04
/**< must write, even if dirty list is empty */
/** @} */
unsigned
int
mt_flags
;
/**< @ref mdb_txn */
/** dirty_list maxsize - #allocated pages including in parent txns */
/** dirty_list maxsize - #
of
allocated pages
allowed,
including in parent txns */
unsigned
int
mt_dirty_room
;
/** Tracks which of the two meta pages was used at the start
* of this transaction.
...
...
@@ -1268,6 +1268,10 @@ mdb_page_malloc(MDB_cursor *mc) {
return
ret
;
}
/** Free a single page.
* Saves single pages to a list, for future reuse.
* (This is not used for multi-page overflow pages.)
*/
static
void
mdb_page_free
(
MDB_env
*
env
,
MDB_page
*
mp
)
{
...
...
@@ -1549,6 +1553,7 @@ none:
/** Copy a page: avoid copying unused portions of the page.
* @param[in] dst page to copy into
* @param[in] src page to copy from
* @param[in] psize size of a page
*/
static
void
mdb_page_copy
(
MDB_page
*
dst
,
MDB_page
*
src
,
unsigned
int
psize
)
...
...
@@ -4068,8 +4073,7 @@ done:
* @param[in,out] mc the cursor for this operation.
* @param[in] key the key to search for. If NULL, search for the lowest
* page. (This is used by #mdb_cursor_first().)
* @param[in] flags If MDB_PS_MODIFY set, visited pages are updated with new page numbers.
* If MDB_PS_ROOTONLY set, just fetch root node, no further lookups.
* @param[in] modify If true, visited pages are updated with new page numbers.
* @return 0 on success, non-zero on failure.
*/
static
int
...
...
@@ -4169,7 +4173,8 @@ mdb_page_search_lowest(MDB_cursor *mc)
* @param[in,out] mc the cursor for this operation.
* @param[in] key the key to search for. If NULL, search for the lowest
* page. (This is used by #mdb_cursor_first().)
* @param[in] modify If true, visited pages are updated with new page numbers.
* @param[in] flags If MDB_PS_MODIFY set, visited pages are updated with new page numbers.
* If MDB_PS_ROOTONLY set, just fetch root node, no further lookups.
* @return 0 on success, non-zero on failure.
*/
static
int
...
...
@@ -5940,8 +5945,7 @@ mdb_cursor_dbi(MDB_cursor *mc)
}
/** Replace the key for a node with a new key.
* @param[in] mp The page containing the node to operate on.
* @param[in] indx The index of the node to operate on.
* @param[in] mc Cursor pointing to the node to operate on.
* @param[in] key The new key to use.
* @return 0 on success, non-zero on failure.
*/
...
...
@@ -6929,6 +6933,17 @@ newsep:
}
}
else
{
mc
->
mc_ki
[
ptop
]
++
;
/* Make sure mc_ki is still valid.
*/
if
(
mn
.
mc_pg
[
ptop
]
!=
mc
->
mc_pg
[
ptop
]
&&
mc
->
mc_ki
[
ptop
]
>=
NUMKEYS
(
mc
->
mc_pg
[
ptop
]))
{
for
(
i
=
0
;
i
<
ptop
;
i
++
)
{
mc
->
mc_pg
[
i
]
=
mn
.
mc_pg
[
i
];
mc
->
mc_ki
[
i
]
=
mn
.
mc_ki
[
i
];
}
mc
->
mc_pg
[
ptop
]
=
mn
.
mc_pg
[
ptop
];
mc
->
mc_ki
[
ptop
]
=
mn
.
mc_ki
[
ptop
]
-
1
;
}
}
/* return tmp page to freelist */
...
...
This diff is collapsed.
Click to expand it.
libraries/liblmdb/midl.h
+
1
−
1
View file @
d7def7b7
...
...
@@ -135,7 +135,7 @@ int mdb_midl_shrink(MDB_IDL *idp);
/** Grow an IDL.
* Add room for num additional elements.
* @param[in,out] idp Address of the IDL to grow.
* @param[i] num Number of elements to add.
* @param[i
n
] num Number of elements to add.
* @return 0 on success, -1 on failure.
*/
int
mdb_midl_grow
(
MDB_IDL
*
idp
,
int
num
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment