MDEV-18122 Assertion 'table->versioned() == m_prebuilt->table->versioned()' failed in ha_innobase::open

Closes #1134
This commit is contained in:
Aleksey Midenkov 2019-01-25 13:22:49 +03:00 committed by Marko Mäkelä
parent e77156d51d
commit 06a37d37a1
3 changed files with 20 additions and 1 deletions

View file

@ -143,5 +143,14 @@ 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;
#
# MDEV-18122 Assertion `table->versioned() == m_prebuilt->table->versioned()' failed in ha_innobase::open
#
create or replace table t1 (
x int,
v int as (x) virtual,
y int
) with system versioning;
alter table t1 drop system versioning;
drop database test;
create database test;

View file

@ -182,6 +182,15 @@ with system versioning;
alter table t1 force;
alter table t1 drop column b;
--echo #
--echo # MDEV-18122 Assertion `table->versioned() == m_prebuilt->table->versioned()' failed in ha_innobase::open
--echo #
create or replace table t1 (
x int,
v int as (x) virtual,
y int
) with system versioning;
alter table t1 drop system versioning;
drop database test;
create database test;

View file

@ -4234,7 +4234,8 @@ innobase_build_col_map(
}
col_map[old_i - num_old_v] = i;
if (old_table->versioned()) {
if (old_table->versioned()
&& altered_table->versioned()) {
if (old_i == old_table->vers_start) {
new_table->vers_start = i + num_v;
} else if (old_i == old_table->vers_end) {