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