-
Dmitry Lenev 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. mysql-test/r/innodb_mysql.result: Added test case for bug #39932 "create table fails if column for FK is in different case than in corr index". mysql-test/t/innodb_mysql.test: Added test case for bug #39932 "create table fails if column for FK is in different case than in corr index". sql/sql_class.cc: Make field name comparison case-insensitive like it is in the rest of server.
8f39124a