summaryrefslogtreecommitdiff
path: root/sql/sql_table.cc
diff options
context:
space:
mode:
authorAleksey Midenkov <midenok@gmail.com>2020-10-20 11:16:40 +0300
committerAleksey Midenkov <midenok@gmail.com>2020-10-20 11:16:40 +0300
commitd1667fb837f9e5300dc9cc10f2cce72533188b83 (patch)
treeec3e57214e509292ee1b808a96e1ae5b72cba9ba /sql/sql_table.cc
parent5ca14dafbee8a1877ac30e955616e9ecea77fbfc (diff)
downloadmariadb-git-d1667fb837f9e5300dc9cc10f2cce72533188b83.tar.gz
MDEV-23852 alter table rename column to uppercase doesn't work
Case-sensitive compare to detect column name case change in inplace alter rename.
Diffstat (limited to 'sql/sql_table.cc')
-rw-r--r--sql/sql_table.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index 345edf4d75c..31f165ef98a 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -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;