Skip to content

Commit 96eb66e

Browse files
committed
MDEV-35205 Server crash in online alter upon concurrent ALTER and DML on table with vector field
test case
1 parent e020a3a commit 96eb66e

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed

mysql-test/main/vector_debug.result

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#
2+
# MDEV-35205 Server crash in online alter upon concurrent ALTER and DML on table with vector field
3+
#
4+
CREATE TABLE t (pk INT PRIMARY KEY, v VECTOR(1), b BLOB DEFAULT '1');
5+
INSERT INTO t (pk, v) VALUES (1,0x30303030);
6+
connect con1,localhost,root,,;
7+
set debug_sync= 'alter_table_online_progress SIGNAL there WAIT_FOR go';
8+
ALTER TABLE t MODIFY COLUMN b INT, ALGORITHM=COPY;
9+
connection default;
10+
set debug_sync= 'now WAIT_FOR there';
11+
INSERT INTO t (pk, v) VALUES (2,0x31313131);
12+
set debug_sync= 'now SIGNAL go';
13+
connection con1;
14+
DROP TABLE t;
15+
disconnect con1;

mysql-test/main/vector_debug.test

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
--source include/have_debug_sync.inc
2+
--source include/not_embedded.inc
3+
4+
--echo #
5+
--echo # MDEV-35205 Server crash in online alter upon concurrent ALTER and DML on table with vector field
6+
--echo #
7+
8+
CREATE TABLE t (pk INT PRIMARY KEY, v VECTOR(1), b BLOB DEFAULT '1');
9+
INSERT INTO t (pk, v) VALUES (1,0x30303030);
10+
--connect (con1,localhost,root,,)
11+
set debug_sync= 'alter_table_online_progress SIGNAL there WAIT_FOR go';
12+
--send
13+
ALTER TABLE t MODIFY COLUMN b INT, ALGORITHM=COPY;
14+
--connection default
15+
set debug_sync= 'now WAIT_FOR there';
16+
INSERT INTO t (pk, v) VALUES (2,0x31313131);
17+
set debug_sync= 'now SIGNAL go';
18+
--connection con1
19+
--reap
20+
# Cleanup
21+
DROP TABLE t;
22+
--disconnect con1

0 commit comments

Comments
 (0)