~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/statement/alter_table.cc

  • Committer: Olaf van der Spek
  • Date: 2011-10-17 23:43:57 UTC
  • mto: This revision was merged to the branch mainline in revision 2443.
  • Revision ID: olafvdspek@gmail.com-20111017234357-4o836lxdhodozj4g
Refactor

Show diffs side-by-side

added added

removed removed

Lines of Context:
466
466
  KeyInfo *key_info= table->key_info;
467
467
  for (uint32_t i= 0; i < table->getShare()->sizeKeys(); i++, key_info++)
468
468
  {
469
 
    char *key_name= key_info->name;
 
469
    const char *key_name= key_info->name;
470
470
 
471
471
    vector<string>::iterator it= drop_keys.begin();
472
472
    while (it != drop_keys.end())
473
473
    {
474
 
      if (not my_strcasecmp(system_charset_info, key_name, (*it).c_str()))
 
474
      if (not my_strcasecmp(system_charset_info, key_name, it->c_str()))
475
475
        break;
476
476
      it++;
477
477
    }
542
542
      if (key_info->flags & HA_USES_COMMENT)
543
543
        key_create_info.comment= key_info->comment;
544
544
 
545
 
      Key::Keytype key_type;
546
 
      if (key_info->flags & HA_NOSAME)
547
 
      {
548
 
        key_type= is_primary_key(key_name) ? Key::PRIMARY : Key::UNIQUE;
549
 
      }
550
 
      else
551
 
      {
552
 
        key_type= Key::MULTIPLE;
553
 
      }
 
545
      Key::Keytype key_type= key_info->flags & HA_NOSAME
 
546
        ? (is_primary_key(key_name) ? Key::PRIMARY : Key::UNIQUE)
 
547
        : Key::MULTIPLE;
554
548
      new_key_list.push_back(new Key(key_type, key_name, strlen(key_name), &key_create_info, test(key_info->flags & HA_GENERATED_KEY), key_parts));
555
549
    }
556
550
  }