Debian Codegraph @

mysql-test/suite/rpl_gtid/r/rpl_delayed_slave.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 call mtr.add_suppression("Unsafe statement written to the binary log using statement format");
7 call mtr.add_suppression("Unsafe statement written to the binary log using statement format");
8 [on master]
9 CREATE TABLE t1 (a VARCHAR(100), b INT);
10 INSERT INTO t1 VALUES ("zero", 0);
11 ==== Normal setup ====
12 [on slave]
13 include/sync_slave_sql_with_master.inc
14 include/stop_slave.inc
15 include/start_slave.inc
16 include/assert.inc [SHOW SLAVE STATUS should return the same delay that we set with CHANGE MASTER]
17 [on master]
18 INSERT INTO t1 VALUES ('normal setup', 1);
19 [connection slave]
20 include/assert.inc [Assert that the REMAINING_DELAY from performance_schema is same as SQL_Remaining_Delay in the output of show slave status.]
21 [connection master]
22 include/sync_slave_sql_with_master.inc
23 include/assert.inc [Status should not be 'Waiting until SOURCE_DELAY seconds after source executed event']
24 [connection master]
25 [connection slave]
26 include/assert.inc [The difference between the immediate_commit_timestamp should be at least the SQL_Delay]
27 [connection master]
28 ==== Slave lags "naturally" after master ====
29 [on master]
30 # CREATE FUNCTION delay_on_slave(time_units INT) RETURNS INT BEGIN IF @@server_id = 2 THEN RETURN SLEEP(time_units * T); ELSE RETURN 0; END IF; END
31 INSERT INTO t1 SELECT delay_on_slave(3), 2;
32 Warnings:
33 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the replica.
34 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
35 [connection slave]
36 include/assert.inc [Assert that the REMAINING_DELAY from performance_schema is same as SQL_Remaining_Delay in the output of show slave status.]
37 [connection master]
38 include/sync_slave_sql_with_master.inc
39 include/assert.inc [Status should not be 'Waiting until SOURCE_DELAY seconds after source executed event']
40 [connection master]
41 [connection slave]
42 include/assert.inc [The difference between the immediate_commit_timestamp should be at least the SQL_Delay]
43 [connection master]
44 INSERT INTO t1 VALUES ('slave is already lagging: this statement should execute immediately', 3);
45 [connection slave]
46 include/assert.inc [Assert that the REMAINING_DELAY from performance_schema is same as SQL_Remaining_Delay in the output of show slave status.]
47 [connection master]
48 include/sync_slave_sql_with_master.inc
49 include/assert.inc [Status should not be 'Waiting until SOURCE_DELAY seconds after source executed event']
50 [connection master]
51 [connection slave]
52 include/assert.inc [The difference between the immediate_commit_timestamp should be at least the SQL_Delay]
53 [connection master]
54 INSERT INTO t1 SELECT delay_on_slave(2), 4;
55 Warnings:
56 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system variable that may have a different value on the replica.
57 Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the replica.
58 [connection slave]
59 include/assert.inc [Assert that the REMAINING_DELAY from performance_schema is same as SQL_Remaining_Delay in the output of show slave status.]
60 [connection master]
61 include/sync_slave_sql_with_master.inc
62 include/assert.inc [Status should not be 'Waiting until SOURCE_DELAY seconds after source executed event']
63 [connection master]
64 [connection slave]
65 include/assert.inc [The difference between the immediate_commit_timestamp should be at least the SQL_Delay]
66 [connection master]
67 ==== STOP SLAVE / START SLAVE + DML ====
68 [connection slave]
69 include/stop_slave.inc
70 include/start_slave.inc
71 [on master]
72 INSERT INTO t1 VALUES ('stop slave and start slave: DML', 5);
73 [on slave]
74 include/stop_slave.inc
75 include/assert.inc [SQL thread position should not increase after STOP SLAVE]
76 include/assert.inc [Query should not be executed after STOP SLAVE]
77 include/assert.inc [Status should be '' after STOP SLAVE]
78 include/start_slave.inc
79 [connection master]
80 [connection slave]
81 include/assert.inc [Assert that the REMAINING_DELAY from performance_schema is same as SQL_Remaining_Delay in the output of show slave status.]
82 [connection master]
83 include/sync_slave_sql_with_master.inc
84 include/assert.inc [Status should not be 'Waiting until SOURCE_DELAY seconds after source executed event']
85 [connection master]
86 [connection slave]
87 include/assert.inc [The difference between the immediate_commit_timestamp should be at least the SQL_Delay]
88 [connection master]
89 ==== STOP SLAVE / START SLAVE + DDL ====
90 This verifies BUG#56442
91 [on master]
92 CREATE TABLE t_check_dml_not_executed_prematurely (a INT);
93 include/save_master_pos.inc
94 [on slave]
95 include/stop_slave.inc
96 include/assert.inc [SQL thread position should not increase after STOP SLAVE]
97 include/assert.inc [Query should not be executed after STOP SLAVE]
98 include/assert.inc [Status should be '' after STOP SLAVE]
99 include/start_slave.inc
100 [connection master]
101 [connection slave]
102 include/assert.inc [Assert that the REMAINING_DELAY from performance_schema is same as SQL_Remaining_Delay in the output of show slave status.]
103 [connection master]
104 include/sync_slave_sql_with_master.inc
105 include/assert.inc [Status should not be 'Waiting until SOURCE_DELAY seconds after source executed event']
106 [connection master]
107 [connection slave]
108 include/assert.inc [The difference between the immediate_commit_timestamp should be at least the SQL_Delay]
109 [connection master]
110 [connection slave]
111 include/assert.inc [DDL Query should be executed]
112 include/check_slave_is_running.inc
113 ==== Change back to no delay ====
114 [on slave]
115 include/stop_slave.inc
116 CHANGE REPLICATION SOURCE TO SOURCE_DELAY = 0;
117 include/assert.inc [Delay should be 0 when we set it to 0]
118 ==== Reset delay with RESET SLAVE ====
119 CHANGE REPLICATION SOURCE TO SOURCE_DELAY = 71;
120 include/start_slave.inc
121 include/assert.inc [Delay should be 71 when we set it to 71]
122 include/stop_slave.inc
123 RESET SLAVE;
124 Warnings:
125 Warning 1287 'RESET SLAVE' is deprecated and will be removed in a future release. Please use RESET REPLICA instead
126 include/start_slave.inc
127 include/assert.inc [Delay should be 0 after RESET SLAVE]
128 ==== Set an invalid value for the delay ====
129 include/stop_slave.inc
130 # Expect error for setting negative delay
131 CHANGE REPLICATION SOURCE TO SOURCE_DELAY = -1;
132 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-1' at line 1
133 # Expect that it's ok to set delay of 2^31-1
134 CHANGE REPLICATION SOURCE TO SOURCE_DELAY = 2147483647;
135 # Expect error for setting delay between 2^31 and 2^32-1
136 CHANGE REPLICATION SOURCE TO SOURCE_DELAY = 2147483648;
137 ERROR HY000: The requested value 2147483648 for the source delay exceeds the maximum 2147483647
138 # Expect error for setting delay to nonsense
139 CHANGE REPLICATION SOURCE TO SOURCE_DELAY = blah;
140 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'blah' at line 1
141 CHANGE REPLICATION SOURCE TO SOURCE_DELAY = 0;
142 include/start_slave.inc
143 ==== Clean up ====
144 [on master]
145 DROP TABLE t1, t_check_dml_not_executed_prematurely;
146 DROP FUNCTION delay_on_slave;
147 [on slave]
148 include/sync_slave_sql_with_master.inc
149 include/rpl_end.inc