e4ffad
*** btree/bt_split.c.orig	Sat Feb  8 10:14:10 1997
e4ffad
--- btree/bt_split.c	Sat Feb  8 10:14:51 1997
e4ffad
***************
e4ffad
*** 673,679 ****
e4ffad
  		 * where we decide to try and copy too much onto the left page.
e4ffad
  		 * Make sure that doesn't happen.
e4ffad
  		 */
e4ffad
! 		if (skip <= off && used + nbytes >= full || nxt == top - 1) {
e4ffad
  			--off;
e4ffad
  			break;
e4ffad
  		}
e4ffad
--- 673,680 ----
e4ffad
  		 * where we decide to try and copy too much onto the left page.
e4ffad
  		 * Make sure that doesn't happen.
e4ffad
  		 */
e4ffad
! 		if (skip <= off &&
e4ffad
! 		    used + nbytes + sizeof(indx_t) >= full || nxt == top - 1) {
e4ffad
  			--off;
e4ffad
  			break;
e4ffad
  		}
e4ffad
***************
e4ffad
*** 686,692 ****
e4ffad
  			memmove((char *)l + l->upper, src, nbytes);
e4ffad
  		}
e4ffad
  
e4ffad
! 		used += nbytes;
e4ffad
  		if (used >= half) {
e4ffad
  			if (!isbigkey || bigkeycnt == 3)
e4ffad
  				break;
e4ffad
--- 687,693 ----
e4ffad
  			memmove((char *)l + l->upper, src, nbytes);
e4ffad
  		}
e4ffad
  
e4ffad
! 		used += nbytes + sizeof(indx_t);
e4ffad
  		if (used >= half) {
e4ffad
  			if (!isbigkey || bigkeycnt == 3)
e4ffad
  				break;