1include/master-slave.inc
2Warnings:
3Note	####	Sending passwords in plain text without SSL/TLS is extremely insecure.
4Note	####	Storing MySQL user name or password information in the master info repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START SLAVE; see the 'START SLAVE Syntax' in the MySQL Manual for more information.
5[connection master]
6call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
7call mtr.add_suppression("Option binlog_cache_size ");
8SET GLOBAL max_binlog_cache_size = 4096;
9Warnings:
10Warning	1738	Option binlog_cache_size (32768) is greater than max_binlog_cache_size (4096); setting binlog_cache_size equal to max_binlog_cache_size.
11SET GLOBAL binlog_cache_size = 4096;
12SET GLOBAL max_binlog_stmt_cache_size = 4096;
13Warnings:
14Warning	1745	Option binlog_stmt_cache_size (32768) is greater than max_binlog_stmt_cache_size (4096); setting binlog_stmt_cache_size equal to max_binlog_stmt_cache_size.
15SET GLOBAL binlog_stmt_cache_size = 4096;
16CREATE TABLE t1(a INT PRIMARY KEY, data VARCHAR(30000)) ENGINE=Innodb;
17CREATE TABLE t2(a INT PRIMARY KEY, data VARCHAR(30000)) ENGINE=MyIsam;
18CREATE TABLE t3(a INT PRIMARY KEY, data VARCHAR(30000)) ENGINE=Innodb;
19###### 1 - SINGLE STATEMENT  ######
20*** Single statement on transactional table ***
21Got one of the listed errors
22*** Single statement on non-transactional table ***
23Got one of the listed errors
24include/wait_for_slave_sql_error_and_skip.inc [errno=1590]
25*** Single statement on both transactional and non-transactional tables. ***
26Got one of the listed errors
27include/wait_for_slave_sql_error_and_skip.inc [errno=1590]
28include/diff_tables.inc [master:t1,slave:t1]
29#########  2 - BEGIN - IMPLICIT COMMIT by DDL #########
30TRUNCATE TABLE t1;
31TRUNCATE TABLE t2;
32TRUNCATE TABLE t3;
33BEGIN;
34Got one of the listed errors
35Got one of the listed errors
36Got one of the listed errors
37BEGIN;
38Got one of the listed errors
39Got one of the listed errors
40BEGIN;
41Got one of the listed errors
42Got one of the listed errors
43include/diff_tables.inc [master:t1,slave:t1]
44###### 3 - BEGIN - COMMIT ######
45TRUNCATE TABLE t1;
46TRUNCATE TABLE t2;
47TRUNCATE TABLE t3;
48BEGIN;
49Got one of the listed errors
50Got one of the listed errors
51Got one of the listed errors
52COMMIT;
53include/diff_tables.inc [master:t1,slave:t1]
54####### 4 - BEGIN - ROLLBACK  #######
55TRUNCATE TABLE t1;
56TRUNCATE TABLE t2;
57TRUNCATE TABLE t3;
58BEGIN;
59Got one of the listed errors
60Got one of the listed errors
61Got one of the listed errors
62ROLLBACK;
63Warnings:
64Warning	1196	Some non-transactional changed tables couldn't be rolled back
65include/diff_tables.inc [master:t1,slave:t1]
66###### 5 - PROCEDURE  #######
67TRUNCATE TABLE t1;
68TRUNCATE TABLE t2;
69TRUNCATE TABLE t3;
70CREATE PROCEDURE p1(pd VARCHAR(30000))
71BEGIN
72INSERT INTO t1 (a, data) VALUES (1, pd);
73INSERT INTO t1 (a, data) VALUES (2, pd);
74INSERT INTO t1 (a, data) VALUES (3, pd);
75INSERT INTO t1 (a, data) VALUES (4, pd);
76INSERT INTO t1 (a, data) VALUES (5, 's');
77END//
78TRUNCATE TABLE t1;
79TRUNCATE TABLE t1;
80BEGIN;
81Got one of the listed errors
82COMMIT;
83TRUNCATE TABLE t1;
84BEGIN;
85Got one of the listed errors
86ROLLBACK;
87include/diff_tables.inc [master:t1,slave:t1]
88####### 6 - XID ######
89TRUNCATE TABLE t1;
90TRUNCATE TABLE t2;
91TRUNCATE TABLE t3;
92BEGIN;
93Got one of the listed errors
94Got one of the listed errors
95Got one of the listed errors
96ROLLBACK TO sv;
97Warnings:
98Warning	1196	Some non-transactional changed tables couldn't be rolled back
99COMMIT;
100include/diff_tables.inc [master:t1,slave:t1]
101####### 7 - NON-TRANS TABLE #######
102TRUNCATE TABLE t1;
103TRUNCATE TABLE t2;
104TRUNCATE TABLE t3;
105BEGIN;
106Got one of the listed errors
107Got one of the listed errors
108Got one of the listed errors
109COMMIT;
110BEGIN;
111Got one of the listed errors
112COMMIT;
113include/diff_tables.inc [master:t1,slave:t1]
114####### 8 - LOAD DATA INFILE INTO TABLE #######
115[connection master]
116CREATE TABLE t6 (a varchar(20)) ENGINE=Innodb;
117LOAD DATA INFILE 'temp_file' INTO TABLE t6;
118ERROR HY000: Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage; increase this mysqld variable and try again
119include/assert.inc [assert that the above Event has not been added to binlog]
120include/assert.inc [Check that the LOAD DATA didn't add any data into the table]
121include/sync_slave_sql_with_master.inc
122include/assert.inc [Check that the LOAD DATA didn't add any data into the table]
123[connection master]
124DROP TABLE t6;
125include/sync_slave_sql_with_master.inc
126######### 9 - Bug#55375(Regression Bug) Transaction bigger than  ##########
127#########     max_binlog_cache_size crashes slave                ##########
128# [ On Slave ]
129SET GLOBAL max_binlog_cache_size = 4096;
130Warnings:
131Warning	1738	Option binlog_cache_size (32768) is greater than max_binlog_cache_size (4096); setting binlog_cache_size equal to max_binlog_cache_size.
132SET GLOBAL binlog_cache_size = 4096;
133SET GLOBAL max_binlog_stmt_cache_size = 4096;
134Warnings:
135Warning	1745	Option binlog_stmt_cache_size (32768) is greater than max_binlog_stmt_cache_size (4096); setting binlog_stmt_cache_size equal to max_binlog_stmt_cache_size.
136SET GLOBAL binlog_stmt_cache_size = 4096;
137include/stop_slave.inc
138include/start_slave.inc
139CALL mtr.add_suppression("Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage.*");
140CALL mtr.add_suppression("Multi-statement transaction required more than 'max_binlog_stmt_cache_size' bytes of storage.*");
141CALL mtr.add_suppression("Writing one row to the row-based binary log failed.*");
142CALL mtr.add_suppression("Slave SQL.*The incident LOST_EVENTS occured on the master. Message: error writing to the binary log");
143call mtr.add_suppression("The slave coordinator and worker threads are stopped, possibly leaving data in inconsistent state");
144TRUNCATE t1;
145SET GLOBAL max_binlog_cache_size= ORIGINAL_VALUE;
146SET GLOBAL binlog_cache_size= ORIGINAL_VALUE;
147SET GLOBAL max_binlog_stmt_cache_size= ORIGINAL_VALUE;
148SET GLOBAL binlog_stmt_cache_size= ORIGINAL_VALUE;
149BEGIN;
150Repeat statement 'INSERT INTO t1 VALUES($n, repeat("a", 32))' 128 times
151COMMIT;
152include/wait_for_slave_sql_error.inc [errno=1534,1197]
153SELECT count(*) FROM t1;
154count(*)
1550
156include/show_binlog_events.inc
157SET GLOBAL max_binlog_cache_size= ORIGINAL_VALUE;
158SET GLOBAL binlog_cache_size= ORIGINAL_VALUE;
159SET GLOBAL max_binlog_stmt_cache_size= ORIGINAL_VALUE;
160SET GLOBAL binlog_stmt_cache_size= ORIGINAL_VALUE;
161include/stop_slave.inc
162include/start_slave.inc
163SELECT count(*) FROM t1;
164count(*)
165128
166######## CHECK MAX_BINLOG_CACHE_SIZE and BINLOG_CACHE_SIZE #########
167SET @@GLOBAL.MAX_BINLOG_CACHE_SIZE= 8192;
168Warnings:
169Warning	1738	Option binlog_cache_size (32768) is greater than max_binlog_cache_size (8192); setting binlog_cache_size equal to max_binlog_cache_size.
170SHOW VARIABLES LIKE 'MAX_BINLOG_CACHE_SIZE';
171Variable_name	Value
172max_binlog_cache_size	8192
173SHOW VARIABLES LIKE 'BINLOG_CACHE_SIZE';
174Variable_name	Value
175binlog_cache_size	8192
176SET @@GLOBAL.BINLOG_CACHE_SIZE= 16384;
177Warnings:
178Warning	1738	Option binlog_cache_size (16384) is greater than max_binlog_cache_size (8192); setting binlog_cache_size equal to max_binlog_cache_size.
179SHOW VARIABLES LIKE 'MAX_BINLOG_CACHE_SIZE';
180Variable_name	Value
181max_binlog_cache_size	8192
182SHOW VARIABLES LIKE 'BINLOG_CACHE_SIZE';
183Variable_name	Value
184binlog_cache_size	8192
185SET @@GLOBAL.MAX_BINLOG_CACHE_SIZE= 4096;
186Warnings:
187Warning	1738	Option binlog_cache_size (8192) is greater than max_binlog_cache_size (4096); setting binlog_cache_size equal to max_binlog_cache_size.
188SHOW VARIABLES LIKE 'MAX_BINLOG_CACHE_SIZE';
189Variable_name	Value
190max_binlog_cache_size	4096
191SHOW VARIABLES LIKE 'BINLOG_CACHE_SIZE';
192Variable_name	Value
193binlog_cache_size	4096
194######### CLEAN #########
195DROP TABLE t1;
196DROP TABLE t2;
197DROP TABLE t3;
198DROP TABLE IF EXISTS t4;
199DROP TABLE t5;
200DROP PROCEDURE p1;
201include/rpl_end.inc
202