602
603
memset(&path, 0, sizeof(LEX_STRING));
603
604
memset(&normalized_path, 0, sizeof(LEX_STRING));
604
605
init(key, key_length, new_table_name, new_path);
608
TableShare::TableShare(char *key,
606
assert(type_arg == message::Table::INTERNAL);
610
TableShare::TableShare(TableIdentifier &identifier) :
611
table_category(TABLE_UNKNOWN_CATEGORY),
613
found_next_number_field(NULL),
614
timestamp_field(NULL),
621
stored_rec_length(0),
622
row_type(ROW_TYPE_DEFAULT),
625
storage_engine(NULL),
626
tmp_table(identifier.getType()),
629
last_null_bit_pos(0),
635
max_unique_length(0),
640
timestamp_field_offset(0),
642
db_create_options(0),
643
db_options_in_use(0),
645
rowid_field_offset(0),
647
next_number_index(0),
648
next_number_key_offset(0),
649
next_number_keypart(0),
653
column_bitmap_size(0),
655
db_low_byte_first(false),
657
replace_with_name_lock(false),
658
waiting_on_cond(false),
661
event_observers(NULL),
664
memset(&name_hash, 0, sizeof(HASH));
667
memset(&table_cache_key, 0, sizeof(LEX_STRING));
668
memset(&db, 0, sizeof(LEX_STRING));
669
memset(&table_name, 0, sizeof(LEX_STRING));
670
memset(&path, 0, sizeof(LEX_STRING));
671
memset(&normalized_path, 0, sizeof(LEX_STRING));
674
memory::init_sql_alloc(&mem_root, TABLE_ALLOC_BLOCK_SIZE, 0);
675
table_category= TABLE_CATEGORY_TEMPORARY;
676
tmp_table= message::Table::INTERNAL;
677
db.str= const_cast<char *>(identifier.getSchemaName().c_str());
678
db.length= identifier.getSchemaName().length();
679
table_cache_key.str= const_cast<char *>(identifier.getSchemaName().c_str());
680
table_cache_key.length= 0;
681
table_name.str= const_cast<char *>(identifier.getTableName().c_str());
682
table_name.length= identifier.getTableName().length();
683
path.str= const_cast<char *>(identifier.getPath().c_str());
684
normalized_path.str= const_cast<char *>(identifier.getPath().c_str());
685
path.length= normalized_path.length= strlen(path.str);
690
TableShare::TableShare(TableIdentifier::Type type_arg,
609
692
uint32_t key_length,
611
694
uint32_t path_length_arg) :