summaryrefslogtreecommitdiff
path: root/storage/innobase/handler/handler0alter.cc
diff options
context:
space:
mode:
Diffstat (limited to 'storage/innobase/handler/handler0alter.cc')
-rw-r--r--storage/innobase/handler/handler0alter.cc12
1 files changed, 4 insertions, 8 deletions
diff --git a/storage/innobase/handler/handler0alter.cc b/storage/innobase/handler/handler0alter.cc
index e19c63cd18f..729208dd04c 100644
--- a/storage/innobase/handler/handler0alter.cc
+++ b/storage/innobase/handler/handler0alter.cc
@@ -2777,14 +2777,10 @@ innobase_col_check_fk(
{
dict_s_col_list::const_iterator it;
- for (it = s_cols->begin();
- it != s_cols->end(); ++it) {
- dict_s_col_t s_col = *it;
-
- for (ulint j = 0; j < s_col.num_base; j++) {
- if (strcmp(col_name, dict_table_get_col_name(
- table,
- s_col.base_col[j]->ind)) == 0) {
+ for (it = s_cols->begin(); it != s_cols->end(); ++it) {
+ for (ulint j = it->num_base; j--; ) {
+ if (!strcmp(col_name, dict_table_get_col_name(
+ table, it->base_col[j]->ind))) {
return(true);
}
}