File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -5163,8 +5163,11 @@ mdb_cursor_pop(MDB_cursor *mc)
5163
5163
mc -> mc_pg [mc -> mc_top ]-> mp_pgno , DDBI (mc ), (void * ) mc ));
5164
5164
5165
5165
mc -> mc_snum -- ;
5166
- if (mc -> mc_snum )
5166
+ if (mc -> mc_snum ) {
5167
5167
mc -> mc_top -- ;
5168
+ } else {
5169
+ mc -> mc_flags &= ~C_INITIALIZED ;
5170
+ }
5168
5171
}
5169
5172
}
5170
5173
@@ -6820,6 +6823,7 @@ mdb_cursor_del(MDB_cursor *mc, unsigned int flags)
6820
6823
if (flags & MDB_NODUPDATA ) {
6821
6824
/* mdb_cursor_del0() will subtract the final entry */
6822
6825
mc -> mc_db -> md_entries -= mc -> mc_xcursor -> mx_db .md_entries - 1 ;
6826
+ mc -> mc_xcursor -> mx_cursor .mc_flags &= ~C_INITIALIZED ;
6823
6827
} else {
6824
6828
if (!F_ISSET (leaf -> mn_flags , F_SUBDATA )) {
6825
6829
mc -> mc_xcursor -> mx_cursor .mc_pg [0 ] = NODEDATA (leaf );
@@ -6857,6 +6861,8 @@ mdb_cursor_del(MDB_cursor *mc, unsigned int flags)
6857
6861
mc -> mc_db -> md_entries -- ;
6858
6862
mc -> mc_flags |= C_DEL ;
6859
6863
return rc ;
6864
+ } else {
6865
+ mc -> mc_xcursor -> mx_cursor .mc_flags &= ~C_INITIALIZED ;
6860
6866
}
6861
6867
/* otherwise fall thru and delete the sub-DB */
6862
6868
}
@@ -9646,6 +9652,7 @@ mdb_drop0(MDB_cursor *mc, int subs)
9646
9652
} else if (rc == MDB_NOTFOUND ) {
9647
9653
rc = MDB_SUCCESS ;
9648
9654
}
9655
+ mc -> mc_flags &= ~C_INITIALIZED ;
9649
9656
return rc ;
9650
9657
}
9651
9658
You can’t perform that action at this time.
0 commit comments