aboutsummaryrefslogtreecommitdiff
path: root/src/util/db2/btree/bt_split.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/db2/btree/bt_split.c')
-rw-r--r--src/util/db2/btree/bt_split.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/util/db2/btree/bt_split.c b/src/util/db2/btree/bt_split.c
index 0fc95ba..0cc6cf0 100644
--- a/src/util/db2/btree/bt_split.c
+++ b/src/util/db2/btree/bt_split.c
@@ -673,7 +673,8 @@ bt_psplit(t, h, l, r, pskip, ilen)
* where we decide to try and copy too much onto the left page.
* Make sure that doesn't happen.
*/
- if (skip <= off && used + nbytes >= full || nxt == top - 1) {
+ if ((skip <= off && used + nbytes + sizeof(indx_t) >= full)
+ || nxt == top - 1) {
--off;
break;
}
@@ -686,7 +687,7 @@ bt_psplit(t, h, l, r, pskip, ilen)
memmove((char *)l + l->upper, src, nbytes);
}
- used += nbytes;
+ used += nbytes + sizeof(indx_t);
if (used >= half) {
if (!isbigkey || bigkeycnt == 3)
break;