summaryrefslogtreecommitdiff
path: root/storage/xtradb
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-01-29 14:07:59 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2019-01-29 15:20:26 +0200
commit5e06ee41a46dd9f336e73c0f9b6622c5ea5d548f (patch)
tree7ff9404880094b811dc2b76eb9c3b1e0330ec930 /storage/xtradb
parentf877f6b49d97c02b307f83770c47c613c4bd669f (diff)
downloadmariadb-git-5e06ee41a46dd9f336e73c0f9b6622c5ea5d548f.tar.gz
MDEV-18222: Duplicated call to dict_foreign_remove_from_cache()
innobase_rename_column_try(): Declare fk_evict as std::set instead of std::list, in order to filter out duplicates.
Diffstat (limited to 'storage/xtradb')
-rw-r--r--storage/xtradb/handler/handler0alter.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/storage/xtradb/handler/handler0alter.cc b/storage/xtradb/handler/handler0alter.cc
index e932e2cbbdb..b7705691949 100644
--- a/storage/xtradb/handler/handler0alter.cc
+++ b/storage/xtradb/handler/handler0alter.cc
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 2005, 2018, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2017, 2018, MariaDB Corporation.
+Copyright (c) 2017, 2019, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
@@ -4593,7 +4593,7 @@ err_exit:
rename_foreign:
trx->op_info = "renaming column in SYS_FOREIGN_COLS";
- std::list<dict_foreign_t*> fk_evict;
+ std::set<dict_foreign_t*> fk_evict;
bool foreign_modified;
for (dict_foreign_set::const_iterator it = user_table->foreign_set.begin();
@@ -4633,7 +4633,7 @@ rename_foreign:
}
if (foreign_modified) {
- fk_evict.push_back(foreign);
+ fk_evict.insert(foreign);
}
}
@@ -4675,7 +4675,7 @@ rename_foreign:
}
if (foreign_modified) {
- fk_evict.push_back(foreign);
+ fk_evict.insert(foreign);
}
}