mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
MDEV-19606: Replace most std::list with std::forward_list
C++11 defines the singly-linked std::forward_list. Prefer it to the doubly-linked std::list in cases where we dot really need it. Also, clean up some code. dict_index_remove_from_v_col_list(): Remove. Obsoleted by dict_index_t::detach_columns(). There is no std::forward_list::push_back(). Use push_front() instead. The ordering does not really matter. dict_v_col_t::n_v_indexes: Added. There is no std::forward_list::size(), and trx_undo_log_v_idx() needs to know the size. rtr_info_track_t::rtr_active: Encapsulate. There really was no justification for the pointer indirection.
This commit is contained in:
@@ -1215,7 +1215,8 @@ dict_create_table_step(
|
||||
ut_ad(node->col_no == v_col->v_pos);
|
||||
dict_build_v_col_def_step(node);
|
||||
|
||||
if (node->base_col_no < v_col->num_base - 1) {
|
||||
if (node->base_col_no
|
||||
< unsigned{v_col->num_base} - 1) {
|
||||
/* move on to next base column */
|
||||
node->base_col_no++;
|
||||
} else {
|
||||
|
||||
@@ -2147,44 +2147,6 @@ add_field_size:
|
||||
return(FALSE);
|
||||
}
|
||||
|
||||
/** Clears the virtual column's index list before index is
|
||||
being freed.
|
||||
@param[in] index Index being freed */
|
||||
void dict_index_remove_from_v_col_list(dict_index_t* index)
|
||||
{
|
||||
/* Index is not completely formed */
|
||||
if (!index->cached) {
|
||||
return;
|
||||
}
|
||||
if (dict_index_has_virtual(index)) {
|
||||
const dict_col_t* col;
|
||||
const dict_v_col_t* vcol;
|
||||
|
||||
for (ulint i = 0; i < dict_index_get_n_fields(index); i++) {
|
||||
col = dict_index_get_nth_col(index, i);
|
||||
if (col->is_virtual()) {
|
||||
vcol = reinterpret_cast<const dict_v_col_t*>(
|
||||
col);
|
||||
/* This could be NULL, when we do add
|
||||
virtual column, add index together. We do not
|
||||
need to track this virtual column's index */
|
||||
if (vcol->v_indexes == NULL) {
|
||||
continue;
|
||||
}
|
||||
dict_v_idx_list::iterator it;
|
||||
for (it = vcol->v_indexes->begin();
|
||||
it != vcol->v_indexes->end(); ++it) {
|
||||
dict_v_idx_t v_index = *it;
|
||||
if (v_index.index == index) {
|
||||
vcol->v_indexes->erase(it);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** Adds an index to the dictionary cache, with possible indexing newly
|
||||
added column.
|
||||
@param[in] index index; NOTE! The index memory
|
||||
@@ -2542,7 +2504,8 @@ dict_index_add_col(
|
||||
if (v_col->v_indexes != NULL) {
|
||||
/* Register the index with the virtual column index
|
||||
list */
|
||||
v_col->v_indexes->push_back(
|
||||
v_col->n_v_indexes++;
|
||||
v_col->v_indexes->push_front(
|
||||
dict_v_idx_t(index, index->n_def));
|
||||
}
|
||||
|
||||
|
||||
@@ -1940,7 +1940,7 @@ dict_load_virtual_one_col(
|
||||
btr_pcur_open_on_user_rec(sys_virtual_index, tuple, PAGE_CUR_GE,
|
||||
BTR_SEARCH_LEAF, &pcur, &mtr);
|
||||
|
||||
for (i = 0; i < v_col->num_base + skipped; i++) {
|
||||
for (i = 0; i < unsigned{v_col->num_base} + skipped; i++) {
|
||||
const char* err_msg;
|
||||
ulint pos;
|
||||
|
||||
|
||||
@@ -227,15 +227,10 @@ dict_mem_table_free(
|
||||
/* Clean up virtual index info structures that are registered
|
||||
with virtual columns */
|
||||
for (ulint i = 0; i < table->n_v_def; i++) {
|
||||
dict_v_col_t* vcol
|
||||
= dict_table_get_nth_v_col(table, i);
|
||||
|
||||
UT_DELETE(vcol->v_indexes);
|
||||
UT_DELETE(dict_table_get_nth_v_col(table, i)->v_indexes);
|
||||
}
|
||||
|
||||
if (table->s_cols != NULL) {
|
||||
UT_DELETE(table->s_cols);
|
||||
}
|
||||
UT_DELETE(table->s_cols);
|
||||
|
||||
mem_heap_free(table->heap);
|
||||
}
|
||||
@@ -415,6 +410,7 @@ dict_mem_table_add_v_col(
|
||||
|
||||
/* Initialize the index list for virtual columns */
|
||||
v_col->v_indexes = UT_NEW_NOKEY(dict_v_idx_list());
|
||||
v_col->n_v_indexes = 0;
|
||||
|
||||
return(v_col);
|
||||
}
|
||||
@@ -448,7 +444,7 @@ dict_mem_table_add_s_col(
|
||||
}
|
||||
|
||||
s_col.num_base = num_base;
|
||||
table->s_cols->push_back(s_col);
|
||||
table->s_cols->push_front(s_col);
|
||||
}
|
||||
|
||||
/**********************************************************************//**
|
||||
@@ -749,13 +745,11 @@ dict_mem_index_create(
|
||||
|
||||
if (type & DICT_SPATIAL) {
|
||||
mutex_create(LATCH_ID_RTR_SSN_MUTEX, &index->rtr_ssn.mutex);
|
||||
index->rtr_track = static_cast<rtr_info_track_t*>(
|
||||
mem_heap_alloc(
|
||||
heap,
|
||||
sizeof(*index->rtr_track)));
|
||||
index->rtr_track = new
|
||||
(mem_heap_alloc(heap, sizeof *index->rtr_track))
|
||||
rtr_info_track_t();
|
||||
mutex_create(LATCH_ID_RTR_ACTIVE_MUTEX,
|
||||
&index->rtr_track->rtr_active_mutex);
|
||||
index->rtr_track->rtr_active = UT_NEW_NOKEY(rtr_info_active());
|
||||
}
|
||||
|
||||
return(index);
|
||||
@@ -863,11 +857,7 @@ dict_mem_fill_vcol_has_index(
|
||||
continue;
|
||||
}
|
||||
|
||||
dict_v_idx_list::iterator it;
|
||||
for (it = v_col->v_indexes->begin();
|
||||
it != v_col->v_indexes->end(); ++it) {
|
||||
dict_v_idx_t v_idx = *it;
|
||||
|
||||
for (const auto& v_idx : *v_col->v_indexes) {
|
||||
if (v_idx.index != index) {
|
||||
continue;
|
||||
}
|
||||
@@ -940,7 +930,7 @@ dict_mem_fill_vcol_set_for_base_col(
|
||||
continue;
|
||||
}
|
||||
|
||||
for (ulint j = 0; j < v_col->num_base; j++) {
|
||||
for (ulint j = 0; j < unsigned{v_col->num_base}; j++) {
|
||||
if (strcmp(col_name, dict_table_get_col_name(
|
||||
table,
|
||||
v_col->base_col[j]->ind)) == 0) {
|
||||
@@ -1064,22 +1054,15 @@ dict_mem_index_free(
|
||||
dict_index_zip_pad_mutex_destroy(index);
|
||||
|
||||
if (dict_index_is_spatial(index)) {
|
||||
rtr_info_active::iterator it;
|
||||
rtr_info_t* rtr_info;
|
||||
|
||||
for (it = index->rtr_track->rtr_active->begin();
|
||||
it != index->rtr_track->rtr_active->end(); ++it) {
|
||||
rtr_info = *it;
|
||||
|
||||
for (auto& rtr_info : index->rtr_track->rtr_active) {
|
||||
rtr_info->index = NULL;
|
||||
}
|
||||
|
||||
mutex_destroy(&index->rtr_ssn.mutex);
|
||||
mutex_destroy(&index->rtr_track->rtr_active_mutex);
|
||||
UT_DELETE(index->rtr_track->rtr_active);
|
||||
index->rtr_track->~rtr_info_track_t();
|
||||
}
|
||||
|
||||
dict_index_remove_from_v_col_list(index);
|
||||
index->detach_columns();
|
||||
mem_heap_free(index->heap);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*****************************************************************************
|
||||
|
||||
Copyright (c) 2016, 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
|
||||
@@ -972,7 +972,7 @@ rtr_create_rtr_info(
|
||||
&rtr_info->rtr_path_mutex);
|
||||
|
||||
mutex_enter(&index->rtr_track->rtr_active_mutex);
|
||||
index->rtr_track->rtr_active->push_back(rtr_info);
|
||||
index->rtr_track->rtr_active.push_front(rtr_info);
|
||||
mutex_exit(&index->rtr_track->rtr_active_mutex);
|
||||
return(rtr_info);
|
||||
}
|
||||
@@ -1045,7 +1045,7 @@ rtr_init_rtr_info(
|
||||
rtr_info->index = index;
|
||||
|
||||
mutex_enter(&index->rtr_track->rtr_active_mutex);
|
||||
index->rtr_track->rtr_active->push_back(rtr_info);
|
||||
index->rtr_track->rtr_active.push_front(rtr_info);
|
||||
mutex_exit(&index->rtr_track->rtr_active_mutex);
|
||||
}
|
||||
|
||||
@@ -1097,7 +1097,7 @@ rtr_clean_rtr_info(
|
||||
}
|
||||
|
||||
if (index) {
|
||||
index->rtr_track->rtr_active->remove(rtr_info);
|
||||
index->rtr_track->rtr_active.remove(rtr_info);
|
||||
mutex_exit(&index->rtr_track->rtr_active_mutex);
|
||||
}
|
||||
|
||||
@@ -1202,36 +1202,22 @@ rtr_check_discard_page(
|
||||
the root page */
|
||||
buf_block_t* block) /*!< in: block of page to be discarded */
|
||||
{
|
||||
ulint pageno = block->page.id.page_no();
|
||||
rtr_info_t* rtr_info;
|
||||
rtr_info_active::iterator it;
|
||||
const ulint pageno = block->page.id.page_no();
|
||||
|
||||
mutex_enter(&index->rtr_track->rtr_active_mutex);
|
||||
|
||||
for (it = index->rtr_track->rtr_active->begin();
|
||||
it != index->rtr_track->rtr_active->end(); ++it) {
|
||||
rtr_info = *it;
|
||||
rtr_node_path_t::iterator rit;
|
||||
bool found = false;
|
||||
|
||||
for (const auto& rtr_info : index->rtr_track->rtr_active) {
|
||||
if (cursor && rtr_info == cursor->rtr_info) {
|
||||
continue;
|
||||
}
|
||||
|
||||
mutex_enter(&rtr_info->rtr_path_mutex);
|
||||
for (rit = rtr_info->path->begin();
|
||||
rit != rtr_info->path->end(); ++rit) {
|
||||
node_visit_t node = *rit;
|
||||
|
||||
for (const node_visit_t& node : *rtr_info->path) {
|
||||
if (node.page_no == pageno) {
|
||||
found = true;
|
||||
rtr_rebuild_path(rtr_info, pageno);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (found) {
|
||||
rtr_rebuild_path(rtr_info, pageno);
|
||||
}
|
||||
mutex_exit(&rtr_info->rtr_path_mutex);
|
||||
|
||||
if (rtr_info->matches) {
|
||||
|
||||
@@ -5834,9 +5834,8 @@ innobase_build_v_templ(
|
||||
const dict_v_col_t* vcol = dict_table_get_nth_v_col(
|
||||
ib_table, i);
|
||||
|
||||
for (ulint j = 0; j < vcol->num_base; j++) {
|
||||
ulint col_no = vcol->base_col[j]->ind;
|
||||
marker[col_no] = true;
|
||||
for (ulint j = vcol->num_base; j--; ) {
|
||||
marker[vcol->base_col[j]->ind] = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5844,9 +5843,8 @@ innobase_build_v_templ(
|
||||
for (ulint i = 0; i < add_v->n_v_col; i++) {
|
||||
const dict_v_col_t* vcol = &add_v->v_col[i];
|
||||
|
||||
for (ulint j = 0; j < vcol->num_base; j++) {
|
||||
ulint col_no = vcol->base_col[j]->ind;
|
||||
marker[col_no] = true;
|
||||
for (ulint j = vcol->num_base; j--; ) {
|
||||
marker[vcol->base_col[j]->ind] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11117,7 +11115,7 @@ err_col:
|
||||
}
|
||||
|
||||
/** Fill base columns for the stored column present in the list. */
|
||||
if (table->s_cols && table->s_cols->size()) {
|
||||
if (table->s_cols && !table->s_cols->empty()) {
|
||||
for (ulint i = 0; i < n_cols; i++) {
|
||||
Field* field = m_form->field[i];
|
||||
|
||||
@@ -15104,7 +15102,8 @@ ha_innobase::get_cascade_foreign_key_table_list(
|
||||
{
|
||||
m_prebuilt->trx->op_info = "getting cascading foreign keys";
|
||||
|
||||
std::list<table_list_item, ut_allocator<table_list_item> > table_list;
|
||||
std::forward_list<table_list_item, ut_allocator<table_list_item> >
|
||||
table_list;
|
||||
|
||||
typedef std::set<st_handler_tablename, tablename_compare,
|
||||
ut_allocator<st_handler_tablename> > cascade_fk_set;
|
||||
@@ -15117,7 +15116,7 @@ ha_innobase::get_cascade_foreign_key_table_list(
|
||||
struct table_list_item item = {m_prebuilt->table,
|
||||
m_prebuilt->table->name.m_name};
|
||||
|
||||
table_list.push_back(item);
|
||||
table_list.push_front(item);
|
||||
|
||||
/* Get the parent table, grand parent table info from the
|
||||
table list by depth-first traversal. */
|
||||
@@ -15126,8 +15125,8 @@ ha_innobase::get_cascade_foreign_key_table_list(
|
||||
dict_table_t* parent = NULL;
|
||||
std::pair<cascade_fk_set::iterator,bool> ret;
|
||||
|
||||
item = table_list.back();
|
||||
table_list.pop_back();
|
||||
item = table_list.front();
|
||||
table_list.pop_front();
|
||||
parent_table = item.table;
|
||||
|
||||
if (parent_table == NULL) {
|
||||
@@ -15174,13 +15173,13 @@ ha_innobase::get_cascade_foreign_key_table_list(
|
||||
foreign->referenced_table,
|
||||
foreign->referenced_table_name_lookup};
|
||||
|
||||
table_list.push_back(item1);
|
||||
table_list.push_front(item1);
|
||||
|
||||
st_handler_tablename* fk_table =
|
||||
(st_handler_tablename*) thd_memdup(
|
||||
thd, &f1, sizeof(*fk_table));
|
||||
|
||||
fk_table_list->push_back(fk_table);
|
||||
fk_table_list->push_front(fk_table);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20680,7 +20679,7 @@ innobase_get_computed_value(
|
||||
buf = rec_buf2;
|
||||
}
|
||||
|
||||
for (ulint i = 0; i < col->num_base; i++) {
|
||||
for (ulint i = 0; i < unsigned{col->num_base}; i++) {
|
||||
dict_col_t* base_col = col->base_col[i];
|
||||
const dfield_t* row_field = NULL;
|
||||
ulint col_no = base_col->ind;
|
||||
|
||||
@@ -591,6 +591,7 @@ inline bool dict_table_t::instant_column(const dict_table_t& table,
|
||||
for (unsigned i = 0; i < n_v_def; i++) {
|
||||
dict_v_col_t& v = v_cols[i];
|
||||
v.v_indexes = UT_NEW_NOKEY(dict_v_idx_list());
|
||||
v.n_v_indexes = 0;
|
||||
v.base_col = static_cast<dict_col_t**>(
|
||||
mem_heap_dup(heap, v.base_col,
|
||||
v.num_base * sizeof *v.base_col));
|
||||
@@ -696,9 +697,11 @@ dup_dropped:
|
||||
}
|
||||
f.name = f.col->name(*this);
|
||||
if (f.col->is_virtual()) {
|
||||
reinterpret_cast<dict_v_col_t*>(f.col)
|
||||
->v_indexes->push_back(
|
||||
dict_v_idx_t(index, i));
|
||||
dict_v_col_t* v_col = reinterpret_cast
|
||||
<dict_v_col_t*>(f.col);
|
||||
v_col->v_indexes->push_front(
|
||||
dict_v_idx_t(index, i));
|
||||
v_col->n_v_indexes++;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4965,6 +4968,7 @@ prepare_inplace_add_virtual(
|
||||
|
||||
/* No need to track the list */
|
||||
ctx->add_vcol[j].v_indexes = NULL;
|
||||
ctx->add_vcol[j].n_v_indexes = 0;
|
||||
/* MDEV-17468: Do this on ctx->instant_table later */
|
||||
innodb_base_col_setup(ctx->old_table, field, &ctx->add_vcol[j]);
|
||||
j++;
|
||||
@@ -5206,7 +5210,7 @@ static bool innobase_add_one_virtual(
|
||||
return true;
|
||||
}
|
||||
|
||||
for (ulint i = 0; i < vcol->num_base; i++) {
|
||||
for (ulint i = 0; i < unsigned{vcol->num_base}; i++) {
|
||||
if (innobase_insert_sys_virtual(
|
||||
table, pos, vcol->base_col[i]->ind, trx)) {
|
||||
return true;
|
||||
@@ -7395,7 +7399,7 @@ alter_fill_stored_column(
|
||||
|
||||
s_col.num_base = num_base;
|
||||
innodb_base_col_setup_for_stored(table, field, &s_col);
|
||||
(*s_cols)->push_back(s_col);
|
||||
(*s_cols)->push_front(s_col);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -992,10 +992,6 @@ dict_make_room_in_cache(
|
||||
ulint max_tables, /*!< in: max tables allowed in cache */
|
||||
ulint pct_check); /*!< in: max percent to check */
|
||||
|
||||
/** Clears the virtual column's index list before index is being freed.
|
||||
@param[in] index Index being freed */
|
||||
void dict_index_remove_from_v_col_list(dict_index_t* index);
|
||||
|
||||
/** Adds an index to the dictionary cache, with possible indexing newly
|
||||
added column.
|
||||
@param[in] index index; NOTE! The index memory
|
||||
|
||||
@@ -706,7 +706,8 @@ struct dict_v_idx_t {
|
||||
};
|
||||
|
||||
/** Index list to put in dict_v_col_t */
|
||||
typedef std::list<dict_v_idx_t, ut_allocator<dict_v_idx_t> > dict_v_idx_list;
|
||||
typedef std::forward_list<dict_v_idx_t, ut_allocator<dict_v_idx_t> >
|
||||
dict_v_idx_list;
|
||||
|
||||
/** Data structure for a virtual column in a table */
|
||||
struct dict_v_col_t{
|
||||
@@ -717,15 +718,40 @@ struct dict_v_col_t{
|
||||
dict_col_t** base_col;
|
||||
|
||||
/** number of base column */
|
||||
ulint num_base;
|
||||
unsigned num_base:10;
|
||||
|
||||
/** column pos in table */
|
||||
ulint v_pos;
|
||||
unsigned v_pos:10;
|
||||
|
||||
/** number of indexes */
|
||||
unsigned n_v_indexes:12;
|
||||
|
||||
/** Virtual index list, and column position in the index,
|
||||
the allocated memory is not from table->heap */
|
||||
dict_v_idx_list* v_indexes;
|
||||
|
||||
/** Detach the column from an index.
|
||||
@param[in] index index to be detached from */
|
||||
void detach(const dict_index_t& index)
|
||||
{
|
||||
ut_ad(!n_v_indexes || v_indexes);
|
||||
if (!n_v_indexes) return;
|
||||
auto i = v_indexes->before_begin();
|
||||
ut_d(unsigned n = 0);
|
||||
do {
|
||||
auto prev = i++;
|
||||
if (i == v_indexes->end()) {
|
||||
ut_ad(n == n_v_indexes);
|
||||
return;
|
||||
}
|
||||
ut_ad(++n <= n_v_indexes);
|
||||
if (i->index == &index) {
|
||||
v_indexes->erase_after(prev);
|
||||
n_v_indexes--;
|
||||
return;
|
||||
}
|
||||
} while (i != v_indexes->end());
|
||||
}
|
||||
};
|
||||
|
||||
/** Data structure for newly added virtual column in a table */
|
||||
@@ -753,7 +779,8 @@ struct dict_s_col_t {
|
||||
};
|
||||
|
||||
/** list to put stored column for create_table_info_t */
|
||||
typedef std::list<dict_s_col_t, ut_allocator<dict_s_col_t> > dict_s_col_list;
|
||||
typedef std::forward_list<dict_s_col_t, ut_allocator<dict_s_col_t> >
|
||||
dict_s_col_list;
|
||||
|
||||
/** @brief DICT_ANTELOPE_MAX_INDEX_COL_LEN is measured in bytes and
|
||||
is the maximum indexed column length (or indexed prefix length) in
|
||||
@@ -1211,19 +1238,8 @@ struct dict_index_t {
|
||||
@param[in] index index to be detached from */
|
||||
inline void dict_col_t::detach(const dict_index_t& index)
|
||||
{
|
||||
if (!is_virtual()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (dict_v_idx_list* v_indexes = reinterpret_cast<const dict_v_col_t*>
|
||||
(this)->v_indexes) {
|
||||
for (dict_v_idx_list::iterator i = v_indexes->begin();
|
||||
i != v_indexes->end(); i++) {
|
||||
if (i->index == &index) {
|
||||
v_indexes->erase(i);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (is_virtual()) {
|
||||
reinterpret_cast<dict_v_col_t*>(this)->detach(index);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*****************************************************************************
|
||||
|
||||
Copyright (c) 2014, Oracle and/or its affiliates. All Rights Reserved.
|
||||
Copyright (c) 2018, MariaDB Corporation.
|
||||
Copyright (c) 2018, 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
|
||||
@@ -35,7 +35,7 @@ Created 2013/03/27 Jimmy Yang
|
||||
#include "gis0geo.h"
|
||||
|
||||
#include <vector>
|
||||
#include <list>
|
||||
#include <forward_list>
|
||||
|
||||
/* Node Sequence Number. Only updated when page splits */
|
||||
typedef ib_uint32_t node_seq_t;
|
||||
@@ -133,15 +133,14 @@ typedef struct rtr_info{
|
||||
/*!< current search mode */
|
||||
} rtr_info_t;
|
||||
|
||||
typedef std::list<rtr_info_t*, ut_allocator<rtr_info_t*> > rtr_info_active;
|
||||
|
||||
/* Tracking structure for all onoging search for an index */
|
||||
typedef struct rtr_info_track {
|
||||
rtr_info_active* rtr_active; /*!< Active search info */
|
||||
ib_mutex_t rtr_active_mutex;
|
||||
/* Tracking structure for all ongoing search for an index */
|
||||
struct rtr_info_track_t {
|
||||
/** Active search info */
|
||||
std::forward_list<rtr_info_t*, ut_allocator<rtr_info_t*> > rtr_active;
|
||||
ib_mutex_t rtr_active_mutex;
|
||||
/*!< mutex to protect
|
||||
rtr_active */
|
||||
} rtr_info_track_t;
|
||||
};
|
||||
|
||||
/* Node Sequence Number and mutex protects it. */
|
||||
typedef struct rtree_ssn {
|
||||
|
||||
@@ -232,8 +232,7 @@ trx_undo_log_v_idx(
|
||||
{
|
||||
ut_ad(pos < table->n_v_def);
|
||||
dict_v_col_t* vcol = dict_table_get_nth_v_col(table, pos);
|
||||
|
||||
ulint n_idx = vcol->v_indexes->size();
|
||||
ulint n_idx = vcol->n_v_indexes;
|
||||
byte* old_ptr;
|
||||
|
||||
ut_ad(n_idx > 0);
|
||||
@@ -260,12 +259,7 @@ trx_undo_log_v_idx(
|
||||
|
||||
ptr += mach_write_compressed(ptr, n_idx);
|
||||
|
||||
dict_v_idx_list::iterator it;
|
||||
|
||||
for (it = vcol->v_indexes->begin();
|
||||
it != vcol->v_indexes->end(); ++it) {
|
||||
dict_v_idx_t v_index = *it;
|
||||
|
||||
for (const auto& v_index : *vcol->v_indexes) {
|
||||
ptr += mach_write_compressed(
|
||||
ptr, static_cast<ulint>(v_index.index->id));
|
||||
|
||||
@@ -1027,7 +1021,7 @@ trx_undo_page_report_modify(
|
||||
on them */
|
||||
if (upd_fld_is_virtual_col(fld)
|
||||
&& dict_table_get_nth_v_col(
|
||||
table, pos)->v_indexes->empty()) {
|
||||
table, pos)->v_indexes->empty()) {
|
||||
n_updated--;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user