summaryrefslogtreecommitdiff
path: root/mysql-test/suite/rpl/r/rpl_row_binlog_max_cache_size.result
blob: f04c229a9b6c44db91e3bc3efed24c265e5b11f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
stop slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
SET GLOBAL max_binlog_cache_size = 4096;
SET GLOBAL binlog_cache_size = 4096;
SET GLOBAL max_binlog_stmt_cache_size = 4096;
SET GLOBAL binlog_stmt_cache_size = 4096;
CREATE TABLE t1(a INT PRIMARY KEY, data VARCHAR(30000)) ENGINE=Innodb;
CREATE TABLE t2(a INT PRIMARY KEY, data VARCHAR(30000)) ENGINE=MyIsam;
CREATE TABLE t3(a INT PRIMARY KEY, data VARCHAR(30000)) ENGINE=Innodb;
########################################################################################
#                                   1 - SINGLE STATEMENT
########################################################################################
*** Single statement on transactional table ***
Got one of the listed errors
*** Single statement on non-transactional table ***
Got one of the listed errors
--source include/wait_for_slave_sql_error_and_skip.inc
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
include/start_slave.inc
*** Single statement on both transactional and non-transactional tables. ***
Got one of the listed errors
--source include/wait_for_slave_sql_error_and_skip.inc
SET GLOBAL SQL_SLAVE_SKIP_COUNTER= 2;
include/start_slave.inc
########################################################################################
#                             2 - BEGIN - IMPLICIT COMMIT by DDL
########################################################################################
TRUNCATE TABLE t1;
TRUNCATE TABLE t2;
TRUNCATE TABLE t3;
BEGIN;
Got one of the listed errors
Got one of the listed errors
Got one of the listed errors
BEGIN;
Got one of the listed errors
Got one of the listed errors
Got one of the listed errors
BEGIN;
Got one of the listed errors
Got one of the listed errors
source include/diff_master_slave.inc;
########################################################################################
#                                     3 - BEGIN - COMMIT
########################################################################################
TRUNCATE TABLE t1;
TRUNCATE TABLE t2;
TRUNCATE TABLE t3;
BEGIN;
Got one of the listed errors
Got one of the listed errors
Got one of the listed errors
COMMIT;
source include/diff_master_slave.inc;
########################################################################################
#                                      4 - BEGIN - ROLLBACK
########################################################################################
TRUNCATE TABLE t1;
TRUNCATE TABLE t2;
TRUNCATE TABLE t3;
BEGIN;
Got one of the listed errors
Got one of the listed errors
Got one of the listed errors
ROLLBACK;
Warnings:
Warning	1196	Some non-transactional changed tables couldn't be rolled back
source include/diff_master_slave.inc;
########################################################################################
#                                         5 - PROCEDURE 
########################################################################################
TRUNCATE TABLE t1;
TRUNCATE TABLE t2;
TRUNCATE TABLE t3;
CREATE PROCEDURE p1(pd VARCHAR(30000))
BEGIN
INSERT INTO t1 (a, data) VALUES (1, pd);
INSERT INTO t1 (a, data) VALUES (2, pd);
INSERT INTO t1 (a, data) VALUES (3, pd);
INSERT INTO t1 (a, data) VALUES (4, pd);
INSERT INTO t1 (a, data) VALUES (5, 's');
END//
TRUNCATE TABLE t1;
TRUNCATE TABLE t1;
BEGIN;
Got one of the listed errors
COMMIT;
TRUNCATE TABLE t1;
BEGIN;
Got one of the listed errors
ROLLBACK;
source include/diff_master_slave.inc;
########################################################################################
#                                           6 - XID
########################################################################################
TRUNCATE TABLE t1;
TRUNCATE TABLE t2;
TRUNCATE TABLE t3;
BEGIN;
Got one of the listed errors
Got one of the listed errors
Got one of the listed errors
ROLLBACK TO sv;
Warnings:
Warning	1196	Some non-transactional changed tables couldn't be rolled back
COMMIT;
source include/diff_master_slave.inc;
########################################################################################
#                                        7 - NON-TRANS TABLE
########################################################################################
TRUNCATE TABLE t1;
TRUNCATE TABLE t2;
TRUNCATE TABLE t3;
BEGIN;
Got one of the listed errors
Got one of the listed errors
Got one of the listed errors
COMMIT;
BEGIN;
Got one of the listed errors
COMMIT;
source include/diff_master_slave.inc;
########################################################################
#      8 - Bug#55375(Regression Bug) Transaction bigger than
#          max_binlog_cache_size crashes slave
########################################################################
# [ On Slave ]
SET GLOBAL max_binlog_cache_size = 4096;
SET GLOBAL binlog_cache_size = 4096;
SET GLOBAL max_binlog_stmt_cache_size = 4096;
SET GLOBAL binlog_stmt_cache_size = 4096;
include/stop_slave.inc
include/start_slave.inc
CALL mtr.add_suppression("Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage.*");
CALL mtr.add_suppression("Multi-statement transaction required more than 'max_binlog_stmt_cache_size' bytes of storage.*");
CALL mtr.add_suppression("Writing one row to the row-based binary log failed.*");
TRUNCATE t1;
SET GLOBAL max_binlog_cache_size= ORIGINAL_VALUE;
SET GLOBAL binlog_cache_size= ORIGINAL_VALUE;
SET GLOBAL max_binlog_stmt_cache_size= ORIGINAL_VALUE;
SET GLOBAL binlog_stmt_cache_size= ORIGINAL_VALUE;
BEGIN;
Repeat statement 'INSERT INTO t1 VALUES($n, repeat("a", 32))' 128 times
COMMIT;
SELECT count(*) FROM t1;
count(*)
0
show binlog events in 'slave-bin.000001' from <binlog_start>;
Log_name	Pos	Event_type	Server_id	End_log_pos	Info
SET GLOBAL max_binlog_cache_size= ORIGINAL_VALUE;
SET GLOBAL binlog_cache_size= ORIGINAL_VALUE;
SET GLOBAL max_binlog_stmt_cache_size= ORIGINAL_VALUE;
SET GLOBAL binlog_stmt_cache_size= ORIGINAL_VALUE;
include/stop_slave.inc
include/start_slave.inc
SELECT count(*) FROM t1;
count(*)
128
########################################################################################
#                                        CLEAN
########################################################################################
DROP TABLE t1;
DROP TABLE t2;
DROP TABLE t3;
DROP TABLE IF EXISTS t4;
Warnings:
Note	1051	Unknown table 't4'
DROP TABLE IF EXISTS t5;
DROP TABLE IF EXISTS t6;
Warnings:
Note	1051	Unknown table 't6'
DROP PROCEDURE p1;