Skip to content

Commit 528dd5f

Browse files
committed
cleanup: InnoDB, remove index_field_t::col_name
* remnant of 5.6, does not exist in 5.7. bad merge? * also remove dict_table_get_col_name_for_mysql(), it was only used when index_field_t::col_name was not NULL
1 parent b66976a commit 528dd5f

File tree

5 files changed

+1
-52
lines changed

5 files changed

+1
-52
lines changed

storage/innobase/dict/dict0dict.cc

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -654,41 +654,6 @@ dict_table_get_col_name(
654654
return(s);
655655
}
656656

657-
/**********************************************************************//**
658-
Returns a column's name.
659-
@return column name. NOTE: not guaranteed to stay valid if table is
660-
modified in any way (columns added, etc.). */
661-
UNIV_INTERN
662-
const char*
663-
dict_table_get_col_name_for_mysql(
664-
/*==============================*/
665-
const dict_table_t* table, /*!< in: table */
666-
const char* col_name)/*! in: MySQL table column name */
667-
{
668-
ulint i;
669-
const char* s;
670-
671-
ut_ad(table);
672-
ut_ad(col_name);
673-
ut_ad(table->magic_n == DICT_TABLE_MAGIC_N);
674-
675-
s = table->col_names;
676-
if (s) {
677-
/* If we have many virtual columns MySQL key_part->fieldnr
678-
could be larger than number of columns in InnoDB table
679-
when creating new indexes. */
680-
for (i = 0; i < table->n_def; i++) {
681-
682-
if (!innobase_strcasecmp(s, col_name)) {
683-
break; /* Found */
684-
}
685-
s += strlen(s) + 1;
686-
}
687-
}
688-
689-
return(s);
690-
}
691-
692657
/** Returns a virtual column's name.
693658
@param[in] table target table
694659
@param[in] col_nr virtual column number (nth virtual column)

storage/innobase/handler/handler0alter.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2183,7 +2183,6 @@ innobase_create_index_field_def(
21832183
#else
21842184
index_field->is_v_col = false;
21852185
index_field->col_no = key_part->fieldnr - num_m_v;
2186-
index_field->col_name = altered_table ? field->field_name : fields[key_part->fieldnr]->field_name;
21872186
#endif /* MYSQL_VIRTUAL_COLUMNS */
21882187

21892188
if (DATA_LARGE_MTYPE(col_type)

storage/innobase/include/dict0dict.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -613,18 +613,6 @@ dict_table_get_col_name(
613613
ulint col_nr) /*!< in: column number */
614614
MY_ATTRIBUTE((nonnull, warn_unused_result));
615615

616-
/**********************************************************************//**
617-
Returns a column's name.
618-
@return column name. NOTE: not guaranteed to stay valid if table is
619-
modified in any way (columns added, etc.). */
620-
UNIV_INTERN
621-
const char*
622-
dict_table_get_col_name_for_mysql(
623-
/*==============================*/
624-
const dict_table_t* table, /*!< in: table */
625-
const char* col_name)/*!< in: MySQL table column name */
626-
MY_ATTRIBUTE((nonnull, warn_unused_result));
627-
628616
/** Returns a virtual column's name.
629617
@param[in] table table object
630618
@param[in] col_nr virtual column number(nth virtual column)

storage/innobase/include/row0merge.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ struct index_field_t {
114114
ulint col_no; /*!< column offset */
115115
ulint prefix_len; /*!< column prefix length, or 0
116116
if indexing the whole column */
117-
const char* col_name; /*!< column name or NULL */
118117
bool is_v_col; /*!< whether this is a virtual column */
119118
};
120119

storage/innobase/row/row0merge.cc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4509,9 +4509,7 @@ row_merge_create_index(
45094509
if (col_names && col_names[i]) {
45104510
name = col_names[i];
45114511
} else {
4512-
name = ifield->col_name ?
4513-
dict_table_get_col_name_for_mysql(table, ifield->col_name) :
4514-
dict_table_get_col_name(table, ifield->col_no);
4512+
name = dict_table_get_col_name(table, ifield->col_no);
45154513
}
45164514
}
45174515

0 commit comments

Comments
 (0)