~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/heap/ha_heap.cc

  • Committer: Padraig O'Sullivan
  • Date: 2009-08-26 03:17:31 UTC
  • mfrom: (1124 staging)
  • mto: This revision was merged to the branch mainline in revision 1139.
  • Revision ID: osullivan.padraig@gmail.com-20090826031731-at2as3ledixngra3
MergeĀ fromĀ trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
98
98
  registry.remove(heap_storage_engine);
99
99
  delete heap_storage_engine;
100
100
 
 
101
  int ret= hp_panic(HA_PANIC_CLOSE);
 
102
 
101
103
  pthread_mutex_destroy(&THR_LOCK_heap);
102
104
 
103
 
  return hp_panic(HA_PANIC_CLOSE);
 
105
  return ret;
104
106
}
105
107
 
106
108
 
822
824
  hp_create_info.is_dynamic= (share->row_type == ROW_TYPE_DYNAMIC);
823
825
  error= heap_create(fn_format(buff,table_name,"","",
824
826
                               MY_REPLACE_EXT|MY_UNPACK_FILENAME),
825
 
                   keys, keydef,
826
 
         column_count, columndef,
827
 
         max_key_fieldnr, key_part_size,
828
 
         share->reclength, mem_per_row_keys,
829
 
         (uint32_t) share->max_rows, (uint32_t) share->min_rows,
830
 
         &hp_create_info, internal_share);
 
827
                     keys, keydef,
 
828
                     column_count, columndef,
 
829
                     max_key_fieldnr, key_part_size,
 
830
                     share->reclength, mem_per_row_keys,
 
831
                     share->getMaxRows(), 0, // Factor out MIN
 
832
                     &hp_create_info, internal_share);
831
833
 
832
834
  free((unsigned char*) keydef);
833
835
  free((void *) columndef);
836
838
}
837
839
 
838
840
 
839
 
void ha_heap::update_create_info(HA_CREATE_INFO *create_info)
840
 
{
841
 
  table->file->info(HA_STATUS_AUTO);
842
 
  if (!(create_info->used_fields & HA_CREATE_USED_AUTO))
843
 
    create_info->auto_increment_value= stats.auto_increment_value;
844
 
  if (!(create_info->used_fields & HA_CREATE_USED_BLOCK_SIZE))
845
 
  {
846
 
    if (file->s->recordspace.is_variable_size)
847
 
      create_info->block_size= file->s->recordspace.chunk_length;
848
 
    else
849
 
      create_info->block_size= 0;
850
 
  }
851
 
}
852
 
 
853
841
void ha_heap::get_auto_increment(uint64_t, uint64_t, uint64_t,
854
842
                                 uint64_t *first_value,
855
843
                                 uint64_t *nb_reserved_values)