Debian Codegraph @

mysql-test/suite/rpl_gtid/r/rpl_replication_observers_example_is_stopping.result

raw
1 include/have_replication_observers_example_plugin.inc
2 include/master-slave.inc
3 Warnings:
4 Note #### Sending passwords in plain text without SSL/TLS is extremely insecure.
5 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.
6 [connection master]
7
8 ############################################################
9 # 1. Install the plug-in and add error suppressions on slave
10 [connection master]
11 SET SESSION sql_log_bin= 0;
12 CALL mtr.add_suppression(".*Cannot replicate.*purged required binary logs.*");
13 SET SESSION sql_log_bin= 1;
14 [connection slave]
15 SET SESSION sql_log_bin= 0;
16 CALL mtr.add_suppression("Table 't1' already exists");
17 CALL mtr.add_suppression("Got fatal error 1236 from source when reading data from binary log");
18 SET SESSION sql_log_bin= 1;
19 include/install_replication_observers_example.inc
20
21 ####################################################################
22 # 2. Create a table on master and generate workload to be replicated
23 [connection master]
24 CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY) ENGINE=InnoDB;
25 INSERT INTO t1 VALUES (1);
26
27 ########################################
28 # 3. Create the example_channel on slave
29 [connection slave]
30 CHANGE REPLICATION SOURCE TO SOURCE_HOST='127.0.0.1', SOURCE_PORT=MASTER_MYPORT, SOURCE_USER='root', SOURCE_AUTO_POSITION=1 FOR CHANNEL 'example_channel';
31 Warnings:
32 Note 1759 Sending passwords in plain text without SSL/TLS is extremely insecure.
33 Note 1760 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.
34
35 #######################
36 # 4. SQL thread testing
37
38 #################################################
39 # 4.1 Prepare SQL thread to fail after started up
40 SET SESSION sql_log_bin= 0;
41 CREATE TABLE t1 (c1 INT NOT NULL PRIMARY KEY) ENGINE=InnoDB;
42 SET SESSION sql_log_bin= 1;
43 # Adding debug point 'validate_replication_observers_plugin_server_is_sql_stopping' to @@GLOBAL.debug
44 # Adding debug point 'pause_after_sql_thread_stop_hook' to @@GLOBAL.debug
45 [connection slave1]
46 SET SESSION sql_log_bin= 0;
47 INSERT INTO t1 VALUES (0);
48
49 #########################################################
50 # 4.2 Wait until SQL thread failed trying to apply events
51 [connection slave]
52 SET DEBUG_SYNC='now WAIT_FOR reached_sql_thread_started';
53 include/wait_for_slave_sql_error.inc [errno=1050 FOR CHANNEL 'example_channel']
54 # Removing debug point 'pause_after_sql_thread_stop_hook' from @@GLOBAL.debug
55 # Removing debug point 'validate_replication_observers_plugin_server_is_sql_stopping' from @@GLOBAL.debug
56 [connection slave1]
57 SET SESSION sql_log_bin= 1;
58 include/stop_slave.inc [FOR CHANNEL 'example_channel']
59 RESET SLAVE FOR CHANNEL 'example_channel';
60 Warnings:
61 Warning 1287 'RESET SLAVE' is deprecated and will be removed in a future release. Please use RESET REPLICA instead
62
63 #######################
64 # 5. I/O thread testing
65
66 ##########################################################################
67 # 5.1 Rotate and purge the binary log on master to make I/O thread to fail
68 [connection master]
69 FLUSH BINARY LOGS;
70 include/stop_dump_threads.inc
71
72 #################################################
73 # 5.2 Prepare I/O thread to fail after started up
74 [connection slave]
75 # Adding debug point 'validate_replication_observers_plugin_server_is_io_stopping' to @@GLOBAL.debug
76 # Adding debug point 'pause_after_io_thread_stop_hook' to @@GLOBAL.debug
77 [connection slave1]
78 SET SESSION sql_log_bin= 0;
79 INSERT INTO t1 VALUES (1);
80
81 ###########################################################
82 # 5.3 Wait until I/O thread failed to replicate from master
83 [connection slave]
84 SET DEBUG_SYNC='now WAIT_FOR reached_io_thread_started';
85 include/wait_for_slave_io_error.inc [errno=13114 FOR CHANNEL 'example_channel']
86 # Removing debug point 'pause_after_io_thread_stop_hook' from @@GLOBAL.debug
87 # Removing debug point 'validate_replication_observers_plugin_server_is_io_stopping' from @@GLOBAL.debug
88 [connection slave1]
89 DROP TABLE t1;
90 SET SESSION sql_log_bin= 1;
91
92 ############
93 # 6. Cleanup
94 [connection slave]
95 RESET SLAVE ALL FOR CHANNEL 'example_channel';
96 Warnings:
97 Warning 1287 'RESET SLAVE' is deprecated and will be removed in a future release. Please use RESET REPLICA instead
98 include/uninstall_replication_observers_example.inc
99 [connection master]
100 DROP TABLE t1;
101 RESET MASTER;
102 [connection slave]
103 include/start_slave.inc
104 include/rpl_end.inc