mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Merge from mysql-5.1-5.1.29-rc into mysql-5.1-bugteam
This commit is contained in:
@ -55,3 +55,23 @@ select * from t1;
|
||||
a
|
||||
20
|
||||
drop table t1;
|
||||
drop table if exists t1;
|
||||
create table t1(a int, b int, c varchar(20), primary key(a)) engine = innodb;
|
||||
insert into t1 values(1, 1, 'a');
|
||||
insert into t1 values(2, 2, 'b');
|
||||
xa start 'a','b';
|
||||
update t1 set c = 'aa' where a = 1;
|
||||
xa start 'a','c';
|
||||
update t1 set c = 'bb' where a = 2;
|
||||
update t1 set c = 'bb' where a = 2;
|
||||
update t1 set c = 'aa' where a = 1;
|
||||
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
|
||||
select count(*) from t1;
|
||||
count(*)
|
||||
2
|
||||
xa end 'a','c';
|
||||
ERROR XA102: XA_RBDEADLOCK: Transaction branch was rolled back: deadlock was detected
|
||||
xa rollback 'a','c';
|
||||
xa start 'a','c';
|
||||
drop table t1;
|
||||
End of 5.0 tests
|
||||
|
@ -74,3 +74,48 @@ xa start 'zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz';
|
||||
select * from t1;
|
||||
drop table t1;
|
||||
|
||||
disconnect con1;
|
||||
|
||||
#
|
||||
# Bug#28323: Server crashed in xid cache operations
|
||||
#
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists t1;
|
||||
--enable_warnings
|
||||
|
||||
create table t1(a int, b int, c varchar(20), primary key(a)) engine = innodb;
|
||||
insert into t1 values(1, 1, 'a');
|
||||
insert into t1 values(2, 2, 'b');
|
||||
|
||||
connect (con1,localhost,root,,);
|
||||
connect (con2,localhost,root,,);
|
||||
|
||||
--connection con1
|
||||
xa start 'a','b';
|
||||
update t1 set c = 'aa' where a = 1;
|
||||
--connection con2
|
||||
xa start 'a','c';
|
||||
update t1 set c = 'bb' where a = 2;
|
||||
--connection con1
|
||||
--send update t1 set c = 'bb' where a = 2
|
||||
--connection con2
|
||||
--sleep 1
|
||||
--error ER_LOCK_DEADLOCK
|
||||
update t1 set c = 'aa' where a = 1;
|
||||
select count(*) from t1;
|
||||
--error ER_XA_RBDEADLOCK
|
||||
xa end 'a','c';
|
||||
xa rollback 'a','c';
|
||||
--disconnect con2
|
||||
|
||||
connect (con3,localhost,root,,);
|
||||
--connection con3
|
||||
xa start 'a','c';
|
||||
|
||||
--disconnect con1
|
||||
--disconnect con3
|
||||
--connection default
|
||||
drop table t1;
|
||||
|
||||
--echo End of 5.0 tests
|
||||
|
Reference in New Issue
Block a user