~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-18 07:19:56 UTC
  • mfrom: (1116.1.3 stewart)
  • mto: This revision was merged to the branch mainline in revision 1118.
  • Revision ID: brian@gaz-20090818071956-nfpoe9rp3i7p50kx
Merge my branch from Stewart into one branch

Show diffs side-by-side

added added

removed removed

Lines of Context:
1203
1203
void ha_myisam::start_bulk_insert(ha_rows rows)
1204
1204
{
1205
1205
  Session *session= current_session;
1206
 
  ulong size= min(session->variables.read_buff_size,
1207
 
                  (uint32_t)(table->s->avg_row_length*rows));
 
1206
  ulong size= session->variables.read_buff_size;
1208
1207
 
1209
1208
  /* don't enable row cache if too few rows */
1210
1209
  if (! rows || (rows > MI_MIN_ROWS_TO_USE_WRITE_CACHE))
1230
1229
                          (size_t)session->variables.bulk_insert_buff_size,
1231
1230
                          rows);
1232
1231
    }
1233
 
 
1234
 
  return;
1235
1232
}
1236
1233
 
1237
1234
/*
1605
1602
  return to;
1606
1603
}
1607
1604
 
1608
 
void ha_myisam::update_create_info(HA_CREATE_INFO *create_info)
1609
 
{
1610
 
  ha_myisam::info(HA_STATUS_AUTO | HA_STATUS_CONST);
1611
 
  if (!(create_info->used_fields & HA_CREATE_USED_AUTO))
1612
 
  {
1613
 
    create_info->auto_increment_value= stats.auto_increment_value;
1614
 
  }
1615
 
  create_info->data_file_name=data_file_name;
1616
 
  create_info->index_file_name=index_file_name;
1617
 
}
1618
 
 
1619
 
 
1620
1605
int MyisamEngine::createTableImplementation(Session *, const char *table_name,
1621
1606
                                            Table *table_arg,
1622
1607
                                            HA_CREATE_INFO *ha_create_info,
1623
 
                                            drizzled::message::Table*)
 
1608
                                            drizzled::message::Table* create_proto)
1624
1609
{
1625
1610
  int error;
1626
1611
  uint32_t create_flags= 0, create_records;
1633
1618
  if ((error= table2myisam(table_arg, &keydef, &recinfo, &create_records)))
1634
1619
    return(error); /* purecov: inspected */
1635
1620
  memset(&create_info, 0, sizeof(create_info));
1636
 
  create_info.max_rows= share->max_rows;
1637
 
  create_info.reloc_rows= share->min_rows;
 
1621
  create_info.max_rows= create_proto->options().max_rows();
 
1622
  create_info.reloc_rows= create_proto->options().min_rows();
1638
1623
  create_info.with_auto_increment= share->next_number_key_offset == 0;
1639
1624
  create_info.auto_increment= (ha_create_info->auto_increment_value ?
1640
1625
                               ha_create_info->auto_increment_value -1 :
1641
1626
                               (uint64_t) 0);
1642
 
  create_info.data_file_length= ((uint64_t) share->max_rows *
1643
 
                                 share->avg_row_length);
 
1627
  create_info.data_file_length= (create_proto->options().max_rows() *
 
1628
                                 create_proto->options().avg_row_length());
1644
1629
  create_info.data_file_name= ha_create_info->data_file_name;
1645
1630
  create_info.index_file_name= ha_create_info->index_file_name;
1646
1631
  create_info.language= share->table_charset->number;