diff options
Diffstat (limited to 'heap/hp_create.c')
-rw-r--r-- | heap/hp_create.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/heap/hp_create.c b/heap/hp_create.c index 6c38d54cb12..40b8202d94f 100644 --- a/heap/hp_create.c +++ b/heap/hp_create.c @@ -55,6 +55,22 @@ int heap_create(const char *name, uint keys, HP_KEYDEF *keydef, if (keyinfo->algorithm == HA_KEY_ALG_BTREE) keyinfo->rb_tree.size_of_element++; } + switch (keyinfo->seg[j].type) { + case HA_KEYTYPE_SHORT_INT: + case HA_KEYTYPE_LONG_INT: + case HA_KEYTYPE_FLOAT: + case HA_KEYTYPE_DOUBLE: + case HA_KEYTYPE_USHORT_INT: + case HA_KEYTYPE_ULONG_INT: + case HA_KEYTYPE_LONGLONG: + case HA_KEYTYPE_ULONGLONG: + case HA_KEYTYPE_INT24: + case HA_KEYTYPE_UINT24: + case HA_KEYTYPE_INT8: + keyinfo->seg[j].flag|= HA_SWAP_KEY; + default: + break; + } } keyinfo->length= length; length+= keyinfo->rb_tree.size_of_element + |