351
351
table_options->set_pack_record(create_info->table_options
352
352
& HA_OPTION_PACK_RECORD);
354
if (create_info->comment.length)
354
if (table_options->has_comment())
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);
363
if (tmp_len < create_info->comment.length)
363
if (tmp_len < table_options->comment().length())
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);
371
table_options->set_comment(create_info->comment.str);
373
372
if (create_info->default_table_charset)
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);
389
if (create_info->max_rows)
390
table_options->set_max_rows(create_info->max_rows);
392
if (create_info->min_rows)
393
table_options->set_min_rows(create_info->min_rows);
395
388
if (create_info->auto_increment_value)
396
389
table_options->set_auto_increment_value(create_info->auto_increment_value);
398
if (create_info->avg_row_length)
399
table_options->set_avg_row_length(create_info->avg_row_length);
401
391
if (create_info->key_block_size)
402
392
table_options->set_key_block_size(create_info->key_block_size);