~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/table_proto.cc

  • Committer: Mark Atwood
  • Date: 2011-10-05 15:24:11 UTC
  • mfrom: (2420.2.4 rf)
  • Revision ID: me@mark.atwood.name-20111005152411-xksdn4vulhmtz2x4
mergeĀ lp:~olafvdspek/drizzle/refactor1a

Show diffs side-by-side

added added

removed removed

Lines of Context:
231
231
    constraints->set_is_nullable(field_arg->def->null_value);
232
232
#endif
233
233
 
234
 
    if (field_arg->comment.length)
 
234
    if (not field_arg->comment.empty())
235
235
    {
236
 
      uint32_t tmp_len;
237
 
      tmp_len= system_charset_info->cset->charpos(system_charset_info,
238
 
                                                  field_arg->comment.str,
239
 
                                                  field_arg->comment.str +
240
 
                                                  field_arg->comment.length,
 
236
      uint32_t tmp_len= system_charset_info->cset->charpos(system_charset_info,
 
237
                                                  field_arg->comment.begin(),
 
238
                                                  field_arg->comment.end(),
241
239
                                                  COLUMN_COMMENT_MAXLEN);
242
240
 
243
 
      if (tmp_len < field_arg->comment.length)
 
241
      if (tmp_len < field_arg->comment.size())
244
242
      {
245
 
        my_error(ER_WRONG_STRING_LENGTH, MYF(0),
246
 
                 field_arg->comment.str,"COLUMN COMMENT",
247
 
                 (uint32_t) COLUMN_COMMENT_MAXLEN);
248
 
        return true;
 
243
        my_error(ER_WRONG_STRING_LENGTH, MYF(0), field_arg->comment.data(), "COLUMN COMMENT", (uint32_t) COLUMN_COMMENT_MAXLEN);
 
244
        return true;
249
245
      }
250
246
 
251
 
      if (! use_existing_fields)
252
 
        attribute->set_comment(field_arg->comment.str);
 
247
      if (not use_existing_fields)
 
248
        attribute->set_comment(field_arg->comment.data());
253
249
 
254
 
      assert(strcmp(attribute->comment().c_str(), field_arg->comment.str)==0);
 
250
      assert(strcmp(attribute->comment().c_str(), field_arg->comment.data())==0);
255
251
    }
256
252
 
257
253
    if (field_arg->unireg_check == Field::NEXT_NUMBER)