~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/table.cc

  • Committer: Brian Aker
  • Date: 2010-06-02 23:40:24 UTC
  • mto: (1578.6.9 explain-drizzle)
  • mto: This revision was merged to the branch mainline in revision 1585.
  • Revision ID: brian@gir-2.local-20100602234024-x26qr3pfhvood1d7
keys and fields partial encapsulation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
336
336
 
337
337
void Table::setup_tmp_table_column_bitmaps(unsigned char *bitmaps)
338
338
{
339
 
  uint32_t field_count= s->fields;
 
339
  uint32_t field_count= s->sizeFields();
340
340
 
341
341
  this->def_read_set.init((my_bitmap_map*) bitmaps, field_count);
342
342
  this->tmp_set.init((my_bitmap_map*) (bitmaps+ bitmap_buffer_size(field_count)), field_count);
1578
1578
{
1579
1579
  int error;
1580
1580
  if ((error=cursor->ha_open(this, s->getTableName(),O_RDWR,
1581
 
                                  HA_OPEN_TMP_TABLE | HA_OPEN_INTERNAL_TABLE)))
 
1581
                             HA_OPEN_TMP_TABLE | HA_OPEN_INTERNAL_TABLE)))
1582
1582
  {
1583
1583
    print_error(error, MYF(0));
1584
1584
    db_stat= 0;
1628
1628
  MI_UNIQUEDEF uniquedef;
1629
1629
  TableShare *share= s;
1630
1630
 
1631
 
  if (share->keys)
 
1631
  if (share->sizeKeys())
1632
1632
  {                                             // Get keys for ni_create
1633
1633
    bool using_unique_constraint= false;
1634
1634
    HA_KEYSEG *seg= (HA_KEYSEG*) this->mem_root.alloc_root(sizeof(*seg) * keyinfo->key_parts);
1705
1705
      OPTION_BIG_TABLES)
1706
1706
    create_info.data_file_length= ~(uint64_t) 0;
1707
1707
 
1708
 
  if ((error=mi_create(share->getTableName(), share->keys, &keydef,
 
1708
  if ((error=mi_create(share->getTableName(), share->sizeKeys(), &keydef,
1709
1709
                       (uint32_t) (*recinfo-start_recinfo),
1710
1710
                       start_recinfo,
1711
1711
                       share->uniques, &uniquedef,
1775
1775
  uint32_t best= MAX_KEY;
1776
1776
  if (usable_keys->any())
1777
1777
  {
1778
 
    for (uint32_t nr= 0; nr < s->keys ; nr++)
 
1778
    for (uint32_t nr= 0; nr < s->sizeKeys() ; nr++)
1779
1779
    {
1780
1780
      if (usable_keys->test(nr))
1781
1781
      {