summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-05-20 17:10:12 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2020-05-20 17:10:12 +0300
commitb8e694a314b538b8bebec03a78b6df6570bd608b (patch)
tree8274c683a1a95053e74458cb97efb2fa81ef66dd
parent96bc626b8ffe7836c6393adb6586a415e243adcd (diff)
parented41947b783ed360127a8eff9a73cbaa79f53e94 (diff)
downloadmariadb-git-b8e694a314b538b8bebec03a78b6df6570bd608b.tar.gz
Merge 10.3 into 10.4
-rw-r--r--storage/innobase/row/row0ins.cc43
1 files changed, 15 insertions, 28 deletions
diff --git a/storage/innobase/row/row0ins.cc b/storage/innobase/row/row0ins.cc
index 39588079916..f5fe5b66002 100644
--- a/storage/innobase/row/row0ins.cc
+++ b/storage/innobase/row/row0ins.cc
@@ -58,35 +58,22 @@ check.
If you make a change in this module make sure that no codepath is
introduced where a call to log_free_check() is bypassed. */
-/***********************************************************//**
-Creates an entry template for each index of a table. */
-static
-void
-ins_node_create_entry_list(
-/*=======================*/
- ins_node_t* node) /*!< in: row insert node */
+/** Create an row template for each index of a table. */
+static void ins_node_create_entry_list(ins_node_t *node)
{
- dict_index_t* index;
- dtuple_t* entry;
-
- ut_ad(node->entry_sys_heap);
-
- /* We will include all indexes (include those corrupted
- secondary indexes) in the entry list. Filtration of
- these corrupted index will be done in row_ins() */
-
- node->entry_list.reserve(UT_LIST_GET_LEN(node->table->indexes));
-
- for (index = dict_table_get_first_index(node->table);
- index != 0;
- index = dict_table_get_next_index(index)) {
-
- entry = row_build_index_entry_low(
- node->row, NULL, index, node->entry_sys_heap,
- ROW_BUILD_FOR_INSERT);
-
- node->entry_list.push_back(entry);
- }
+ node->entry_list.reserve(UT_LIST_GET_LEN(node->table->indexes));
+
+ for (dict_index_t *index= dict_table_get_first_index(node->table); index;
+ index= dict_table_get_next_index(index))
+ {
+ /* Corrupted or incomplete secondary indexes will be filtered out in
+ row_ins(). */
+ dtuple_t *entry= index->online_status >= ONLINE_INDEX_ABORTED
+ ? dtuple_create(node->entry_sys_heap, 0)
+ : row_build_index_entry_low(node->row, NULL, index, node->entry_sys_heap,
+ ROW_BUILD_FOR_INSERT);
+ node->entry_list.push_back(entry);
+ }
}
/*****************************************************************//**