470
470
return table_def_cache;
473
TableShare::TableShare(char *key, uint32_t key_length, char *path_arg, uint32_t path_length_arg) :
474
table_category(TABLE_UNKNOWN_CATEGORY),
476
found_next_number_field(NULL),
477
timestamp_field(NULL),
484
stored_rec_length(0),
485
row_type(ROW_TYPE_DEFAULT),
488
storage_engine(NULL),
489
tmp_table(message::Table::STANDARD),
473
TableShare::TableShare(TableIdentifier::Type type_arg) :
474
table_category(TABLE_UNKNOWN_CATEGORY),
476
found_next_number_field(NULL),
477
timestamp_field(NULL),
484
stored_rec_length(0),
485
row_type(ROW_TYPE_DEFAULT),
488
storage_engine(NULL),
492
last_null_bit_pos(0),
498
max_unique_length(0),
503
timestamp_field_offset(0),
505
db_create_options(0),
506
db_options_in_use(0),
508
rowid_field_offset(0),
510
next_number_index(0),
511
next_number_key_offset(0),
512
next_number_keypart(0),
516
column_bitmap_size(0),
518
db_low_byte_first(false),
520
replace_with_name_lock(false),
521
waiting_on_cond(false),
524
event_observers(NULL),
527
memset(&name_hash, 0, sizeof(HASH));
530
memset(&table_cache_key, 0, sizeof(LEX_STRING));
531
memset(&db, 0, sizeof(LEX_STRING));
532
memset(&table_name, 0, sizeof(LEX_STRING));
533
memset(&path, 0, sizeof(LEX_STRING));
534
memset(&normalized_path, 0, sizeof(LEX_STRING));
539
TableShare::TableShare(TableIdentifier::Type type_arg,
542
const char *new_table_name,
543
const char *new_path) :
544
table_category(TABLE_UNKNOWN_CATEGORY),
546
found_next_number_field(NULL),
547
timestamp_field(NULL),
554
stored_rec_length(0),
555
row_type(ROW_TYPE_DEFAULT),
558
storage_engine(NULL),
562
last_null_bit_pos(0),
568
max_unique_length(0),
573
timestamp_field_offset(0),
575
db_create_options(0),
576
db_options_in_use(0),
578
rowid_field_offset(0),
580
next_number_index(0),
581
next_number_key_offset(0),
582
next_number_keypart(0),
586
column_bitmap_size(0),
588
db_low_byte_first(false),
590
replace_with_name_lock(false),
591
waiting_on_cond(false),
594
event_observers(NULL),
597
memset(&name_hash, 0, sizeof(HASH));
600
memset(&table_cache_key, 0, sizeof(LEX_STRING));
601
memset(&db, 0, sizeof(LEX_STRING));
602
memset(&table_name, 0, sizeof(LEX_STRING));
603
memset(&path, 0, sizeof(LEX_STRING));
604
memset(&normalized_path, 0, sizeof(LEX_STRING));
605
init(key, key_length, new_table_name, new_path);
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,
694
uint32_t path_length_arg) :
695
table_category(TABLE_UNKNOWN_CATEGORY),
697
found_next_number_field(NULL),
698
timestamp_field(NULL),
705
stored_rec_length(0),
706
row_type(ROW_TYPE_DEFAULT),
709
storage_engine(NULL),
492
713
last_null_bit_pos(0),