Commit 54c521ca authored by Aleksey Midenkov's avatar Aleksey Midenkov

MDEV-23672: incorrect v_indexes access fix

v_indexes was wrongly copied from the source table.
parent 9868253b
......@@ -446,10 +446,6 @@ create table t1 (
col_text_g text generated always as (substr(col_text,1,499)) )
engine innodb row_format = redundant;
insert into t1 (col_int,col_text) values (0, 'a'), (null, 'b');
# FIXME: remove the following to trigger the bug
--disable_query_log
alter table t1 modify column col_text text null, force;
--enable_query_log
alter table t1 modify column col_text text null, algorithm = instant;
insert into t1 (col_int,col_text) values (1, null), (null, null);
update t1 set col_text= 'd';
......
......@@ -592,6 +592,7 @@ inline bool dict_table_t::instant_column(const dict_table_t& table,
mem_heap_alloc(heap, table.n_v_cols * sizeof(*v_cols)));
for (ulint i = table.n_v_cols; i--; ) {
new (&v_cols[i]) dict_v_col_t(table.v_cols[i]);
v_cols[i].v_indexes.clear();
}
} else {
ut_ad(table.n_v_cols == 0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment