libc/db: Sync with FreeBSD
authorPeter Avalos <pavalos@dragonflybsd.org>
Sun, 2 Jun 2013 14:22:33 +0000 (07:22 -0700)
committerPeter Avalos <pavalos@dragonflybsd.org>
Wed, 31 Jul 2013 01:13:56 +0000 (18:13 -0700)
commitabd448c3b2d3508465e48d9cfdb163ef88fc242e
tree65fa9a466f07d6b0894fcbb88ab75ca7d2c14765
parent8dae8275578e4b66d0a80a386fe15ecaefacc8ac
libc/db: Sync with FreeBSD

- libc/db/hash: cap auto-tuned block size with a value that actually
  works
- Consider flag == 0 as the same of flag == R_NEXT
- Minor changes from Berkeley DB 1.86 and further improvements from
  OpenBSD
- Allow O_SYNC and O_NOFOLLOW flags in dbopen()
- Plug memory leaks and a potential NULL dereference
- Simplify the logic when determining whether to zero out a db file to
  after open().
- When deleting a big key, the offset of an empty page should be bsize,
  not bsize-1
- Avoid overwriting the cursor page when the cursor page becomes the LRU
  page.
- Fix for sequential retrieval failure when using large key/data pairs.
- Fix a crash when iterating over a hash and removing its elements.
- Only squeeze a short key/value pair onto a page with other complete
  key/value pairs
- Return meaningful errno in overflow case
- Save errno before calling _close(), which may clear it
- Explicitly specify bit width for on-disk data structure.

Obtained-from:   FreeBSD
66 files changed:
include/db.h
include/mpool.h
include/ndbm.h
lib/libc/db/README
lib/libc/db/btree/Makefile.inc
lib/libc/db/btree/bt_close.c
lib/libc/db/btree/bt_conv.c
lib/libc/db/btree/bt_debug.c
lib/libc/db/btree/bt_delete.c
lib/libc/db/btree/bt_get.c
lib/libc/db/btree/bt_open.c
lib/libc/db/btree/bt_overflow.c
lib/libc/db/btree/bt_page.c
lib/libc/db/btree/bt_put.c
lib/libc/db/btree/bt_search.c
lib/libc/db/btree/bt_seq.c
lib/libc/db/btree/bt_split.c
lib/libc/db/btree/bt_utils.c
lib/libc/db/btree/btree.h
lib/libc/db/btree/extern.h
lib/libc/db/db/Makefile.inc
lib/libc/db/db/db.c
lib/libc/db/docs/hash.usenix.ps
lib/libc/db/docs/libtp.usenix.ps
lib/libc/db/hash/Makefile.inc
lib/libc/db/hash/README
lib/libc/db/hash/extern.h
lib/libc/db/hash/hash.c
lib/libc/db/hash/hash.h
lib/libc/db/hash/hash_bigkey.c
lib/libc/db/hash/hash_buf.c
lib/libc/db/hash/hash_func.c
lib/libc/db/hash/hash_log2.c
lib/libc/db/hash/hash_page.c
lib/libc/db/hash/ndbm.c
lib/libc/db/hash/page.h
lib/libc/db/man/btree.3
lib/libc/db/man/dbm.3
lib/libc/db/man/dbopen.3
lib/libc/db/man/hash.3
lib/libc/db/man/mpool.3
lib/libc/db/man/recno.3
lib/libc/db/mpool/mpool.c
lib/libc/db/mpool/mpool.libtp
lib/libc/db/recno/Makefile.inc
lib/libc/db/recno/extern.h
lib/libc/db/recno/rec_close.c
lib/libc/db/recno/rec_delete.c
lib/libc/db/recno/rec_get.c
lib/libc/db/recno/rec_open.c
lib/libc/db/recno/rec_put.c
lib/libc/db/recno/rec_search.c
lib/libc/db/recno/rec_seq.c
lib/libc/db/recno/rec_utils.c
lib/libc/db/recno/recno.h
lib/libc/db/test/Makefile
lib/libc/db/test/btree.tests/main.c
lib/libc/db/test/dbtest.c
lib/libc/db/test/hash.tests/driver2.c
lib/libc/db/test/hash.tests/tcreat3.c
lib/libc/db/test/hash.tests/tdel.c
lib/libc/db/test/hash.tests/thash4.c
lib/libc/db/test/hash.tests/tread2.c
lib/libc/db/test/hash.tests/tseq.c
lib/libc/db/test/hash.tests/tverify.c
sys/sys/param.h