summaryrefslogtreecommitdiff
path: root/storage/innobase/handler/handler0alter.cc
diff options
context:
space:
mode:
Diffstat (limited to 'storage/innobase/handler/handler0alter.cc')
-rw-r--r--storage/innobase/handler/handler0alter.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/storage/innobase/handler/handler0alter.cc b/storage/innobase/handler/handler0alter.cc
index c483e2dea59..2ae4f65efc5 100644
--- a/storage/innobase/handler/handler0alter.cc
+++ b/storage/innobase/handler/handler0alter.cc
@@ -5434,18 +5434,24 @@ alter_fill_stored_column(
dict_s_col_list** s_cols,
mem_heap_t** s_heap)
{
- ulint n_cols = altered_table->s->fields;
+ ulint n_cols = altered_table->s->fields;
+ ulint stored_col_no = 0;
for (ulint i = 0; i < n_cols; i++) {
Field* field = altered_table->field[i];
dict_s_col_t s_col;
+ if (!innobase_is_v_fld(field)) {
+ stored_col_no++;
+ }
+
if (!innobase_is_s_fld(field)) {
continue;
}
ulint num_base = 0;
- dict_col_t* col = dict_table_get_nth_col(table, i);
+ dict_col_t* col = dict_table_get_nth_col(table,
+ stored_col_no);
s_col.m_col = col;
s_col.s_pos = i;