|
|
@ -1230,7 +1230,6 @@ struct MDB_cursor { |
|
|
|
#define C_EOF 0x02 /**< No more data */ |
|
|
|
#define C_EOF 0x02 /**< No more data */ |
|
|
|
#define C_SUB 0x04 /**< Cursor is a sub-cursor */ |
|
|
|
#define C_SUB 0x04 /**< Cursor is a sub-cursor */ |
|
|
|
#define C_DEL 0x08 /**< last op was a cursor_del */ |
|
|
|
#define C_DEL 0x08 /**< last op was a cursor_del */ |
|
|
|
#define C_SPLITTING 0x20 /**< Cursor is in page_split */ |
|
|
|
|
|
|
|
#define C_UNTRACK 0x40 /**< Un-track cursor when closing */ |
|
|
|
#define C_UNTRACK 0x40 /**< Un-track cursor when closing */ |
|
|
|
/** @} */ |
|
|
|
/** @} */ |
|
|
|
unsigned int mc_flags; /**< @ref mdb_cursor */ |
|
|
|
unsigned int mc_flags; /**< @ref mdb_cursor */ |
|
|
@ -8435,7 +8434,6 @@ mdb_page_split(MDB_cursor *mc, MDB_val *newkey, MDB_val *newdata, pgno_t newpgno |
|
|
|
DPRINTF(("parent branch page is %"Z"u", mc->mc_pg[ptop]->mp_pgno)); |
|
|
|
DPRINTF(("parent branch page is %"Z"u", mc->mc_pg[ptop]->mp_pgno)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
mc->mc_flags |= C_SPLITTING; |
|
|
|
|
|
|
|
mdb_cursor_copy(mc, &mn); |
|
|
|
mdb_cursor_copy(mc, &mn); |
|
|
|
mn.mc_pg[mn.mc_top] = rp; |
|
|
|
mn.mc_pg[mn.mc_top] = rp; |
|
|
|
mn.mc_ki[ptop] = mc->mc_ki[ptop]+1; |
|
|
|
mn.mc_ki[ptop] = mc->mc_ki[ptop]+1; |
|
|
@ -8615,7 +8613,6 @@ mdb_page_split(MDB_cursor *mc, MDB_val *newkey, MDB_val *newdata, pgno_t newpgno |
|
|
|
rc = mdb_node_add(&mn, mn.mc_ki[ptop], &sepkey, NULL, rp->mp_pgno, 0); |
|
|
|
rc = mdb_node_add(&mn, mn.mc_ki[ptop], &sepkey, NULL, rp->mp_pgno, 0); |
|
|
|
mn.mc_top++; |
|
|
|
mn.mc_top++; |
|
|
|
} |
|
|
|
} |
|
|
|
mc->mc_flags ^= C_SPLITTING; |
|
|
|
|
|
|
|
if (rc != MDB_SUCCESS) { |
|
|
|
if (rc != MDB_SUCCESS) { |
|
|
|
goto done; |
|
|
|
goto done; |
|
|
|
} |
|
|
|
} |
|
|
@ -8736,8 +8733,6 @@ mdb_page_split(MDB_cursor *mc, MDB_val *newkey, MDB_val *newdata, pgno_t newpgno |
|
|
|
m3->mc_snum++; |
|
|
|
m3->mc_snum++; |
|
|
|
m3->mc_top++; |
|
|
|
m3->mc_top++; |
|
|
|
} |
|
|
|
} |
|
|
|
if (m3->mc_flags & C_SPLITTING) |
|
|
|
|
|
|
|
continue; |
|
|
|
|
|
|
|
if (m3->mc_top >= mc->mc_top && m3->mc_pg[mc->mc_top] == mp) { |
|
|
|
if (m3->mc_top >= mc->mc_top && m3->mc_pg[mc->mc_top] == mp) { |
|
|
|
if (m3->mc_ki[mc->mc_top] >= newindx && !(nflags & MDB_SPLIT_REPLACE)) |
|
|
|
if (m3->mc_ki[mc->mc_top] >= newindx && !(nflags & MDB_SPLIT_REPLACE)) |
|
|
|
m3->mc_ki[mc->mc_top]++; |
|
|
|
m3->mc_ki[mc->mc_top]++; |
|
|
|