summaryrefslogtreecommitdiff
path: root/storage/innobase
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-04-26 12:53:37 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2019-04-26 17:40:19 +0300
commit1c4d1f3d057428fb9f30a16a1b47db576ec75916 (patch)
tree34858b39c9e27a69f1c7991a82b77925df987636 /storage/innobase
parent5cfc7799a33576bb638652bac6e341570c80a7e1 (diff)
downloadmariadb-git-1c4d1f3d057428fb9f30a16a1b47db576ec75916.tar.gz
innobase_col_check_fk(): Remove copying
Diffstat (limited to 'storage/innobase')
-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 a3b03a45eb3..05bb8ac61cd 100644
--- a/storage/innobase/handler/handler0alter.cc
+++ b/storage/innobase/handler/handler0alter.cc
@@ -1376,14 +1376,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);
}
}