mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Fix for merge.test failures in mysql-5.5-runtime
tree for embedded server Test case for bug #56251 "Deadlock with INSERT DELAYED and MERGE tables" can't be run against embedded server. Embedded server converts all DELAYED INSERTs into ordinary INSERTs and this test can't work properly if such conversion happens. Moved this test from merge.test to delayed.test which is skipped if test suite is run with --embedded-server option.
This commit is contained in:
@ -552,3 +552,52 @@ disconnect con1;
|
||||
connection default;
|
||||
DROP TABLE t1, t2, t3;
|
||||
--enable_ps_protocol
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # Test for bug #56251 "Deadlock with INSERT DELAYED and MERGE tables".
|
||||
--echo #
|
||||
connect (con1,localhost,root,,);
|
||||
connection default;
|
||||
--disable_warnings
|
||||
drop table if exists t1, t2, tm;
|
||||
--enable_warnings
|
||||
create table t1(a int);
|
||||
create table t2(a int);
|
||||
create table tm(a int) engine=merge union=(t1, t2);
|
||||
begin;
|
||||
select * from t1;
|
||||
|
||||
--echo # Connection 'con1'.
|
||||
connection con1;
|
||||
--echo # Sending:
|
||||
--send alter table t1 comment 'test'
|
||||
|
||||
--echo # Connection 'default'.
|
||||
connection default;
|
||||
--echo # Wait until ALTER TABLE blocks and starts waiting
|
||||
--echo # for connection 'default'. It should wait with a
|
||||
--echo # pending SNW lock on 't1'.
|
||||
let $wait_condition=
|
||||
select count(*) = 1 from information_schema.processlist
|
||||
where state = "Waiting for table metadata lock" and
|
||||
info = "alter table t1 comment 'test'";
|
||||
--source include/wait_condition.inc
|
||||
--echo # Attempt to perform delayed insert into 'tm' should not lead
|
||||
--echo # to a deadlock. Instead error ER_DELAYED_NOT_SUPPORTED should
|
||||
--echo # be emitted.
|
||||
--error ER_DELAYED_NOT_SUPPORTED
|
||||
insert delayed into tm values (1);
|
||||
--echo # Unblock ALTER TABLE.
|
||||
commit;
|
||||
|
||||
--echo # Connection 'con1'.
|
||||
connection con1;
|
||||
--echo # Reaping ALTER TABLE:
|
||||
--reap
|
||||
|
||||
disconnect con1;
|
||||
--source include/wait_until_disconnected.inc
|
||||
--echo # Connection 'default'.
|
||||
connection default;
|
||||
drop tables tm, t1, t2;
|
||||
|
Reference in New Issue
Block a user