Debian Codegraph @

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

raw
1 connection node_2;
2 connection node_1;
3 CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 int, f3 int, unique key keyj (f2));
4 INSERT INTO t1 VALUES (1, 1, 0);
5 INSERT INTO t1 VALUES (3, 3, 0);
6 INSERT INTO t1 VALUES (10, 10, 0);
7 SET GLOBAL wsrep_slave_threads = 3;
8 SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_apply_cb";
9 connection node_1;
10 SET SESSION wsrep_sync_wait=0;
11 START TRANSACTION;
12 DELETE FROM t1 WHERE f2 = 3;
13 INSERT INTO t1 VALUES (3, 3, 1);
14 connect node_1a, 127.0.0.1, root, , test, $NODE_MYPORT_1;
15 connection node_1a;
16 SET SESSION wsrep_sync_wait=0;
17 connection node_2;
18 INSERT INTO t1 VALUES (5, 5, 2);
19 connection node_1a;
20 SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached";
21 SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
22 connection node_2;
23 INSERT INTO t1 VALUES (4, 4, 2);
24 connection node_1a;
25 SET SESSION wsrep_on = 0;
26 SET SESSION wsrep_on = 1;
27 SET GLOBAL wsrep_provider_options = 'dbug=';
28 SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_master_enter_sync';
29 connection node_1;
30 COMMIT;
31 connection node_1a;
32 SET SESSION wsrep_on = 0;
33 SET SESSION wsrep_on = 1;
34 SET GLOBAL wsrep_provider_options = 'dbug=';
35 SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_master_enter_sync';
36 SET GLOBAL wsrep_provider_options = 'dbug=';
37 SET GLOBAL DEBUG_DBUG = "";
38 SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
39 SET GLOBAL debug_dbug = NULL;
40 SET debug_sync='RESET';
41 SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_apply_cb";
42 SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
43 SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_apply_cb_reached";
44 SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_slave_enter_sync';
45 SET GLOBAL wsrep_provider_options = 'dbug=';
46 SET GLOBAL DEBUG_DBUG = "";
47 SET DEBUG_SYNC = "now SIGNAL signal.wsrep_apply_cb";
48 SET GLOBAL debug_dbug = NULL;
49 SET debug_sync='RESET';
50 SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_slave_enter_sync';
51 SET GLOBAL wsrep_provider_options = 'dbug=';
52 connection node_1;
53 SELECT * FROM t1;
54 f1 f2 f3
55 1 1 0
56 3 3 1
57 4 4 2
58 5 5 2
59 10 10 0
60 SET GLOBAL wsrep_slave_threads = DEFAULT;
61 connection node_2;
62 SELECT * FROM t1;
63 f1 f2 f3
64 1 1 0
65 3 3 1
66 4 4 2
67 5 5 2
68 10 10 0
69 INSERT INTO t1 VALUES (7,7,7);
70 INSERT INTO t1 VALUES (8,8,8);
71 SELECT COUNT(*) FROM t1;
72 COUNT(*)
73 7
74 SELECT * FROM t1;
75 f1 f2 f3
76 1 1 0
77 3 3 1
78 4 4 2
79 5 5 2
80 7 7 7
81 8 8 8
82 10 10 0
83 connection node_1;
84 SELECT COUNT(*) FROM t1;
85 COUNT(*)
86 7
87 SELECT * FROM t1;
88 f1 f2 f3
89 1 1 0
90 3 3 1
91 4 4 2
92 5 5 2
93 7 7 7
94 8 8 8
95 10 10 0
96 DROP TABLE t1;
97 test scenario 2
98 connection node_1;
99 CREATE TABLE t1 (f1 INTEGER PRIMARY KEY, f2 int, f3 int, unique key keyj (f2));
100 INSERT INTO t1 VALUES (1, 1, 0);
101 INSERT INTO t1 VALUES (3, 3, 0);
102 INSERT INTO t1 VALUES (10, 10, 0);
103 SET GLOBAL wsrep_slave_threads = 3;
104 SET GLOBAL wsrep_provider_options = 'dbug=d,apply_monitor_slave_enter_sync';
105 connection node_1;
106 SET SESSION wsrep_sync_wait=0;
107 START TRANSACTION;
108 DELETE FROM t1 WHERE f2 = 3;
109 INSERT INTO t1 VALUES (3, 3, 1);
110 connection node_1a;
111 SET SESSION wsrep_sync_wait=0;
112 connection node_2;
113 INSERT INTO t1 VALUES (5, 5, 2);
114 connection node_1a;
115 SET SESSION wsrep_on = 0;
116 SET SESSION wsrep_on = 1;
117 SET GLOBAL wsrep_provider_options = 'dbug=';
118 SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_master_enter_sync';
119 connection node_1;
120 COMMIT;
121 connection node_1a;
122 SET SESSION wsrep_on = 0;
123 SET SESSION wsrep_on = 1;
124 SET GLOBAL wsrep_provider_options = 'dbug=';
125 SET GLOBAL DEBUG_DBUG = "d,sync.wsrep_replay_cb";
126 SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_master_enter_sync';
127 SET GLOBAL wsrep_provider_options = 'dbug=';
128 SET GLOBAL wsrep_provider_options = 'signal=apply_monitor_slave_enter_sync';
129 SET GLOBAL wsrep_provider_options = 'dbug=';
130 SET SESSION DEBUG_SYNC = "now WAIT_FOR sync.wsrep_replay_cb_reached";
131 SET GLOBAL wsrep_provider_options = 'dbug=d,commit_monitor_slave_enter_sync';
132 connection node_2;
133 INSERT INTO t1 VALUES (4, 4, 2);
134 connection node_1a;
135 SET SESSION wsrep_on = 0;
136 SET SESSION wsrep_on = 1;
137 SET GLOBAL wsrep_provider_options = 'dbug=';
138 SET GLOBAL wsrep_provider_options = 'signal=commit_monitor_slave_enter_sync';
139 SET GLOBAL wsrep_provider_options = 'dbug=';
140 SET GLOBAL DEBUG_DBUG = "";
141 SET DEBUG_SYNC = "now SIGNAL signal.wsrep_replay_cb";
142 SET GLOBAL debug_dbug = NULL;
143 SET debug_sync='RESET';
144 connection node_1;
145 SET GLOBAL wsrep_slave_threads = DEFAULT;
146 connection node_2;
147 SELECT * FROM t1;
148 f1 f2 f3
149 1 1 0
150 3 3 1
151 4 4 2
152 5 5 2
153 10 10 0
154 INSERT INTO t1 VALUES (7,7,7);
155 INSERT INTO t1 VALUES (8,8,8);
156 SELECT COUNT(*) FROM t1;
157 COUNT(*)
158 7
159 SELECT * FROM t1;
160 f1 f2 f3
161 1 1 0
162 3 3 1
163 4 4 2
164 5 5 2
165 7 7 7
166 8 8 8
167 10 10 0
168 connection node_1;
169 SELECT COUNT(*) FROM t1;
170 COUNT(*)
171 7
172 SELECT * FROM t1;
173 f1 f2 f3
174 1 1 0
175 3 3 1
176 4 4 2
177 5 5 2
178 7 7 7
179 8 8 8
180 10 10 0
181 DROP TABLE t1;