[MDEV-26229] Innodb crash after insert while concurrent ADD INDEX is run Created: 2021-07-23  Updated: 2023-04-27

Status: Stalled
Project: MariaDB Server
Component/s: None
Affects Version/s: None
Fix Version/s: 10.4, 10.5, 10.6

Type: Bug Priority: Major
Reporter: Nikita Malyavin Assignee: Nikita Malyavin
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-26251 CREATE INDEX on virtual column ignore... Open

 Description   

--source include/have_innodb.inc
 
CREATE TABLE t (pid int PRIMARY KEY,
                uid int,
                vid int AS (uid) VIRTUAL);
connect(con1,localhost,root,,);
--echo # Create index on virtual column and stop before applying row logs.
SET DEBUG_SYNC = 'row_log_apply_before SIGNAL start_dml WAIT_FOR resume_ddl';
--send ALTER TABLE t ADD INDEX idx_vid(vid), algorithm=inplace
connection default;
SET DEBUG_SYNC= 'now WAIT_FOR start_dml';
--echo # Insert a record to generate an insert row log for the new index.
--echo # LOG-1 idx_vid : INSERT [NULL, 1]   <--------- ### BUG ###
INSERT INTO t(pid, uid) VALUES (1,10);
SELECT * FROM t;
SET DEBUG_SYNC= 'now SIGNAL resume_ddl';
connection con1;
--reap
connection default;
delete from t limit 1;
SELECT * FROM t;
disconnect con1;
DROP TABLE t;

Note: vid=NULL is inserted instead of 1


Generated at Thu Feb 08 09:43:43 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.