1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

MDEV-7816 ALTER with DROP INDEX and ADD INDEX .. COMMENT='comment2' ignores the new comment

Consider two indexes different if their comments differ
This commit is contained in:
f4rnham
2015-03-26 00:00:12 +01:00
parent bd2ae787ea
commit 4feaa06c84
3 changed files with 25 additions and 0 deletions

View File

@ -6368,6 +6368,13 @@ static bool fill_alter_inplace_info(THD *thd,
new_field->field->field_index != key_part->fieldnr - 1)
goto index_changed;
}
/* Check that key comment is not changed. */
if (table_key->comment.length != new_key->comment.length ||
(table_key->comment.length &&
strcmp(table_key->comment.str, new_key->comment.str) != 0))
goto index_changed;
continue;
index_changed: