don't add overflow pages to pages that already have overflow pages
[unix-history] / usr / src / lib / libc / db / hash / hash_page.c
index 6b3a613..68c8051 100644 (file)
@@ -9,7 +9,7 @@
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)hash_page.c        5.18 (Berkeley) %G%";
+static char sccsid[] = "@(#)hash_page.c        5.19 (Berkeley) %G%";
 #endif /* LIBC_SCCS and not lint */
 
 /*
 #endif /* LIBC_SCCS and not lint */
 
 /*
@@ -372,7 +372,7 @@ __addel(bufp, key, val)
        do_expand = 0;
        while (bp[0] && (bp[bp[0]] < REAL_KEY))
                /* Exception case */
        do_expand = 0;
        while (bp[0] && (bp[bp[0]] < REAL_KEY))
                /* Exception case */
-               if (bp[2] < REAL_KEY) {
+               if (bp[2] < REAL_KEY && bp[bp[0]] != OVFLPAGE) {
                        /* This is a big-keydata pair */
                        bufp = __add_ovflpage(bufp);
                        if (!bufp)
                        /* This is a big-keydata pair */
                        bufp = __add_ovflpage(bufp);
                        if (!bufp)