mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-08 05:24:12 +08:00
mdbx: more asserts for page-type.
This commit is contained in:
parent
859f306c9f
commit
ecb0e268b0
@ -6841,6 +6841,7 @@ static int mdbx_page_search_root(MDBX_cursor *mc, MDBX_val *key, int flags) {
|
|||||||
* be underfilled. */
|
* be underfilled. */
|
||||||
static int mdbx_page_search_lowest(MDBX_cursor *mc) {
|
static int mdbx_page_search_lowest(MDBX_cursor *mc) {
|
||||||
MDBX_page *mp = mc->mc_pg[mc->mc_top];
|
MDBX_page *mp = mc->mc_pg[mc->mc_top];
|
||||||
|
mdbx_cassert(mc, IS_BRANCH(mp));
|
||||||
MDBX_node *node = NODEPTR(mp, 0);
|
MDBX_node *node = NODEPTR(mp, 0);
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
@ -7373,6 +7374,7 @@ static int mdbx_cursor_set(MDBX_cursor *mc, MDBX_val *key, MDBX_val *data,
|
|||||||
if (mc->mc_flags & C_INITIALIZED) {
|
if (mc->mc_flags & C_INITIALIZED) {
|
||||||
MDBX_val nodekey;
|
MDBX_val nodekey;
|
||||||
|
|
||||||
|
mdbx_cassert(mc, IS_LEAF(mc->mc_pg[mc->mc_top]));
|
||||||
mp = mc->mc_pg[mc->mc_top];
|
mp = mc->mc_pg[mc->mc_top];
|
||||||
if (!NUMKEYS(mp)) {
|
if (!NUMKEYS(mp)) {
|
||||||
mc->mc_ki[mc->mc_top] = 0;
|
mc->mc_ki[mc->mc_top] = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user