Commit ce069900 authored by Marko Mäkelä's avatar Marko Mäkelä Committed by GitHub

Merge pull request #1088 from tempesta-tech/tt-10.4-MDEV-18173

MDEV-18173 Assertion `o->ind == vers_end' or `o->ind == vers_start' failed in dict_table_t::instant_column
parents 55a0c3eb 35318d73
......@@ -135,5 +135,13 @@ alter table t1 drop system versioning;
create or replace table t1 (a int, b int) with system versioning;
insert into t1 values (1, 1);
alter table t1 drop system versioning;
#
# MDEV-18173 Assertion `o->ind == vers_end' or `o->ind == vers_start' failed in dict_table_t::instant_column
#
set @@system_versioning_alter_history= keep;
create or replace table t1 (pk integer primary key, a int, b int, v int as (a))
with system versioning;
alter table t1 force;
alter table t1 drop column b;
drop database test;
create database test;
......@@ -172,5 +172,16 @@ set debug_dbug= default;
}
alter table t1 drop system versioning;
--echo #
--echo # MDEV-18173 Assertion `o->ind == vers_end' or `o->ind == vers_start' failed in dict_table_t::instant_column
--echo #
set @@system_versioning_alter_history= keep;
create or replace table t1 (pk integer primary key, a int, b int, v int as (a))
with system versioning;
alter table t1 force;
alter table t1 drop column b;
drop database test;
create database test;
......@@ -4241,9 +4241,9 @@ innobase_build_col_map(
col_map[old_i - num_old_v] = i;
if (old_table->versioned()) {
if (old_i == old_table->vers_start) {
new_table->vers_start = i;
new_table->vers_start = i + num_v;
} else if (old_i == old_table->vers_end) {
new_table->vers_end = i;
new_table->vers_end = i + num_v;
}
}
goto found_col;
......
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