Commit 06a37d37 authored by Aleksey Midenkov's avatar Aleksey Midenkov Committed by Marko Mäkelä

MDEV-18122 Assertion 'table->versioned() == m_prebuilt->table->versioned()'...

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

Closes #1134
parent e77156d5
......@@ -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;
......@@ -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;
......@@ -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) {
......
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