summaryrefslogtreecommitdiff
path: root/storage/heap
diff options
context:
space:
mode:
authorunknown <sanja@montyprogram.com>2012-10-02 12:53:20 +0300
committerunknown <sanja@montyprogram.com>2012-10-02 12:53:20 +0300
commit82eb2c6de05787cda48745bcf4225be7b5a9870e (patch)
tree8166ed4e2fbd438a4f8c67fed4ca7b84ef7a70a1 /storage/heap
parent807f537f328c284cd2834e8a860f39f516474ff6 (diff)
downloadmariadb-git-82eb2c6de05787cda48745bcf4225be7b5a9870e.tar.gz
fixed MDEV-568: Wrong result for a hash index look-up if the index is unique and the key is NULL
Check ability of index to be NULL as it made in MyISAM. UNIQUE with NULL could have several NULL entries so we have to continue even if ve have found a row.
Diffstat (limited to 'storage/heap')
-rw-r--r--storage/heap/hp_rkey.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/storage/heap/hp_rkey.c b/storage/heap/hp_rkey.c
index 27d1114770e..3069b955844 100644
--- a/storage/heap/hp_rkey.c
+++ b/storage/heap/hp_rkey.c
@@ -63,7 +63,7 @@ int heap_rkey(HP_INFO *info, uchar *record, int inx, const uchar *key,
info->update= 0;
DBUG_RETURN(my_errno);
}
- if (!(keyinfo->flag & HA_NOSAME))
+ if ((keyinfo->flag & (HA_NOSAME | HA_NULL_PART_KEY)) != HA_NOSAME)
memcpy(info->lastkey, key, (size_t) keyinfo->length);
}
memcpy(record, pos, (size_t) share->reclength);