summaryrefslogtreecommitdiff
path: root/mysys/hash.c
diff options
context:
space:
mode:
authormonty@hundin.mysql.fi <>2001-12-05 13:03:00 +0200
committermonty@hundin.mysql.fi <>2001-12-05 13:03:00 +0200
commit1de4fff5ba80982cbed3a524488528c83ed8f945 (patch)
tree739c2cfffa69408c6460ba4c419a59d5b594cbb1 /mysys/hash.c
parent1d26537da53fee228b2f9d974d4806a06b76e33e (diff)
downloadmariadb-git-1de4fff5ba80982cbed3a524488528c83ed8f945.tar.gz
Update of query cache code.
Changed some sql_alloc() -> thd->alloc() Removed a lot of compiler warnings on Linux Alpha (64 bit) Fixed some core dumps on 64 bit systems (wrong type for packet_len)
Diffstat (limited to 'mysys/hash.c')
-rw-r--r--mysys/hash.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mysys/hash.c b/mysys/hash.c
index acb5a9b4310..7129b62ba89 100644
--- a/mysys/hash.c
+++ b/mysys/hash.c
@@ -583,7 +583,8 @@ byte *hash_element(HASH *hash,uint idx)
void hash_replace(HASH *hash, uint idx, byte *new_row)
{
- dynamic_element(&hash->array,idx,HASH_LINK*)->data=new_row;
+ if (idx != NO_RECORD) /* Safety */
+ dynamic_element(&hash->array,idx,HASH_LINK*)->data=new_row;
}