• Magne Mahre's avatar
    Bug#39932 "create table fails if column for FK is in different · 24fc7ca4
    Magne Mahre authored
              case than in corr index".
          
    Server was unable to find existing or explicitly created supporting
    index for foreign key if corresponding statement clause used field
    names in case different than one used in key specification and created
    yet another supporting index.
    In cases when name of constraint (and thus name of generated index)
    was the same as name of existing/explicitly created index this led
    to duplicate key name error.
          
    The problem was that unlike all other code Key_part_spec::operator==()
    compared field names in case sensitive fashion. As result routines
    responsible for getting rid of redundant generated supporting indexes
    for foreign key were not working properly for versions of field names
    using different cases.
    
    (backported from mysql-trunk)
    24fc7ca4
sql_class.cc 112 KB