summaryrefslogtreecommitdiffstats
path: root/lib/libc/db
Commit message (Collapse)AuthorAgeFilesLines
* Globally replace u_int*_t from (non-contributed) man pages.ed2012-02-121-1/+1
| | | | | | | | | | | The reasoning behind this, is that if we are consistent in our documentation about the uint*_t stuff, people will be less tempted to write new code that uses the non-standard types. I am not going to bump the man page dates, as these changes can be considered style nits. The meaning of the man pages is unaffected. MFC after: 1 month
* Fix clang warnings.benl2011-06-181-3/+4
| | | | Approved by: philip (mentor)
* The flags argument of mpool_get() is meaningful, document it.delphij2011-06-181-2/+9
| | | | MFC after: 2 weeks
* Bump dates in dbopen(3) and cpuset_getaffinity(2) from r212441 andgjb2010-09-121-1/+1
| | | | | | | r212438, repectively. Approved by: keramida (mentor) MFC after: 1 week
* Note O_SYNC and O_NOFOLLOW flags in dbopen(3) since r190497.gjb2010-09-101-2/+2
| | | | | | | | PR: 150030 Submitted by: Janne Snabb snabb at epipe com Patch by: Janne Snabb Approved by: keramida (mentor) MFC after: 1 week
* libc/db/hash: cap auto-tuned block size with a value that actually worksavg2010-04-052-1/+3
| | | | | | | | | | | | | This fix mostly matters after r206129 that made it possible for st_blksize to be greater than 4K. For this reason, this change should be MFC-ed before r206129. Also, it seems that all FreeBSD uitlities that use db(3) hash databases and create new databases in files, specify their own block size value and thus do not depend on block size autotuning. PR: bin/144446 Submitted by: Peter Jeremy <peterjeremy@acm.org> MFC after: 5 days
* hash.3: fix a factual mistake in the man pageavg2010-04-051-1/+1
| | | | | | PR: bin/144446 Submitted by: Peter Jeremy <peterjeremy@acm.org> MFC after: 3 days
* Consider flag == 0 as the same of flag == R_NEXT. This change will restoredelphij2009-08-241-2/+2
| | | | | a historical behavior that has been changed by revision 190491, and has seen to break exim.
* Update SCCS IDs for Berkeley DB 1.86 merge.delphij2009-06-242-2/+2
|
* style: operators should appear at the line end if we have to wrap.delphij2009-06-241-2/+2
|
* Add some casts to silence compiler warning about signedness.delphij2009-03-282-3/+3
|
* Minor changes from Berkeley DB 1.86 and further improvements from OpenBSD.delphij2009-03-2810-115/+214
| | | | | | | | | | This does not include the new hash routines since they will cause problems when reading old hash files. Since mpool(3) has been changed, provide a compatibility shim for older binaries. Obtained from: OpenBSD
* Allow O_SYNC and O_NOFOLLOW flags in dbopen().delphij2009-03-281-2/+2
| | | | Obtained from: OpenBSD
* Plug memory leaks and a potential NULL dereference.delphij2009-03-281-4/+12
| | | | Obtained from: OpenBSD
* Simplify the logic when determining whether to zero out a db file to afterdelphij2009-03-281-15/+5
| | | | | | | | open(). The previous logic only initializes the database when O_CREAT is set, but as long as we can open and write the database, and the database is empty, we should initialize it anyway. Obtained from: OpenBSD
* - If (keysize+datasize)%(bsize=14)==0, insertion of a `big key' would causedelphij2009-03-281-6/+18
| | | | | | | | | | | | | | | an invariant (actually, an ugly hack) to fail, and all Hell would break loose. When deleting a big key, the offset of an empty page should be bsize, not bsize-1; otherwise an insertion into the empty page will cause the new key to be elongated by 1 byte. Make the packing more dense in a couple of cases. - fix NULL dereference exposed on big bsize values; Obtained from: NetBSD via OpenBSD
* Avoid NULL deference which causes DEBUG1 to crash, not to print usefuldelphij2009-03-281-1/+1
| | | | | | information. Obtained from: OpenBSD
* - Avoid overwriting the cursor page when the cursor page becomes thedelphij2009-03-281-1/+21
| | | | | | | LRU page. - Fix for sequential retrieval failure when using large key/data pairs. Obtained from: OpenBSD
* Fix a crash when iterating over a hash and removing its elements.delphij2009-03-282-11/+21
| | | | Obtained from: OpenBSD
* Only squeeze a short key/value pair onto a page with other complete key/valuedelphij2009-03-281-3/+9
| | | | | | pairs, not onto a page containing the end of a big pair. Obtained from: NetBSD via OpenBSD
* Diff reduce against OpenBSD, no functional change.delphij2009-03-282-12/+6
|
* Return meaningful errno in overflow case; print error message to stderrdelphij2009-03-281-1/+7
| | | | | | in one more case. Obtained from: NetBSD via OpenBSD
* Use pread(2) and pwrite(2) instead of lseek(2) + read(2) / write(2).delphij2009-03-282-6/+3
| | | | Obtained from: NetBSD via OpenBSD
* db/btree/bt_open.c: check return value of snprintf() and return valuedelphij2009-03-282-6/+21
| | | | | | | | | if the result is truncated. db/hash/hash_page.c: use the same way to create temporary file as bt_open.c; check snprintf() return value. Obtained from: OpenBSD
* Several signed/unsigned warning fixes.delphij2009-03-288-16/+18
|
* When allocating memory, zero out them if we don't intend to overwrite themdelphij2009-03-285-28/+11
| | | | | | | | | | | | all; before freeing memory, zero out them before we release it as free heap. This will eliminate some potential information leak issue. While there, remove the PURIFY option. There is a slight difference between the new behavior and the old -DPURIFY behavior, with the latter initializes memory with 0xff's. The difference between old and new approach does not generate observable difference. Obtained from: OpenBSD (partly).
* Save errno before calling _close(), which may clear it.delphij2009-03-231-2/+4
| | | | Obtained from: OpenBSD
* use more proper format string.delphij2009-03-232-11/+11
| | | | Obtained from: NetBSD via OpenBSD
* Our realloc(3) and reallocf(3) can handle NULL, which turns it into adelphij2009-03-054-21/+8
| | | | | | malloc(3) call, so don't test if a pointer is NULL. Obtained from: OpenBSD (in spirit)
* Explicitly specify bit width for on-disk data structure.delphij2009-03-041-17/+17
| | | | Obtained from: OpenBSD
* Style changes (including additional casts to shut up warnings). Thisdelphij2009-03-0415-36/+35
| | | | commit does not affect MD5 of object file.
* Rename variable 'index' to 'idx' to avoid name collision with index(3),delphij2009-03-037-101/+87
| | | | | | | this commit does not affect any object code. Obtained from: OpenBSD Verified with: md5(1)
* Diff reduction against OpenBSD: ANSI'fy prototypes.delphij2009-03-0228-485/+196
| | | | | | | | (This is part of a larger changeset which is intended to reduce diff only, thus some prototypes were left intact since they will be changed in the future). Verified with: md5(1)
* - Remove superfluous commentgabor2009-01-301-2/+0
| | | | | PR: docs/129400 Submitted by: Gavin Atkinson <gavin@freebsd.org>
* getopt(3) returns -1, not EOF.kevlo2008-02-182-2/+2
|
* The usage of "info" in init_hash() is read-only, so constifydelphij2007-05-251-3/+3
| | | | | the internal interface instead of casting away the constant constraint upon calling.
* Use C comments since we now preprocess these files with CPP.deischen2007-04-291-2/+4
|
* Per Regents of the University of Calfornia letter, remove advertisingimp2007-01-0951-204/+0
| | | | | | clause. # If I've done so improperly on a file, please let me know.
* o dbm_close(3) returns void not zero or anything else. Touch .Dd.maxim2006-04-161-5/+1
| | | | | | PR: docs/80070 Submitted by: Aleksej Saushev MFC after: 2 weeks
* Add each directory's symbol map file to SYM_MAPS.deischen2006-03-131-0/+2
|
* Add symbol maps and initial symbol version definitions to libc.deischen2006-03-131-0/+30
| | | | Reviewed by: davidxu
* Fix parameter types of close and get members in DB.stefanf2005-09-101-2/+2
|
* Expand *n't contractions.ru2005-02-132-3/+3
|
* Fix a condition where the hole would be inserted in the wrongkuriyama2004-09-131-4/+2
| | | | | | place during a split. Obtained from: NetBSD
* I found "portsdb -u" dumps core with recent INDEX file, and this iskuriyama2004-09-101-0/+2
| | | | | | | | | | | | | | | caused by refering broken (uninitialized?) pointer which is retrieved from __bt_new() (and from mpool_new()). I don't know why this linp[0] is read before stored because this should be controlled by .lower and .upper member of PAGE structure which are correctly initialized. But this workaround fixes the problem on my environment and this module has #ifdef PURIFY option which initializes new and reused memory from mpool by memset(p, 0xff, size) like as I did. Please feel free to fix the real bug instead of my workaround.
* Fix format strings to unbreak with -DDEBUG option.kuriyama2004-09-103-17/+18
|
* Remove the misleading description of the 'key' argument toroam2004-08-271-17/+1
| | | | | | | | | mpool_open(3) - it is *not* really used for synchronization; in fact, it is not used at all. PR: 70929 Submitted by: Martin Kammerhofer <dada@sbox.tugraz.at> MFC after: 3 days
* Mechanically kill hard sentence breaks.ru2004-07-023-4/+4
|
* Simplify mpool_get() and mpool_write() by using pread() and pwrite()das2004-01-201-6/+3
| | | | | | | instead of lseek()/_read() and lseek()/_write(). PR: bin/54276 Submitted by: <dnelson@allantgroup.com>
* mdoc(7): Use the new feature of the .In macro.ru2003-09-085-7/+7
|
OpenPOWER on IntegriCloud