~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/table_proto.cc

  • Committer: Mark Atwood
  • Date: 2011-10-08 04:50:51 UTC
  • mfrom: (2430.1.1 rf)
  • Revision ID: me@mark.atwood.name-20111008045051-6ha1qiy7k2a9c3jv
Tags: 2011.10.27
mergeĀ lp:~olafvdspek/drizzle/refactor2

Show diffs side-by-side

added added

removed removed

Lines of Context:
404
404
  {
405
405
    message::Table::Index *idx= table_proto.add_indexes();
406
406
 
407
 
    assert(test(key_info[i].flags & HA_USES_COMMENT) == (key_info[i].comment.length > 0));
 
407
    assert(test(key_info[i].flags & HA_USES_COMMENT) == (key_info[i].comment.size() > 0));
408
408
 
409
409
    idx->set_name(key_info[i].name);
410
410
    idx->set_key_length(key_info[i].key_length);
459
459
    {
460
460
      uint32_t tmp_len;
461
461
      tmp_len= system_charset_info->cset->charpos(system_charset_info,
462
 
                                                  key_info[i].comment.str,
463
 
                                                  key_info[i].comment.str +
464
 
                                                  key_info[i].comment.length,
 
462
                                                  key_info[i].comment.begin(),
 
463
                                                  key_info[i].comment.end(),
465
464
                                                  TABLE_COMMENT_MAXLEN);
466
465
 
467
 
      if (tmp_len < key_info[i].comment.length)
 
466
      if (tmp_len < key_info[i].comment.size())
468
467
      {
469
468
        my_error(ER_WRONG_STRING_LENGTH, MYF(0),
470
 
                 key_info[i].comment.str,"Index COMMENT",
 
469
                 key_info[i].comment.data(), "Index COMMENT",
471
470
                 (uint32_t) TABLE_COMMENT_MAXLEN);
472
471
        return true;
473
472
      }
474
473
 
475
 
      idx->set_comment(key_info[i].comment.str);
 
474
      idx->set_comment(key_info[i].comment.data());
476
475
    }
477
476
    static const uint64_t unknown_index_flag= (HA_NOSAME | HA_PACK_KEY |
478
477
                                               HA_USES_BLOCK_SIZE |