summaryrefslogtreecommitdiff
path: root/sql/sql_table.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_table.cc')
-rw-r--r--sql/sql_table.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index cac220d1cfd..9415e6f1bd8 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -7147,7 +7147,8 @@ bool mysql_compare_tables(TABLE *table, Alter_info *alter_info,
are equal. Comparing field numbers is sufficient.
*/
if ((table_part->length != new_part->length) ||
- (table_part->fieldnr - 1 != new_part->fieldnr))
+ (table_part->fieldnr - 1 != new_part->fieldnr) ||
+ ((table_part->key_part_flag ^ new_part->key_part_flag) & HA_REVERSE_SORT))
DBUG_RETURN(false);
}
}