diff options
Diffstat (limited to 'sql/ha_heap.h')
-rw-r--r-- | sql/ha_heap.h | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/sql/ha_heap.h b/sql/ha_heap.h index c8f29dea53c..aa675cfffea 100644 --- a/sql/ha_heap.h +++ b/sql/ha_heap.h @@ -31,12 +31,24 @@ class ha_heap: public handler ha_heap(TABLE *table): handler(table), file(0) {} ~ha_heap() {} const char *table_type() const { return "HEAP"; } - const char *index_type(uint key_number) { return "HASH"; } + const char *index_type(uint inx) + { + return ((table->key_info[inx].algorithm == HA_KEY_ALG_BTREE) ? "BTREE" : + "HASH"); + } const char **bas_ext() const; - ulong option_flag() const - { return (HA_READ_RND_SAME | HA_NO_INDEX | HA_ONLY_WHOLE_INDEX | - HA_WRONG_ASCII_ORDER | HA_KEYPOS_TO_RNDPOS | HA_NO_BLOBS | - HA_NULL_KEY | HA_REC_NOT_IN_SEQ | HA_NOT_READ_PREFIX_LAST); } + ulong table_flags() const + { + return (HA_READ_RND_SAME | HA_NO_INDEX | HA_KEYPOS_TO_RNDPOS | + HA_NO_BLOBS | HA_NULL_KEY | HA_REC_NOT_IN_SEQ | + HA_NOT_READ_PREFIX_LAST | HA_NO_AUTO_INCREMENT); + } + ulong index_flags(uint inx) const + { + return ((table->key_info[inx].algorithm == HA_KEY_ALG_BTREE) ? + (HA_READ_NEXT | HA_READ_PREV | HA_READ_ORDER) : + (HA_ONLY_WHOLE_INDEX | HA_WRONG_ASCII_ORDER)); + } uint max_record_length() const { return HA_MAX_REC_LENGTH; } uint max_keys() const { return MAX_KEY; } uint max_key_parts() const { return MAX_REF_PARTS; } |