Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
orbea -
OpenLDAP
Commits
8b780915
Commit
8b780915
authored
Mar 23, 2017
by
Howard Chu
Browse files
ITS#8622 fix xcursor after cursor_del
Re-fix
6b1df0e4
from ITS#8406
parent
a87c8fd8
Changes
1
Hide whitespace changes
Inline
Side-by-side
libraries/liblmdb/mdb.c
View file @
8b780915
...
...
@@ -8451,14 +8451,17 @@ mdb_cursor_del0(MDB_cursor *mc)
}
if
(
mc
->
mc_db
->
md_flags
&
MDB_DUPSORT
)
{
MDB_node
*
node
=
NODEPTR
(
m3
->
mc_pg
[
m3
->
mc_top
],
m3
->
mc_ki
[
m3
->
mc_top
]);
/* If this node is a fake page, it needs to be reinited
* because its data has moved. But just reset mc_pg[0]
* if the xcursor is already live.
/* If this node has dupdata, it may need to be reinited
* because its data has moved.
* If the xcursor was not initd it must be reinited.
* Else if node points to a subDB, nothing is needed.
* Else (xcursor was initd, not a subDB) needs mc_pg[0] reset.
*/
if
((
node
->
mn_flags
&
(
F_DUPDATA
|
F_SUBDATA
))
==
F_DUPDATA
)
{
if
(
m3
->
mc_xcursor
->
mx_cursor
.
mc_flags
&
C_INITIALIZED
)
m3
->
mc_xcursor
->
mx_cursor
.
mc_pg
[
0
]
=
NODEDATA
(
node
);
else
if
(
node
->
mn_flags
&
F_DUPDATA
)
{
if
(
m3
->
mc_xcursor
->
mx_cursor
.
mc_flags
&
C_INITIALIZED
)
{
if
(
!
(
node
->
mn_flags
&
F_SUBDATA
))
m3
->
mc_xcursor
->
mx_cursor
.
mc_pg
[
0
]
=
NODEDATA
(
node
);
}
else
mdb_xcursor_init1
(
m3
,
node
);
}
}
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment