diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 18:00:34 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 18:00:34 +0000 |
commit | 3f619478f796eddbba6e39502fe941b285dd97b1 (patch) | |
tree | e2c7b5777f728320e5b5542b6213fd3591ba51e2 /mysql-test/suite/innodb/t/alter_mdl_timeout.test | |
parent | Initial commit. (diff) | |
download | mariadb-upstream.tar.xz mariadb-upstream.zip |
Adding upstream version 1:10.11.6.upstream/1%10.11.6upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/suite/innodb/t/alter_mdl_timeout.test')
-rw-r--r-- | mysql-test/suite/innodb/t/alter_mdl_timeout.test | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/mysql-test/suite/innodb/t/alter_mdl_timeout.test b/mysql-test/suite/innodb/t/alter_mdl_timeout.test new file mode 100644 index 00000000..6d916a3f --- /dev/null +++ b/mysql-test/suite/innodb/t/alter_mdl_timeout.test @@ -0,0 +1,33 @@ +--source include/have_innodb.inc +--source include/have_debug.inc +--source include/have_debug_sync.inc + +create table t1(f1 char(10), f2 char(10) not null, f3 int not null, + f4 int not null, primary key(f3))engine=innodb; +insert into t1 values('a','a', 1, 1), ('b','b', 2, 2), ('c', 'c', 3, 3), ('d', 'd', 4, 4); +SET DEBUG_SYNC="row_merge_after_scan SIGNAL con1_start WAIT_FOR con1_insert"; +SET DEBUG_SYNC="innodb_commit_inplace_alter_table_wait SIGNAL con1_wait WAIT_FOR con1_update"; +send ALTER TABLE t1 ADD UNIQUE INDEX(f1(3), f4), ADD UNIQUE INDEX(f2), ALGORITHM=INPLACE; + +connect(con1,localhost,root,,,); +SET DEBUG_SYNC="now WAIT_FOR con1_start"; +begin; +INSERT INTO t1 VALUES('e','e',5, 5); +SET DEBUG_SYNC="now SIGNAL con1_insert"; +SET DEBUG_SYNC="now WAIT_FOR con1_wait"; +SET DEBUG_SYNC="after_row_upd_clust SIGNAL con1_update WAIT_FOR alter_rollback"; +SEND UPDATE t1 set f4 = 10 order by f1 desc limit 2; + +connection default; +--error ER_LOCK_WAIT_TIMEOUT +reap; +SET DEBUG_SYNC="now SIGNAL alter_rollback"; + +connection con1; +reap; +commit; + +connection default; +disconnect con1; +DROP TABLE t1; +SET DEBUG_SYNC="RESET"; |