Skip to content

Commit 54c521c

Browse files
committed
MDEV-23672: incorrect v_indexes access fix
v_indexes was wrongly copied from the source table.
1 parent 9868253 commit 54c521c

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

mysql-test/suite/innodb/t/instant_alter_bugs.test

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -446,10 +446,6 @@ create table t1 (
446446
col_text_g text generated always as (substr(col_text,1,499)) )
447447
engine innodb row_format = redundant;
448448
insert into t1 (col_int,col_text) values (0, 'a'), (null, 'b');
449-
# FIXME: remove the following to trigger the bug
450-
--disable_query_log
451-
alter table t1 modify column col_text text null, force;
452-
--enable_query_log
453449
alter table t1 modify column col_text text null, algorithm = instant;
454450
insert into t1 (col_int,col_text) values (1, null), (null, null);
455451
update t1 set col_text= 'd';

storage/innobase/handler/handler0alter.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -592,6 +592,7 @@ inline bool dict_table_t::instant_column(const dict_table_t& table,
592592
mem_heap_alloc(heap, table.n_v_cols * sizeof(*v_cols)));
593593
for (ulint i = table.n_v_cols; i--; ) {
594594
new (&v_cols[i]) dict_v_col_t(table.v_cols[i]);
595+
v_cols[i].v_indexes.clear();
595596
}
596597
} else {
597598
ut_ad(table.n_v_cols == 0);

0 commit comments

Comments
 (0)