| 1 |
call mtr.add_suppression("Deadlock found when trying to get lock; try restarting transaction"); |
| 2 |
set session default_storage_engine=aria; |
| 3 |
create table t1 (a int) row_format=page; |
| 4 |
insert delayed into t1 values(1); |
| 5 |
ERROR HY000: DELAYED option not supported for table 't1' |
| 6 |
drop table t1; |
| 7 |
create table t1 (a int) row_format=page transactional=0; |
| 8 |
insert delayed into t1 values(1); |
| 9 |
flush table t1; |
| 10 |
select * from t1; |
| 11 |
a |
| 12 |
1 |
| 13 |
select count(*) from t1; |
| 14 |
count(*) |
| 15 |
1 |
| 16 |
drop table t1; |
| 17 |
create table t1 (a int) row_format=dynamic; |
| 18 |
insert delayed into t1 values(1); |
| 19 |
flush table t1; |
| 20 |
select * from t1; |
| 21 |
a |
| 22 |
1 |
| 23 |
select count(*) from t1; |
| 24 |
count(*) |
| 25 |
1 |
| 26 |
drop table t1; |
| 27 |
create table t1 (a int unique) transactional=1; |
| 28 |
insert t1 values (1); |
| 29 |
lock table t1 write concurrent; |
| 30 |
insert t1 values (2); |
| 31 |
connect con_a,localhost,root,,; |
| 32 |
lock table t1 write concurrent; |
| 33 |
insert t1 values (3); |
| 34 |
insert t1 values (2); |
| 35 |
connect con_b,localhost,root,,; |
| 36 |
lock table t1 write concurrent; |
| 37 |
insert t1 values (4); |
| 38 |
insert t1 values (3); |
| 39 |
connect con_c,localhost,root,,; |
| 40 |
lock table t1 write concurrent; |
| 41 |
insert t1 values (5); |
| 42 |
insert t1 values (4); |
| 43 |
connect con_d,localhost,root,,; |
| 44 |
lock table t1 write concurrent; |
| 45 |
insert t1 values (6); |
| 46 |
insert t1 values (5); |
| 47 |
connection default; |
| 48 |
insert t1 values (6); |
| 49 |
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction |
| 50 |
unlock tables; |
| 51 |
connection con_a; |
| 52 |
ERROR 23000: Duplicate entry '2' for key 'a' |
| 53 |
unlock tables; |
| 54 |
disconnect con_a; |
| 55 |
connection con_b; |
| 56 |
ERROR 23000: Duplicate entry '3' for key 'a' |
| 57 |
unlock tables; |
| 58 |
disconnect con_b; |
| 59 |
connection con_c; |
| 60 |
ERROR 23000: Duplicate entry '4' for key 'a' |
| 61 |
unlock tables; |
| 62 |
disconnect con_c; |
| 63 |
connection con_d; |
| 64 |
ERROR 23000: Duplicate entry '5' for key 'a' |
| 65 |
unlock tables; |
| 66 |
disconnect con_d; |
| 67 |
connection default; |
| 68 |
check table t1; |
| 69 |
Table Op Msg_type Msg_text |
| 70 |
test.t1 check status OK |
| 71 |
drop table t1; |