[pkg-db-devel] Bug#639421: libdb5.1: silently creates btree database when hash is requested
brian m. carlson
sandals at crustytoothpaste.net
Sat Aug 27 01:43:56 UTC 2011
Package: libdb5.1
Version: 5.1.25-11
Severity: important
Berkeley DB creates a btree database even though hash is requested, and
moreover, it does so silently.
Steps to reproduce:
* gcc foo.c -ldb
* rm -fr /tmp/db
* ./a.out /tmp/db
* db5.1_stat -d /tmp/db/openpgp | grep Btree
The last command should say nothing, but instead it prints information
about the database. file concurs that this is a btree database, not a
hash database, even though the DB->open call clearly specifies DB_HASH.
Berkeley DB is not only not creating a hash database, it's silently
accepting a btree database for opening with DB_HASH when it's documented
to fail in that case.
My particular use case is a very large (~700 MB) database that I have
reason to believe will perform much better with hash than with btree.
-- System Information:
Debian Release: wheezy/sid
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 3.0.0-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages libdb5.1 depends on:
ii libc6 2.13-18 Embedded GNU C Library: Shared lib
ii multiarch-support 2.13-18 Transitional package to ensure mul
libdb5.1 recommends no packages.
libdb5.1 suggests no packages.
-- no debconf information
--
brian m. carlson / brian with sandals: Houston, Texas, US
+1 832 623 2791 | http://www.crustytoothpaste.net/~bmc | My opinion only
OpenPGP: RSA v4 4096b: 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187
-------------- next part --------------
A non-text attachment was scrubbed...
Name: foo.c
Type: text/x-csrc
Size: 568 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-db-devel/attachments/20110827/f662bff2/attachment.c>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-db-devel/attachments/20110827/f662bff2/attachment.pgp>
More information about the pkg-db-devel
mailing list