summaryrefslogtreecommitdiff
path: root/storage/xtradb
diff options
context:
space:
mode:
authorThirunarayanan Balathandayuthapani <thiru@mariadb.com>2020-03-25 17:10:01 +0530
committerThirunarayanan Balathandayuthapani <thiru@mariadb.com>2020-03-25 17:10:36 +0530
commit1f7be881414291d91a4cb134b75ed029f90f707d (patch)
tree2f9dda0405d3857bb1b3294fbe8ca82f4ebfff5e /storage/xtradb
parent64dd39694810c093c64c23c0f4e8de02afa921f7 (diff)
downloadmariadb-git-1f7be881414291d91a4cb134b75ed029f90f707d.tar.gz
MDEV-19092 Server crash when renaming the column when
FOREIGN_KEY_CHECKS is disabled - dict_foreign_find_index() can return NULL if InnoDB already dropped the foreign index when FOREIGN_KEY_CHECKS is disabled.
Diffstat (limited to 'storage/xtradb')
-rw-r--r--storage/xtradb/dict/dict0mem.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/storage/xtradb/dict/dict0mem.cc b/storage/xtradb/dict/dict0mem.cc
index f4bbc5c8f06..51ca6de8cd2 100644
--- a/storage/xtradb/dict/dict0mem.cc
+++ b/storage/xtradb/dict/dict0mem.cc
@@ -2,7 +2,7 @@
Copyright (c) 1996, 2017, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2012, Facebook Inc.
-Copyright (c) 2013, 2019, MariaDB Corporation.
+Copyright (c) 2013, 2020, 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
@@ -421,9 +421,10 @@ dict_mem_table_col_rename_low(
foreign->foreign_col_names,
foreign->n_fields, NULL, true, false,
NULL, NULL, NULL);
- /* There must be an equivalent index in this case. */
- ut_ad(new_index != NULL);
+ /* New index can be null if XtraDB already dropped
+ the foreign index when FOREIGN_KEY_CHECKS is
+ disabled */
foreign->foreign_index = new_index;
} else {