~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/table_proto_write.cc

  • Committer: Brian Aker
  • Date: 2009-08-17 15:34:55 UTC
  • mto: (1117.1.9 merge)
  • mto: This revision was merged to the branch mainline in revision 1118.
  • Revision ID: brian@gaz-20090817153455-emrlqx6cbxo9knfm
Fix for Stewart's patch (includes hack to solve MAX rows problem).

Show diffs side-by-side

added added

removed removed

Lines of Context:
351
351
  table_options->set_pack_record(create_info->table_options
352
352
                                 & HA_OPTION_PACK_RECORD);
353
353
 
354
 
  if (create_info->comment.length)
 
354
  if (table_options->has_comment())
355
355
  {
356
356
    uint32_t tmp_len;
357
357
    tmp_len= system_charset_info->cset->charpos(system_charset_info,
358
 
                                                create_info->comment.str,
359
 
                                                create_info->comment.str +
360
 
                                                create_info->comment.length,
361
 
                                                TABLE_COMMENT_MAXLEN);
 
358
                                                table_options->comment().c_str(),
 
359
                                                table_options->comment().c_str() +
 
360
                                                table_options->comment().length(),
 
361
                                                TABLE_COMMENT_MAXLEN);
362
362
 
363
 
    if (tmp_len < create_info->comment.length)
 
363
    if (tmp_len < table_options->comment().length())
364
364
    {
365
365
      my_error(ER_WRONG_STRING_LENGTH, MYF(0),
366
 
               create_info->comment.str,"Table COMMENT",
367
 
               (uint32_t) TABLE_COMMENT_MAXLEN);
 
366
               table_options->comment().c_str(),"Table COMMENT",
 
367
               (uint32_t) TABLE_COMMENT_MAXLEN);
368
368
      return(1);
369
369
    }
 
370
  }
370
371
 
371
 
    table_options->set_comment(create_info->comment.str);
372
 
  }
373
372
  if (create_info->default_table_charset)
374
373
  {
375
374
    table_options->set_collation_id(
386
385
  if (create_info->index_file_name)
387
386
    table_options->set_index_file_name(create_info->index_file_name);
388
387
 
389
 
  if (create_info->max_rows)
390
 
    table_options->set_max_rows(create_info->max_rows);
391
 
 
392
 
  if (create_info->min_rows)
393
 
    table_options->set_min_rows(create_info->min_rows);
394
 
 
395
388
  if (create_info->auto_increment_value)
396
389
    table_options->set_auto_increment_value(create_info->auto_increment_value);
397
390
 
398
 
  if (create_info->avg_row_length)
399
 
    table_options->set_avg_row_length(create_info->avg_row_length);
400
 
 
401
391
  if (create_info->key_block_size)
402
392
    table_options->set_key_block_size(create_info->key_block_size);
403
393