Skip to content

Commit f9066dc

Browse files
committed
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
1 parent 18a979d commit f9066dc

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

storage/innobase/handler/handler0alter.cc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -570,6 +570,13 @@ ha_innobase::check_if_supported_inplace_alter(
570570
{
571571
DBUG_ENTER("check_if_supported_inplace_alter");
572572

573+
/* Before 10.2.2 information about virtual columns was not stored in
574+
system tables. We need to do a full alter to rebuild proper 10.2.2+
575+
metadata with the information about virtual columns */
576+
if (table->s->mysql_version < 100202 && table->s->virtual_fields) {
577+
DBUG_RETURN(HA_ALTER_INPLACE_NOT_SUPPORTED);
578+
}
579+
573580
if (high_level_read_only
574581
|| srv_sys_space.created_new_raw()
575582
|| srv_force_recovery) {

0 commit comments

Comments
 (0)