~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/table_share.cc

  • Committer: Brian Aker
  • Date: 2010-05-15 01:19:45 UTC
  • Revision ID: brian@gaz-20100515011945-uxhf94vi0tzm0vq6
Rename of KEY to KeyInfo

Show diffs side-by-side

added added

removed removed

Lines of Context:
637
637
  for (int indx= 0; indx < table.indexes_size(); indx++)
638
638
    share->key_parts+= table.indexes(indx).index_part_size();
639
639
 
640
 
  share->key_info= (KEY*) share->alloc_root( table.indexes_size() * sizeof(KEY) +share->key_parts*sizeof(KeyPartInfo));
 
640
  share->key_info= (KeyInfo*) share->alloc_root( table.indexes_size() * sizeof(KeyInfo) +share->key_parts*sizeof(KeyPartInfo));
641
641
 
642
642
  KeyPartInfo *key_part;
643
643
 
647
647
 
648
648
  ulong *rec_per_key= (ulong*) share->alloc_root(sizeof(ulong*)*share->key_parts);
649
649
 
650
 
  KEY* keyinfo= share->key_info;
 
650
  KeyInfo* keyinfo= share->key_info;
651
651
  for (int keynr= 0; keynr < table.indexes_size(); keynr++, keyinfo++)
652
652
  {
653
653
    message::Table::Index indx= table.indexes(keynr);
1695
1695
  /* Fix key->name and key_part->field */
1696
1696
  if (key_parts)
1697
1697
  {
1698
 
    KEY *local_key_info, *key_info_end;
 
1698
    KeyInfo     *local_key_info, *key_info_end;
1699
1699
    KeyPartInfo *key_part;
1700
1700
    uint32_t n_length;
1701
 
    n_length= keys*sizeof(KEY) + key_parts*sizeof(KeyPartInfo);
1702
 
    if (!(local_key_info= (KEY*) outparam.mem_root.alloc_root(n_length)))
 
1701
    n_length= keys*sizeof(KeyInfo) + key_parts*sizeof(KeyPartInfo);
 
1702
    if (!(local_key_info= (KeyInfo*) outparam.mem_root.alloc_root(n_length)))
1703
1703
      goto err;
1704
1704
    outparam.key_info= local_key_info;
1705
1705
    key_part= (reinterpret_cast<KeyPartInfo*> (local_key_info+keys));