diff options
Diffstat (limited to 'storage/xtradb/row/row0merge.cc')
-rw-r--r-- | storage/xtradb/row/row0merge.cc | 26 |
1 files changed, 2 insertions, 24 deletions
diff --git a/storage/xtradb/row/row0merge.cc b/storage/xtradb/row/row0merge.cc index 4eb6534161d..22ad34e5e35 100644 --- a/storage/xtradb/row/row0merge.cc +++ b/storage/xtradb/row/row0merge.cc @@ -3736,11 +3736,7 @@ row_merge_create_index( /*===================*/ trx_t* trx, /*!< in/out: trx (sets error_state) */ dict_table_t* table, /*!< in: the index is on this table */ - const index_def_t* index_def, - /*!< in: the index definition */ - const char** col_names) - /*! in: column names if columns are - renamed or NULL */ + const index_def_t* index_def) /*!< in: the index definition */ { dict_index_t* index; dberr_t err; @@ -3760,28 +3756,10 @@ row_merge_create_index( for (i = 0; i < n_fields; i++) { index_field_t* ifield = &index_def->fields[i]; - const char * col_name; - - /* - Alter table renaming a column and then adding a index - to this new name e.g ALTER TABLE t - CHANGE COLUMN b c INT NOT NULL, ADD UNIQUE INDEX (c); - requires additional check as column names are not yet - changed when new index definitions are created. Table's - new column names are on a array of column name pointers - if any of the column names are changed. */ - - if (col_names && col_names[i]) { - col_name = col_names[i]; - } else { - col_name = ifield->col_name ? - dict_table_get_col_name_for_mysql(table, ifield->col_name) : - dict_table_get_col_name(table, ifield->col_no); - } dict_mem_index_add_field( index, - col_name, + dict_table_get_col_name(table, ifield->col_no), ifield->prefix_len); } |