diff options
author | sasha@mysql.sashanet.com <> | 2000-11-15 18:58:59 -0700 |
---|---|---|
committer | sasha@mysql.sashanet.com <> | 2000-11-15 18:58:59 -0700 |
commit | eb0a423e0ea8cefa04719226923755aa4bb8a961 (patch) | |
tree | d78befdf5251596d35567b37ed5edb3edae3f8bd /mysys/hash.c | |
parent | 5faab668f7996ae58f645a2b563f5c290d37b76c (diff) | |
parent | a9097ca323bf399c5fc45d94a9b121c304f7681e (diff) | |
download | mariadb-git-eb0a423e0ea8cefa04719226923755aa4bb8a961.tar.gz |
merged
Diffstat (limited to 'mysys/hash.c')
-rw-r--r-- | mysys/hash.c | 3 |
1 files changed, 2 insertions, 1 deletions
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; |