~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/heap/ha_heap.cc

  • Committer: Brian Aker
  • Date: 2008-11-18 23:19:19 UTC
  • mfrom: (584.1.16 devel)
  • Revision ID: brian@tangent.org-20081118231919-w9sr347dtiwhccml
Merge of Monty's work.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
#include "ha_heap.h"
19
19
#include "heapdef.h"
20
20
#include <drizzled/error.h>
 
21
#include <drizzled/table.h>
 
22
#include <drizzled/session.h>
21
23
 
22
24
static handler *heap_create_handler(handlerton *hton,
23
25
                                    TABLE_SHARE *table, 
24
26
                                    MEM_ROOT *mem_root);
25
27
 
26
 
int heap_deinit(void *p __attribute__((unused)))
27
 
            
 
28
int heap_deinit(void *)
28
29
{
29
30
  return hp_panic(HA_PANIC_CLOSE);
30
31
}
149
150
}
150
151
 
151
152
 
 
153
const char *ha_heap::index_type(uint32_t inx)
 
154
{
 
155
  return ((table_share->key_info[inx].algorithm == HA_KEY_ALG_BTREE) ?
 
156
          "BTREE" : "HASH");
 
157
}
 
158
 
 
159
 
 
160
uint32_t ha_heap::index_flags(uint32_t inx, uint32_t, bool) const
 
161
{
 
162
  return ((table_share->key_info[inx].algorithm == HA_KEY_ALG_BTREE) ?
 
163
          HA_READ_NEXT | HA_READ_PREV | HA_READ_ORDER | HA_READ_RANGE :
 
164
          HA_ONLY_WHOLE_INDEX | HA_KEY_SCAN_NOT_ROR);
 
165
}
 
166
 
 
167
 
152
168
/*
153
169
  Compute which keys to use for scanning
154
170