summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThirunarayanan Balathandayuthapani <thiru@mariadb.com>2020-09-08 13:43:05 +0530
committerThirunarayanan Balathandayuthapani <thiru@mariadb.com>2020-09-08 13:43:05 +0530
commit9125e191db27699af3704d425a8f111c7fa80897 (patch)
tree144d01d53572a1c4c4c99ba44105bce96236c061
parent323c2a20fb2229c98019a60bca31d28d0e3e5104 (diff)
downloadmariadb-git-bb-10.5-MDEV-23456.tar.gz
- Ignore the dropped column while building the tuple for foreign keybb-10.5-MDEV-23456
index.
-rw-r--r--storage/innobase/row/row0ins.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/storage/innobase/row/row0ins.cc b/storage/innobase/row/row0ins.cc
index b1589934014..bbdb836fbad 100644
--- a/storage/innobase/row/row0ins.cc
+++ b/storage/innobase/row/row0ins.cc
@@ -1912,8 +1912,10 @@ bool row_ins_foreign_index_entry(dict_foreign_t *foreign,
{
for (ulint j= 0; j < index->n_fields; j++)
{
- const char *col_name= dict_table_get_col_name(
- index->table, dict_index_get_nth_col_no(index, j));
+ const dict_col_t *col= dict_index_get_nth_col(index, j);
+ if (col->is_dropped())
+ continue;
+ const char *col_name= dict_table_get_col_name(index->table, col->ind);
if (0 == innobase_strcasecmp(col_name, foreign->foreign_col_names[i]))
{
dfield_copy(&ref_entry->fields[i], &entry->fields[j]);