+Mon Nov 11 17:01:29 1996 Mark Eichin <eichin@cygnus.com>
+
+ * db2: overflow_page fixes, __P redef
+ * db2 tests: better alternate dictionary support
+
+ Tue Oct 8 22:55:01 1996 Mark W. Eichin <eichin@cygnus.com>
+
+ * hash/hash.h (DEF_BUCKET_SIZE, DEF_SEGSIZE): now derived from
+ DEF_BUCKET_SHIFT and DEF_SEGSIZE_SHIFT respectively, for
+ consistency.
+
+ Tue Oct 8 22:43:26 1996 Mark W. Eichin <eichin@cygnus.com>
+
+ * hash/hash_page.c (__add_ovflpage, __add_bigpage): overflow_page
+ can return a 0 indicating a failure -- callers must check it
+ instead of corrupting the database.
+ (overflow_page): document apparent error return.
+
+ Fri Aug 30 20:05:57 1996 Ken Raeburn <raeburn@cygnus.com>
+
+ * test/dictionary: New file, list of garbage words.
+ * test/run.test (main): Use it if no other dictionary can be
+ found. Set dictsize with size of dictionary.
+ (test12, test20): Skip if dictionary is too small.
+
Wed Aug 28 17:25:10 1996 Tom Yu <tlyu@mit.edu>
* configure.in: Add check for SIZEOF_INT.
#define MIN_BUFFERS 6
#define MINHDRSIZE 512
#define DEF_CACHESIZE 65536
-#define DEF_BUCKET_SIZE 4096
#define DEF_BUCKET_SHIFT 12 /* log2(BUCKET) */
-#define DEF_SEGSIZE 256
+#define DEF_BUCKET_SIZE (1<<DEF_BUCKET_SHIFT)
#define DEF_SEGSIZE_SHIFT 8 /* log2(SEGSIZE) */
+#define DEF_SEGSIZE (1<<DEF_SEGSIZE_SHIFT)
#define DEF_DIRSIZE 256
#define DEF_FFACTOR 65536
#define MIN_FFACTOR 4
hashp->hdr.ffactor = MIN_FFACTOR;
}
ovfl_num = overflow_page(hashp);
+ if (!ovfl_num)
+ return (NULL);
if (__new_page(hashp, (u_int32_t)ovfl_num, A_OVFL) != 0)
return (NULL);
u_int16_t ovfl_num;
ovfl_num = overflow_page(hashp);
+ if (!ovfl_num)
+ return (NULL);
if (__new_page(hashp, (u_int32_t)ovfl_num, A_OVFL) != 0)
return (NULL);
return (i);
}
+/*
+ * returns 0 on error
+ */
static u_int16_t
overflow_page(hashp)
HTAB *hashp;
/* deal with turning prototypes on and off */
+#ifndef __P
#if defined(__STDC__) || defined(__cplusplus)
#define __P(protos) protos /* full-blown ANSI C */
#else /* !(__STDC__ || __cplusplus) */
#define __P(protos) () /* traditional C preprocessor */
#endif
+#endif /* no __P from system */
/* Access method description structure. */
typedef struct __db {
--- /dev/null
+abintrme
+ablatweo
+agdbevea
+aglamber
+aicehayt
+alerover
+anadanth
+ancmirtt
+ancthada
+angcther
+antasikt
+arathmsm
+arescofa
+arthatea
+asallyth
+asathedl
+ascelass
+athaneal
+atheneri
+atheryit
+athiopep
+athysidc
+atyhtiti
+auletard
+aytthepr
+bedthesa
+beiofttw
+bemofrda
+bertedud
+bessdide
+bestiemb
+blllanof
+bllssunt
+blstther
+bttelthh
+bulyousi
+bupedire
+buseatsd
+butritat
+byeditam
+cedvecur
+censaith
+centhfro
+centitar
+ceourire
+cetheaso
+chancora
+chavengl
+chederas
+chemsywh
+civadayo
+ckedacag
+ckstiptr
+colither
+congchin
+corepppl
+cronoria
+cthilath
+cthouthe
+ctofowon
+cumetbry
+dbethere
+degeerin
+detherai
+dingthin
+dryslyse
+dscesild
+ealecerm
+edftserh
+efosondi
+eherrreg
+emidesja
+ereananm
+estersns
+etedtili
+evermerh
+falsuran
+faringsi
+fawerist
+fcedethe
+fedhessh
+fedlerca
+feupbori
+ffeedift
+fllbasia
+foftabll
+fomehage
+fotsenki
+fwisudls
+ggeuptha
+gswofryt
+hedcecou
+hereacun
+huvedpth
+iabengre
+ianfovin
+iaresice
+iasmived
+idengedi
+ilftisut
+ilinefem
+imeorran
+imsstoft
+inararto
+indanrei
+ingelaly
+ingeored
+inmotiom
+inoatlfr
+inoviler
+insedihe
+intaspan
+intowade
+inyfeprt
+iobloinc
+ionepuse
+iourofig
+ireeingi
+irreland
+irsfandb
+isewhell
+isocisad
+isriacth
+istaverr
+ithmblet
+itoingri
+itongala
+itsgrint
+ivyttisa
+laltthea
+lanesmef
+lanonepi
+lerithay
+lllmeris
+lysatspa
+lysceert
+masishio
+mathmmat
+meastrei
+medengny
+medwindb
+membonam
+moronash
+mpeotlin
+msomirei
+msrmstri
+mstirtis
+nbempeef
+ncheckno
+nddtthec
+ndilymor
+nditheiv
+ndoncath
+nenkingo
+ngryasth
+nichelnd
+nndarrof
+nongeatt
+noviearc
+npecheca
+nsttmema
+nwiowhan
+oalsaldt
+obullury
+odtenens
+offorind
+ofoditin
+ogarofab
+olossofe
+olspooth
+omajorul
+omantrvi
+omawevat
+onotorit
+oorendbe
+oosarang
+othowong
+otinffte
+ouatheno
+ountshep
+ouputope
+owhesatu
+owiaindh
+padisath
+pangream
+pawicofa
+pendamam
+pepofond
+peroncti
+perysege
+petotith
+plocarov
+pomasbor
+powholyi
+ppllosof
+pptinoma
+psenesff
+puiondit
+reestand
+rendlabl
+rerathsy
+rewathat
+rirndiff
+ritricui
+samasome
+satameer
+sathecur
+sbespral
+sconbeis
+sedfinhe
+sharveon
+shhoftrd
+sianthem
+sieaveve
+simedera
+sinandff
+sinulsma
+sllobofl
+sndfermh
+soffatic
+soingris
+songiorb
+sthottsa
+suewemat
+swicales
+tagttisf
+tanalatt
+tancodbo
+tarethal
+tbisesia
+teftyall
+tengstwh
+tepeshth
+teranand
+tevinohi
+tgthehal
+thansirs
+thecequs
+thereaco
+therimut
+therorea
+thestiom
+theveame
+thhastth
+thiasatt
+thidirve
+thingbaa
+thithbed
+thovires
+thswenpe
+thublthe
+tiamarss
+tincthes
+tindtofo
+tinedave
+tisanwex
+tlarnste
+tleicorb
+tnymesie
+toftemal
+tombeasw
+torarsen
+totheheo
+toudanty
+tremywel
+treonove
+trhandfy
+trrhmont
+trysnter
+tssasofo
+ttemaith
+ttiserds
+ttorissa
+tuiabeoi
+twirfton
+tyhentha
+tyngorti
+tyoarich
+ucatbouc
+ungyconh
+untinore
+uopsaren
+upecmuit
+ureaidrb
+usinittr
+ussofedt
+usunochp
+utbapofo
+veveplel
+vimathea
+walondui
+wavairet
+waysioft
+wceempil
+wealttig
+wefondio
+werdtian
+weswevar
+whaclthe
+wheanler
+wheiforv
+whisurtr
+whrithat
+wiesulci
+wirofrec
+witthile
+wtserodr
+ybutherr
DICT=/usr/dict/words
elif [ -f /usr/share/lib/dict/words ]; then
DICT=/usr/share/lib/dict/words
+ elif [ -f $srcdir/../test/dictionary ]; then
+ DICT=`cd $srcdir/../test && pwd`/dictionary
else
echo 'run.test: no dictionary'
exit 1
fi
+ dictsize=`wc -l < $DICT`
+
if [ $# -eq 0 ]; then
for t in 1 2 3 4 5 6 7 8 9 10 11 12 13 20; do
test$t
echo "Test 12: skipped, rev not found"
return
fi
+ if test $dictsize -lt 20001 ; then
+ echo "Test 12: skipped, dictionary too small"
+ return
+ else
+ :
+ fi
echo "Test 12: btree: lots of keys, small page size"
mdata=abcdefghijklmnopqrstuvwxy
echo $mdata |
# Try a variety of bucketsizes and fill factors for hashing
test20()
{
+ if test $dictsize -lt 10001 ; then
+ echo "Test 20: skipped, dictionary too small"
+ return
+ else
+ :
+ fi
echo\
"Test 20: hash: bucketsize, fill factor; nelem 25000 cachesize 65536"
echo "abcdefg abcdefg abcdefg abcdefg abcdefg abcdefg abcdefg" |