btree/bt_split.c: Apply patch.1.2: Check for last page in a condition.

"DB 1.85 core dumps on certain data sets when using the B+tree access
method."

http://download.oracle.com/berkeley-db/patches/db/1.85/patch.1.2
This commit is contained in:
Paul Sokolovsky 2016-06-15 01:14:31 +03:00
parent 6dc9d673a4
commit fe7294a119

View file

@ -673,7 +673,7 @@ bt_psplit(t, h, l, r, pskip, ilen)
* where we decide to try and copy too much onto the left page. * where we decide to try and copy too much onto the left page.
* Make sure that doesn't happen. * Make sure that doesn't happen.
*/ */
if (skip <= off && used + nbytes >= full) { if (skip <= off && used + nbytes >= full || nxt == top - 1) {
--off; --off;
break; break;
} }