1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-23852 alter table rename column to uppercase doesn't work

Case-sensitive compare to detect column name case change in inplace
alter rename.
This commit is contained in:
Aleksey Midenkov
2020-10-20 11:16:40 +03:00
parent 5ca14dafbe
commit d1667fb837
4 changed files with 52 additions and 18 deletions

View File

@ -7171,9 +7171,8 @@ static bool fill_alter_inplace_info(THD *thd, TABLE *table, bool varchar,
ha_alter_info->handler_flags|= ALTER_STORED_COLUMN_TYPE;
}
/* Check if field was renamed */
if (lex_string_cmp(system_charset_info, &field->field_name,
&new_field->field_name))
/* Check if field was renamed (case-sensitive for detecting case change) */
if (cmp(&field->field_name, &new_field->field_name))
{
field->flags|= FIELD_IS_RENAMED;
ha_alter_info->handler_flags|= ALTER_COLUMN_NAME;