~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/memory/hp_create.cc

  • Committer: Olaf van der Spek
  • Date: 2011-07-04 19:11:47 UTC
  • mto: This revision was merged to the branch mainline in revision 2367.
  • Revision ID: olafvdspek@gmail.com-20110704191147-s99ojek811zi1fzj
RemoveĀ unusedĀ Name_resolution_context::error_reporter

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA */
15
15
 
16
16
#include "heap_priv.h"
17
 
 
 
17
#include <drizzled/internal/my_sys.h>
18
18
#include <drizzled/common.h>
19
19
#include <drizzled/error.h>
20
20
 
27
27
static void init_block(HP_BLOCK *block,uint32_t chunk_length, uint32_t min_records,
28
28
                        uint32_t max_records);
29
29
 
30
 
#define FIXED_REC_OVERHEAD (sizeof(unsigned char))
31
 
#define VARIABLE_REC_OVERHEAD (sizeof(unsigned char**) + ALIGN_SIZE(sizeof(unsigned char)))
 
30
static const int FIXED_REC_OVERHEAD = (sizeof(unsigned char));
 
31
static const int VARIABLE_REC_OVERHEAD = (sizeof(unsigned char**) + ALIGN_SIZE(sizeof(unsigned char)));
32
32
 
33
33
/* Minimum size that a chunk can take, 12 bytes on 32bit, 24 bytes on 64bit */
34
 
#define VARIABLE_MIN_CHUNK_SIZE \
35
 
        ((sizeof(unsigned char**) + VARIABLE_REC_OVERHEAD + sizeof(unsigned char**) - 1) & ~(sizeof(unsigned char**) - 1))
 
34
static const int VARIABLE_MIN_CHUNK_SIZE =
 
35
        ((sizeof(unsigned char**) + VARIABLE_REC_OVERHEAD + sizeof(unsigned char**) - 1) & ~(sizeof(unsigned char**) - 1));
36
36
 
37
37
 
38
38
/* Create a heap table */
241
241
  return(0);
242
242
 
243
243
err:
244
 
  if (share && share->keydef && share->keydef->seg)
245
 
    delete [] share->keydef->seg;
246
244
  if (share && share->keydef)
 
245
    delete [] share->keydef->seg;
 
246
  if (share)
247
247
    delete [] share->keydef;
248
 
  if (share)
249
 
    delete share;
 
248
  delete share;
250
249
  if (not create_info->internal_table)
251
250
    THR_LOCK_heap.unlock();
252
251
  return(1);