Debian Codegraph @

mysql-test/suite/galera/r/galera_bf_abort_ps_bind.result

raw
1 connection node_2;
2 connection node_1;
3 CREATE TABLE t (i int primary key auto_increment, j varchar(20) character set utf8);
4 connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
5 connection node_1a;
6 SET SESSION wsrep_sync_wait = 0;
7 connection node_1;
8 insert into t values (1, 'first');
9 PS_prepare INSERT INTO t(j) VALUES (?);;
10 PS_bind node1;
11 PS_execute;
12 PS_execute;
13 select * from t;
14 i j
15 1 first
16 3 node1
17 5 node1
18 PS_close;
19 PS_prepare INSERT INTO t(j) VALUES (?);;
20 PS_bind node1;
21 begin;
22 update t set j='node1' where i=1;
23 connection node_2;
24 update t set j='node2' where i=1;
25 connection node_1a;
26 connection node_1;
27 PS_execute;
28 ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
29 PS_execute;
30 commit;
31 PS_close;
32 select * from t;
33 i j
34 1 node2
35 3 node1
36 5 node1
37 7 node1
38 drop table t;