summaryrefslogtreecommitdiff
path: root/storage/innobase/row
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-11-06 13:44:56 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2019-11-06 13:44:56 +0200
commit928abd6967b7925c3cd7fdf53f31d0b0fb307e41 (patch)
tree805f388e65be49f60193bc470c0dd2b581e03198 /storage/innobase/row
parentd9899ce671b7a1d1c55993ab00c6b40d79d61b48 (diff)
parent908ca4668d5cb415f4737c8617ffb84f2c15855d (diff)
downloadmariadb-git-928abd6967b7925c3cd7fdf53f31d0b0fb307e41.tar.gz
Merge 10.3 into 10.4
Diffstat (limited to 'storage/innobase/row')
-rw-r--r--storage/innobase/row/row0mysql.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/storage/innobase/row/row0mysql.cc b/storage/innobase/row/row0mysql.cc
index 63e59956989..5a4317292be 100644
--- a/storage/innobase/row/row0mysql.cc
+++ b/storage/innobase/row/row0mysql.cc
@@ -2566,10 +2566,10 @@ row_create_index_for_mysql(
} else {
dict_build_index_def(table, index, trx);
- /* add index to dictionary cache and also free index object. */
- index = dict_index_add_to_cache(
- index, FIL_NULL, trx_is_strict(trx), &err);
- if (index) {
+ err = dict_index_add_to_cache(
+ index, FIL_NULL, trx_is_strict(trx));
+ ut_ad((index == NULL) == (err != DB_SUCCESS));
+ if (UNIV_LIKELY(err == DB_SUCCESS)) {
ut_ad(!index->is_instant());
index->n_core_null_bytes = UT_BITS_IN_BYTES(
unsigned(index->n_nullable));