Bug #74149 Remove dead code in index name lookup
Submitted: 30 Sep 2014 8:31 Modified: 2 Oct 2014 13:45
Reporter: Marko Mäkelä Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S3 (Non-critical)
Version:5.7.5 OS:Any
Assigned to: CPU Architecture:Any

[30 Sep 2014 8:31] Marko Mäkelä
Description:
There is some dead code in index name lookup in InnoDB.

No code is looking up an index with name=NULL, but we have a check for that. Also, there is a function that seems to allow duplicate index names, while in reality we do not allow that.

How to repeat:
See dict_table_get_index_on_name_and_min_id() and dict_table_get_index_on_name().

Suggested fix:
The function dict_table_get_index_on_name_and_min_id()
should be replaced with dict_table_get_index_on_name().

Duplicate index names should not be allowed in the first place.
This method could probably have been removed already in WL#5526
when dict_table_check_for_dup_indexes() was introduced.
[2 Oct 2014 13:45] Daniel Price
Posted by developer:
 
Fixed as of the upcoming 5.7.6 release, and here's the changelog entry:

Removed unused code related to index name lookup, and replaced a function
that permitted duplicate index names.