~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_table.cc

  • Committer: Mark Atwood
  • Date: 2011-10-14 15:59:08 UTC
  • mfrom: (2430.1.12 refactor3a)
  • Revision ID: me@mark.atwood.name-20111014155908-whqmrmaf2grpsg5c
mergeĀ lp:~olafvdspek/drizzle/refactor3

Show diffs side-by-side

added added

removed removed

Lines of Context:
852
852
          if (!key2->generated ||
853
853
              (key->generated && key->columns.size() <
854
854
               key2->columns.size()))
855
 
            key->name.str= ignore_key;
 
855
            key->name.assign(ignore_key, 1);
856
856
          else
857
857
          {
858
 
            key2->name.str= ignore_key;
 
858
            key2->name.assign(ignore_key, 1);
859
859
            key_parts-= key2->columns.size();
860
860
            (*key_count)--;
861
861
          }
867
867
      key_parts+=key->columns.size();
868
868
    else
869
869
      (*key_count)--;
870
 
    if (key->name.data() && !tmp_table && (key->type != Key::PRIMARY) && is_primary_key(key->name.str))
 
870
    if (key->name.data() && !tmp_table && (key->type != Key::PRIMARY) && is_primary_key(key->name.data()))
871
871
    {
872
872
      my_error(ER_WRONG_NAME_FOR_INDEX, MYF(0), key->name.data());
873
873
      return true;
930
930
      return -1;
931
931
    }
932
932
 
933
 
    key_info->comment.length= key->key_create_info.comment.size();
934
 
    if (key_info->comment.length > 0)
 
933
    key_info->comment.assign(key_info->comment.data(), key->key_create_info.comment.size());
 
934
    if (key_info->comment.size() > 0)
935
935
    {
936
936
      key_info->flags|= HA_USES_COMMENT;
937
 
      key_info->comment.str= (char*)key->key_create_info.comment.data();
 
937
      key_info->comment.assign(key->key_create_info.comment.data(), key_info->comment.size()); // weird
938
938
    }
939
939
 
940
940
    message::Table::Field *protofield= NULL;