summaryrefslogtreecommitdiff
path: root/storage/heap
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2014-10-09 10:30:11 +0200
committerSergei Golubchik <sergii@pisem.net>2014-10-09 10:30:11 +0200
commit1b75bed00fa4ea3925f513f4825deb00cb158d5b (patch)
tree0822ed2a2ca42ba1acb82a6737336bbfe219bebe /storage/heap
parent689ffe3559a4b7bacd13503ba93659b2f4560bbb (diff)
parentb2d71434ed24d0901155fe68b0b7ee4fdad0e2d4 (diff)
downloadmariadb-git-1b75bed00fa4ea3925f513f4825deb00cb158d5b.tar.gz
5.5.40+ merge
Diffstat (limited to 'storage/heap')
-rw-r--r--storage/heap/hp_hash.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/storage/heap/hp_hash.c b/storage/heap/hp_hash.c
index 993d3377b73..aba7e8383da 100644
--- a/storage/heap/hp_hash.c
+++ b/storage/heap/hp_hash.c
@@ -878,12 +878,17 @@ uint hp_rb_pack_key(HP_KEYDEF *keydef, uchar *key, const uchar *old,
/* Convert NULL from MySQL representation into HEAP's. */
if (!(*key++= (char) 1 - *old++))
{
+#if 0
/*
Skip length part of a variable length field.
Length of key-part used with heap_rkey() always 2.
See also hp_hashnr().
*/
if (seg->flag & (HA_VAR_LENGTH_PART | HA_BLOB_PART))
+#else
+ /* Add key pack length (2) to key for VARCHAR segments */
+ if (seg->type == HA_KEYTYPE_VARTEXT1)
+#endif
old+= 2;
continue;
}