Commit f9066dc3 authored by Sergei Golubchik's avatar Sergei Golubchik

MDEV-14023 10.1 InnoDB tables with virtual columns cannot be accessed in 10.2

in 10.1 innodb was basically ignoring virtual columns. In particular,
information about them was not stored in system tables. To make 10.1
table usable in 10.2 it needs to be rebuilt to have virtual colunm
metadata properly recreated.

See also a followup:
MDEV-14046 Allow ALGORITHM=INPLACE for 10.1 tables that contain virtual columns
parent 18a979df
......@@ -570,6 +570,13 @@ ha_innobase::check_if_supported_inplace_alter(
{
DBUG_ENTER("check_if_supported_inplace_alter");
/* Before 10.2.2 information about virtual columns was not stored in
system tables. We need to do a full alter to rebuild proper 10.2.2+
metadata with the information about virtual columns */
if (table->s->mysql_version < 100202 && table->s->virtual_fields) {
DBUG_RETURN(HA_ALTER_INPLACE_NOT_SUPPORTED);
}
if (high_level_read_only
|| srv_sys_space.created_new_raw()
|| srv_force_recovery) {
......
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