~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/myisam/ha_myisam.cc

  • Committer: Monty Taylor
  • Date: 2009-01-28 04:37:46 UTC
  • mto: (779.7.3 devel)
  • mto: This revision was merged to the branch mainline in revision 816.
  • Revision ID: mordred@inaugust.com-20090128043746-d2yukekishwn3ftm
TurnedĀ onĀ -Wshadow.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1633
1633
                      HA_CREATE_INFO *ha_create_info)
1634
1634
{
1635
1635
  int error;
1636
 
  uint32_t create_flags= 0, records;
 
1636
  uint32_t create_flags= 0, create_records;
1637
1637
  char buff[FN_REFLEN];
1638
1638
  MI_KEYDEF *keydef;
1639
1639
  MI_COLUMNDEF *recinfo;
1640
1640
  MI_CREATE_INFO create_info;
1641
1641
  TABLE_SHARE *share= table_arg->s;
1642
1642
  uint32_t options= share->db_options_in_use;
1643
 
  if ((error= table2myisam(table_arg, &keydef, &recinfo, &records)))
 
1643
  if ((error= table2myisam(table_arg, &keydef, &recinfo, &create_records)))
1644
1644
    return(error); /* purecov: inspected */
1645
1645
  memset(&create_info, 0, sizeof(create_info));
1646
1646
  create_info.max_rows= share->max_rows;
1670
1670
  error= mi_create(fn_format(buff, name, "", "",
1671
1671
                             MY_UNPACK_FILENAME|MY_APPEND_EXT),
1672
1672
                   share->keys, keydef,
1673
 
                   records, recinfo,
 
1673
                   create_records, recinfo,
1674
1674
                   0, (MI_UNIQUEDEF*) 0,
1675
1675
                   &create_info, create_flags);
1676
1676
  free((unsigned char*) recinfo);
1771
1771
}
1772
1772
 
1773
1773
 
1774
 
bool ha_myisam::check_if_incompatible_data(HA_CREATE_INFO *info,
 
1774
bool ha_myisam::check_if_incompatible_data(HA_CREATE_INFO *create_info,
1775
1775
                                           uint32_t table_changes)
1776
1776
{
1777
1777
  uint32_t options= table->s->db_options_in_use;
1778
1778
 
1779
 
  if (info->auto_increment_value != stats.auto_increment_value ||
1780
 
      info->data_file_name != data_file_name ||
1781
 
      info->index_file_name != index_file_name ||
 
1779
  if (create_info->auto_increment_value != stats.auto_increment_value ||
 
1780
      create_info->data_file_name != data_file_name ||
 
1781
      create_info->index_file_name != index_file_name ||
1782
1782
      table_changes == IS_EQUAL_NO ||
1783
1783
      table_changes & IS_EQUAL_PACK_LENGTH) // Not implemented yet
1784
1784
    return COMPATIBLE_DATA_NO;
1785
1785
 
1786
1786
  if ((options & (HA_OPTION_PACK_RECORD | HA_OPTION_CHECKSUM |
1787
1787
                  HA_OPTION_DELAY_KEY_WRITE)) !=
1788
 
      (info->table_options & (HA_OPTION_PACK_RECORD | HA_OPTION_CHECKSUM |
 
1788
      (create_info->table_options & (HA_OPTION_PACK_RECORD |
 
1789
                                     HA_OPTION_CHECKSUM |
1789
1790
                              HA_OPTION_DELAY_KEY_WRITE)))
1790
1791
    return COMPATIBLE_DATA_NO;
1791
1792
  return COMPATIBLE_DATA_YES;
1800
1801
 
1801
1802
static int myisam_init(void *p)
1802
1803
{
1803
 
  handlerton *myisam_hton;
1804
 
 
1805
1804
  myisam_hton= (handlerton *)p;
1806
1805
  myisam_hton->state= SHOW_OPTION_YES;
1807
1806
  myisam_hton->create= myisam_create_handler;