22 #include <drizzled/error_t.h>
23 #include "heap_priv.h"
25 using namespace drizzled;
27 static void hp_clear_keys(
HP_SHARE *info);
31 hp_clear(info->getShare());
36 hp_clear_dataspace(&info->recordspace);
58 static void hp_clear_keys(
HP_SHARE *info)
60 for (uint32_t key=0 ; key < info->keys ; key++)
66 hp_free_level(block,block->levels,block->root,(
unsigned char*) 0);
68 block->last_allocated=0;
69 keyinfo->hash_buckets= 0;
90 int heap_disable_indexes(
HP_INFO *info)
97 share->currently_disabled_keys= share->keys;
123 int heap_enable_indexes(
HP_INFO *info)
128 if (share->recordspace.total_data_length || share->index_length)
129 error= HA_ERR_CRASHED;
131 if (share->currently_disabled_keys)
133 share->keys= share->currently_disabled_keys;
134 share->currently_disabled_keys= 0;
156 int heap_indexes_are_disabled(
HP_INFO *info)
160 return (! share->keys && share->currently_disabled_keys);