~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/myisam/ha_myisam.cc

  • Committer: Brian Aker
  • Date: 2009-08-17 15:34:55 UTC
  • mto: (1117.1.9 merge)
  • mto: This revision was merged to the branch mainline in revision 1118.
  • Revision ID: brian@gaz-20090817153455-emrlqx6cbxo9knfm
Fix for Stewart's patch (includes hack to solve MAX rows problem).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1201
1201
{
1202
1202
  Session *session= current_session;
1203
1203
  ulong size= min(session->variables.read_buff_size,
1204
 
                  (uint32_t)(table->s->avg_row_length*rows));
 
1204
                  (uint32_t)(table->s->getAverageRowLength()*rows));
1205
1205
 
1206
1206
  /* don't enable row cache if too few rows */
1207
1207
  if (! rows || (rows > MI_MIN_ROWS_TO_USE_WRITE_CACHE))
1617
1617
int MyisamEngine::createTableImplementation(Session *, const char *table_name,
1618
1618
                                            Table *table_arg,
1619
1619
                                            HA_CREATE_INFO *ha_create_info,
1620
 
                                            drizzled::message::Table*)
 
1620
                                            drizzled::message::Table* create_proto)
1621
1621
{
1622
1622
  int error;
1623
1623
  uint32_t create_flags= 0, create_records;
1630
1630
  if ((error= table2myisam(table_arg, &keydef, &recinfo, &create_records)))
1631
1631
    return(error); /* purecov: inspected */
1632
1632
  memset(&create_info, 0, sizeof(create_info));
1633
 
  create_info.max_rows= share->max_rows;
1634
 
  create_info.reloc_rows= share->min_rows;
 
1633
  create_info.max_rows= create_proto->options().max_rows();
 
1634
  create_info.reloc_rows= create_proto->options().min_rows();
1635
1635
  create_info.with_auto_increment= share->next_number_key_offset == 0;
1636
1636
  create_info.auto_increment= (ha_create_info->auto_increment_value ?
1637
1637
                               ha_create_info->auto_increment_value -1 :
1638
1638
                               (uint64_t) 0);
1639
 
  create_info.data_file_length= ((uint64_t) share->max_rows *
1640
 
                                 share->avg_row_length);
 
1639
  create_info.data_file_length= (create_proto->options().max_rows() *
 
1640
                                 create_proto->options().avg_row_length());
1641
1641
  create_info.data_file_name= ha_create_info->data_file_name;
1642
1642
  create_info.index_file_name= ha_create_info->index_file_name;
1643
1643
  create_info.language= share->table_charset->number;