~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-24 21:23:54 UTC
  • mto: This revision was merged to the branch mainline in revision 2449.
  • Revision ID: olafvdspek@gmail.com-20111024212354-j32gbc2sbsw0985q
Use str_ref

Show diffs side-by-side

added added

removed removed

Lines of Context:
529
529
          key_part_length= 0; /* Use whole field */
530
530
      }
531
531
      key_part_length/= key_part->field->charset()->mbmaxlen;
532
 
      key_parts.push_back(new Key_part_spec(cfield->field_name, strlen(cfield->field_name), key_part_length));
 
532
      key_parts.push_back(new Key_part_spec(str_ref(cfield->field_name), key_part_length));
533
533
    }
534
534
    if (key_parts.size())
535
535
    {
545
545
      Key::Keytype key_type= key_info->flags & HA_NOSAME
546
546
        ? (is_primary_key(key_name) ? Key::PRIMARY : Key::UNIQUE)
547
547
        : Key::MULTIPLE;
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));
 
548
      new_key_list.push_back(new Key(key_type, str_ref(key_name), &key_create_info, test(key_info->flags & HA_GENERATED_KEY), key_parts));
549
549
    }
550
550
  }
551
551