Debian Codegraph @

mysql-test/suite/rpl/r/rpl_crash_safe_master.result

raw
1 include/master-slave.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 master]
6 include/stop_slave.inc
7 RESET MASTER;
8 include/start_slave.inc
9 call mtr.add_suppression("Attempting backtrace");
10 call mtr.add_suppression("allocated tablespace *., old maximum was 0");
11 call mtr.add_suppression("Error in Log_event::read_log_event()");
12 call mtr.add_suppression("Buffered warning: Performance schema disabled");
13 CREATE TABLE t1(a LONGBLOB) ENGINE=INNODB;
14 # Test case1: Set DEBUG POINT before binlog to make
15 # the master crash for transaction
16 # Lets stop the slave IO thread first, so that it does not timeout on
17 # reconnection while the master is down (it happened before on some
18 # slow hosts).
19 include/sync_slave_sql_with_master.inc
20 include/stop_slave_io.inc
21 BEGIN;
22 INSERT INTO t1 (a) VALUES (REPEAT('a',2));
23 INSERT INTO t1 (a) VALUES (REPEAT('a',2));
24 INSERT INTO t1 (a) VALUES (REPEAT('a',2));
25 COMMIT;
26 ERROR HY000: Lost connection to MySQL server during query
27 # Restart the master server
28 # Test the transaction statements will not be binlogged
29 include/show_binlog_events.inc
30 Log_name Pos Event_type Server_id End_log_pos Info
31 master-bin.000001 # Query # # use `test`; CREATE TABLE t1(a LONGBLOB) ENGINE=INNODB
32 include/assert.inc [On master, test the data will be rolled back after restart.]
33 # lets restart the slave io thread and check that
34 # the slave gets synchronized again
35 include/start_slave_io.inc
36 include/sync_slave_sql_with_master.inc
37 # On slave, test replication will work fine, and the data
38 # is not replicated
39 include/diff_tables.inc [master:test.t1, slave:test.t1]
40 # Test case2: Set DEBUG POINT after binlog, and before the date
41 # is committed to make crash for transaction
42 # Lets stop the slave IO thread first, so that it does not timeout on
43 # reconnection while the master is down (it happened before on some
44 # slow hosts).
45 include/sync_slave_sql_with_master.inc
46 include/stop_slave_io.inc
47 BEGIN;
48 INSERT INTO t1 (a) VALUES (REPEAT('a',2));
49 INSERT INTO t1 (a) VALUES (REPEAT('a',2));
50 INSERT INTO t1 (a) VALUES (REPEAT('a',2));
51 COMMIT;
52 ERROR HY000: Lost connection to MySQL server during query
53 # Restart the master server
54 # Test the transaction statements will be binlogged
55 include/show_binlog_events.inc
56 Log_name Pos Event_type Server_id End_log_pos Info
57 master-bin.000002 # Query # # BEGIN
58 master-bin.000002 # Table_map # # table_id: # (test.t1)
59 master-bin.000002 # Write_rows # # table_id: # flags: STMT_END_F
60 master-bin.000002 # Table_map # # table_id: # (test.t1)
61 master-bin.000002 # Write_rows # # table_id: # flags: STMT_END_F
62 master-bin.000002 # Table_map # # table_id: # (test.t1)
63 master-bin.000002 # Write_rows # # table_id: # flags: STMT_END_F
64 master-bin.000002 # Xid # # COMMIT /* XID */
65 include/assert.inc [On master, test the data will be recovered after the master restart.]
66 # lets restart the slave io thread and check that
67 # the slave gets synchronized again
68 include/start_slave_io.inc
69 include/sync_slave_sql_with_master.inc
70 # On slave, test replication will work fine, and the data is replicated
71 include/diff_tables.inc [master:test.t1, slave:test.t1]
72 DROP TABLE t1;
73 include/sync_slave_sql_with_master.inc
74 include/stop_slave.inc
75 CREATE TABLE t1(a LONGBLOB) ENGINE=INNODB;
76 # Test case3: Set DEBUG POINT in the middle of binlog to
77 # make the master crash for transaction.
78 BEGIN;
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 INSERT INTO t1 (a) VALUES (REPEAT('a',6144));
101 INSERT INTO t1 (a) VALUES (REPEAT('a',6144));
102 INSERT INTO t1 (a) VALUES (REPEAT('a',6144));
103 COMMIT;
104 ERROR HY000: Lost connection to MySQL server during query
105 # Restart the master server
106 # Test the halfly binlogged transaction will be trimmed
107 # from the crashed binlog file
108 include/show_binlog_events.inc
109 Log_name Pos Event_type Server_id End_log_pos Info
110 master-bin.000003 # Query # # use `test`; CREATE TABLE t1(a LONGBLOB) ENGINE=INNODB
111 # Test the data will not be recovered successfully
112 # after the master restart.
113 SELECT COUNT(*) FROM t1;
114 COUNT(*)
115 0
116 DROP TABLE t1;
117 CHANGE REPLICATION SOURCE TO SOURCE_AUTO_POSITION= 0;