Debian Codegraph @

mysql-test/suite/group_replication/r/gr_crash_safe_master.result

raw
1 include/group_replication.inc
2 Warnings:
3 Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
4 Note #### Storing MySQL user name or password information in the connection metadata repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START REPLICA; see the 'START REPLICA Syntax' in the MySQL Manual for more information.
5 [connection server1]
6 SET sql_log_bin=0;
7 call mtr.add_suppression("Attempting backtrace");
8 call mtr.add_suppression("allocated tablespace *., old maximum was 0");
9 call mtr.add_suppression("Error in Log_event::read_log_event()");
10 call mtr.add_suppression("Buffered warning: Performance schema disabled");
11 SET sql_log_bin=1;
12 # Test case1: Set DEBUG POINT before binlog to make
13 # the first member crash for transaction
14 CREATE TABLE t1(i INT, a LONGBLOB, PRIMARY KEY(i)) ENGINE=INNODB;
15 BEGIN;
16 INSERT INTO t1 VALUES (3, REPEAT('a',2));;
17 INSERT INTO t1 VALUES (2, REPEAT('a',2));;
18 INSERT INTO t1 VALUES (1, REPEAT('a',2));;
19 COMMIT;
20 ERROR HY000: Lost connection to MySQL server during query
21 # Restart the crashed member
22 include/rpl_reconnect.inc
23 include/assert.inc [On server1, test the data will be rolled back after restart.]
24 include/rpl_sync.inc
25 # On the second member, test replication will work fine, and the data
26 # is not replicated
27 include/diff_tables.inc [server1:test.t1, server2:test.t1]
28 [connection server2]
29 include/gr_wait_for_member_state.inc
30 include/rpl_gr_wait_for_number_of_members.inc
31 [connection server1]
32 include/start_group_replication.inc
33 CREATE TABLE temp (i INT PRIMARY KEY) engine=INNODB;
34 INSERT INTO temp VALUES (1);
35 include/rpl_sync.inc
36 INSERT INTO temp VALUES (2);
37 include/rpl_sync.inc
38 include/diff_tables.inc [server1:test.temp, server2:test.temp]
39 DROP TABLE t1;
40 DROP TABLE temp;
41 include/rpl_sync.inc
42 # Test case2: Set DEBUG POINT after binlog, and before the data
43 # is committed to make crash for transaction
44 CREATE TABLE t1(i INT, a LONGBLOB, PRIMARY KEY(i)) ENGINE=INNODB;
45 BEGIN;
46 INSERT INTO t1 VALUES (3, REPEAT('a',2));;
47 INSERT INTO t1 VALUES (2, REPEAT('a',2));;
48 INSERT INTO t1 VALUES (1, REPEAT('a',2));;
49 COMMIT;
50 ERROR HY000: Lost connection to MySQL server during query
51 # Restart the crashed member
52 include/rpl_reconnect.inc
53 include/assert.inc [On server1, test the data will be recovered after the server1 restart.]
54 # On the second member, test that the replication is working fine, and
55 # data gets replicated here.
56 include/diff_tables.inc [server1:test.t1, server2:test.t1]
57 [connection server2]
58 include/gr_wait_for_member_state.inc
59 include/rpl_gr_wait_for_number_of_members.inc
60 [connection server1]
61 include/start_group_replication.inc
62 CREATE TABLE temp (i INT PRIMARY KEY) engine=INNODB;
63 INSERT INTO temp VALUES (1);
64 include/rpl_sync.inc
65 INSERT INTO temp VALUES (2);
66 include/rpl_sync.inc
67 include/diff_tables.inc [server1:test.temp, server2:test.temp]
68 DROP TABLE t1;
69 DROP TABLE temp;
70 include/rpl_sync.inc
71 CREATE TABLE t1(i INT AUTO_INCREMENT PRIMARY KEY, a LONGBLOB) ENGINE=INNODB;
72 # Test case3: Set DEBUG POINT after binlogging half of the transaction and
73 # then crash the member and followed by restarting the member.
74 set AUTOCOMMIT=0;
75 BEGIN;
76 INSERT INTO t1 (a) VALUES ( REPEAT('a',6144));
77 INSERT INTO t1 (a) VALUES ( REPEAT('a',6144));
78 INSERT INTO t1 (a) VALUES ( REPEAT('a',6144));
79 INSERT INTO t1 (a) VALUES ( REPEAT('a',6144));
80 INSERT INTO t1 (a) VALUES ( REPEAT('a',6144));
81 INSERT INTO t1 (a) VALUES ( REPEAT('a',6144));
82 INSERT INTO t1 (a) VALUES ( REPEAT('a',6144));
83 INSERT INTO t1 (a) VALUES ( REPEAT('a',6144));
84 INSERT INTO t1 (a) VALUES ( REPEAT('a',6144));
85 INSERT INTO t1 (a) VALUES ( REPEAT('a',6144));
86 INSERT INTO t1 (a) VALUES ( REPEAT('a',6144));
87 INSERT INTO t1 (a) VALUES ( REPEAT('a',6144));
88 INSERT INTO t1 (a) VALUES ( REPEAT('a',6144));
89 INSERT INTO t1 (a) VALUES ( REPEAT('a',6144));
90 INSERT INTO t1 (a) VALUES ( REPEAT('a',6144));
91 INSERT INTO t1 (a) VALUES ( REPEAT('a',6144));
92 INSERT INTO t1 (a) VALUES ( REPEAT('a',6144));
93 INSERT INTO t1 (a) VALUES ( REPEAT('a',6144));
94 INSERT INTO t1 (a) VALUES ( REPEAT('a',6144));
95 INSERT INTO t1 (a) VALUES ( REPEAT('a',6144));
96 INSERT INTO t1 (a) VALUES ( REPEAT('a',6144));
97 INSERT INTO t1 (a) VALUES ( REPEAT('a',6144));
98 INSERT INTO t1 (a) VALUES ( REPEAT('a',6144));
99 INSERT INTO t1 (a) VALUES ( REPEAT('a',6144));
100 COMMIT;
101 ERROR HY000: Lost connection to MySQL server during query
102 # Restart the crashed member
103 include/rpl_reconnect.inc
104 # Test the data will not be recovered successfully
105 # after the crashed first member restarts.
106 include/assert.inc [On server1, test the data will be recovered after the server1 restart.]
107 [connection server2]
108 include/gr_wait_for_member_state.inc
109 include/rpl_gr_wait_for_number_of_members.inc
110 [connection server1]
111 include/start_group_replication.inc
112 include/diff_tables.inc [server1:test.t1, server2:test.t1]
113 include/assert.inc [The table has 24 rows after the restart.]
114 CREATE TABLE temp (i INT PRIMARY KEY) engine=INNODB;
115 INSERT INTO temp VALUES (1);
116 include/rpl_sync.inc
117 INSERT INTO temp VALUES (2);
118 include/rpl_sync.inc
119 include/diff_tables.inc [server1:test.temp, server2:test.temp]
120 DROP TABLE t1;
121 DROP TABLE temp;
122 include/group_replication_end.inc