From 7a013339f84c48ea6194a35d9c00d0d549466b1d Mon Sep 17 00:00:00 2001 From: "monty@tik.mysql.com" <> Date: Mon, 13 Nov 2000 23:55:10 +0200 Subject: Bug fixes, TRUNCATE, safer passwords on command line and connect timeout --- mysys/hash.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'mysys/hash.c') diff --git a/mysys/hash.c b/mysys/hash.c index a6181443a42..9c6497c7717 100644 --- a/mysys/hash.c +++ b/mysys/hash.c @@ -374,10 +374,11 @@ my_bool hash_delete(HASH *hash,byte *record) uint blength,pos2,pos_hashnr,lastpos_hashnr,idx,empty_index; HASH_LINK *data,*lastpos,*gpos,*pos,*pos3,*empty; DBUG_ENTER("hash_delete"); + if (!hash->records) + DBUG_RETURN(1); blength=hash->blength; data=dynamic_element(&hash->array,0,HASH_LINK*); - /* Search after record with key */ pos=data+ hash_mask(rec_hashnr(hash,record),blength,hash->records); gpos = 0; -- cgit v1.2.1