summaryrefslogtreecommitdiff
path: root/mysql-test/r/deadlock_innodb.result
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/r/deadlock_innodb.result')
-rw-r--r--mysql-test/r/deadlock_innodb.result38
1 files changed, 20 insertions, 18 deletions
diff --git a/mysql-test/r/deadlock_innodb.result b/mysql-test/r/deadlock_innodb.result
index 7a4874d6aab..af78a6aa9d5 100644
--- a/mysql-test/r/deadlock_innodb.result
+++ b/mysql-test/r/deadlock_innodb.result
@@ -1,31 +1,31 @@
-# Establish connection con1 (user=root)
-# Establish connection con2 (user=root)
+connect con1,localhost,root,,;
+connect con2,localhost,root,,;
drop table if exists t1,t2;
-# Switch to connection con1
+connection con1;
create table t1 (id integer, x integer) engine = InnoDB;
insert into t1 values(0, 0);
set autocommit=0;
SELECT * from t1 where id = 0 FOR UPDATE;
id x
0 0
-# Switch to connection con2
+connection con2;
set autocommit=0;
update t1 set x=2 where id = 0;
-# Switch to connection con1
+connection con1;
update t1 set x=1 where id = 0;
select * from t1;
id x
0 1
commit;
-# Switch to connection con2
+connection con2;
commit;
-# Switch to connection con1
+connection con1;
select * from t1;
id x
0 2
commit;
drop table t1;
-# Switch to connection con1
+connection con1;
create table t1 (id integer, x integer) engine = InnoDB;
create table t2 (b integer, a integer) engine = InnoDB;
insert into t1 values(0, 0), (300, 300);
@@ -47,19 +47,19 @@ select * from t1;
id x
0 0
300 300
-# Switch to connection con2
+connection con2;
set autocommit=0;
update t1 set x=2 where id = 0;
-# Switch to connection con1
+connection con1;
update t1 set x=1 where id = 0;
select * from t1;
id x
0 1
300 300
commit;
-# Switch to connection con2
+connection con2;
commit;
-# Switch to connection con1
+connection con1;
select * from t1;
id x
0 2
@@ -71,7 +71,7 @@ create table t2 (b integer, a integer) engine = InnoDB;
insert into t1 values(0, 0), (300, 300);
insert into t2 values(0, 0), (1, 20), (2, 30);
commit;
-# Switch to connection con1
+connection con1;
select a,b from t2 UNION SELECT id, x from t1 FOR UPDATE;
a b
0 0
@@ -87,7 +87,7 @@ select * from t1;
id x
0 0
300 300
-# Switch to connection con2
+connection con2;
update t2 set a=2 where b = 0;
select * from t2;
b a
@@ -95,22 +95,24 @@ b a
1 20
2 30
update t1 set x=2 where id = 0;
-# Switch to connection con1
+connection con1;
update t1 set x=1 where id = 0;
select * from t1;
id x
0 1
300 300
commit;
-# Switch to connection con2
+connection con2;
commit;
-# Switch to connection con1
+connection con1;
select * from t1;
id x
0 2
300 300
commit;
-# Switch to connection default + disconnect con1 and con2
+connection default;
+disconnect con1;
+disconnect con2;
drop table t1, t2;
End of 4.1 tests
set storage_engine=innodb;