diff options
| author | Tom Yu <tlyu@mit.edu> | 2008-02-07 07:07:06 +0000 |
|---|---|---|
| committer | Tom Yu <tlyu@mit.edu> | 2008-02-07 07:07:06 +0000 |
| commit | 010a7773a51edec7dc977340aec4bb92b0f9a721 (patch) | |
| tree | 9b673675ef191384a478c19cd03c45765bead0bf /src/plugins/kdb/db2/libdb2/mpool | |
| parent | b1d03de332d2f10e20a1f5a49cef77171749bd24 (diff) | |
| download | krb5-010a7773a51edec7dc977340aec4bb92b0f9a721.tar.gz krb5-010a7773a51edec7dc977340aec4bb92b0f9a721.tar.xz krb5-010a7773a51edec7dc977340aec4bb92b0f9a721.zip | |
more tests for libdb btree page split on zero index
Enhance btree debugging output somewhat to limit key printout to the
key length if the key is not null-terminated.
Add additional test case for the zero-index page split bug; test case
can create a corrupted btree database with records unreachable by
random access but reachable by sequential access. Requires
recompiling with CPPFLAGS='-DDEBUG -DDEBUG_IDX0SPLIT' to correctly
model mpool page reuse that would be present in production conditions.
(CPPFLAGS=-DDEBUG would otherwise explicitly overwrite the contents of
reused pages.)
ticket: new
target_version: 1.6.4
tags: pullup
component: krb5-kdc
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20222 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/plugins/kdb/db2/libdb2/mpool')
| -rw-r--r-- | src/plugins/kdb/db2/libdb2/mpool/mpool.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/kdb/db2/libdb2/mpool/mpool.c b/src/plugins/kdb/db2/libdb2/mpool/mpool.c index 56f2749a9..3b0be3f55 100644 --- a/src/plugins/kdb/db2/libdb2/mpool/mpool.c +++ b/src/plugins/kdb/db2/libdb2/mpool/mpool.c @@ -377,7 +377,7 @@ mpool_bkt(mp) head = &mp->hqh[HASHKEY(bp->pgno)]; CIRCLEQ_REMOVE(head, bp, hq); CIRCLEQ_REMOVE(&mp->lqh, bp, q); -#ifdef DEBUG +#if defined(DEBUG) && !defined(DEBUG_IDX0SPLIT) { void *spage; spage = bp->page; memset(bp, 0xff, sizeof(BKT) + mp->pagesize); |
