[MDEV-29021] ALTER TABLE fails when a stored virtual column is dropped and added Created: 2022-07-04  Updated: 2023-08-16  Resolved: 2023-08-16

Status: Closed
Project: MariaDB Server
Component/s: Data Definition - Alter Table, Virtual Columns
Affects Version/s: None
Fix Version/s: 11.2.1

Type: Bug Priority: Critical
Reporter: Nikita Malyavin Assignee: Nikita Malyavin
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Duplicate
is duplicated by MDEV-29007 Assertion `marked_for_write_or_comput... Closed
Relates
relates to MDEV-29013 ER_KEY_NOT_FOUND/lock timeout upon on... Closed

 Description   

Test case

--source include/have_innodb.inc
--source include/have_debug_sync.inc
 
create table t1 (a char(9), b char(9) as (a) stored) engine=InnoDB;
insert into t1 values ('foobar');
 
--send
  set debug_sync= 'now wait_for downgraded';
 
--connect(con1,localhost,root,,)
set debug_sync= 'alter_table_online_downgraded signal downgraded wait_for goforit';
--send 
alter ignore table t1 drop b, add b char(3) as (a) stored, algorithm=copy, lock=none
 
--connection default
--reap
update t1 set a = 'foobarqux';
set debug_sync= 'now signal goforit';
 
--connection con1
--reap  
 
# Cleanup
drop table t1;
set debug_sync= reset;



 Comments   
Comment by Nikita Malyavin [ 2022-07-04 ]

please review bb-10.10-MDEV-29021 (commits up to c1feb8c3c3)

Generated at Thu Feb 08 10:05:16 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.