1include/master-slave.inc
2[connection master]
3call mtr.add_suppression("Slave I/O: Got a packet bigger than 'slave_max_allowed_packet' bytes, .*error.* 1153");
4call mtr.add_suppression("Log entry on master is longer than slave_max_allowed_packet");
5drop database if exists DB_NAME_OF_MAX_LENGTH_AKA_NAME_LEN_64_BYTES_____________________;
6create database DB_NAME_OF_MAX_LENGTH_AKA_NAME_LEN_64_BYTES_____________________;
7connection master;
8SET @@global.max_allowed_packet=1024;
9SET @@global.net_buffer_length=1024;
10connection slave;
11include/stop_slave.inc
12include/start_slave.inc
13disconnect master;
14connect  master,localhost,root,,DB_NAME_OF_MAX_LENGTH_AKA_NAME_LEN_64_BYTES_____________________;
15connection master;
16select @@net_buffer_length, @@max_allowed_packet;
17@@net_buffer_length	@@max_allowed_packet
181024	1024
19create table `t1` (`f1` LONGTEXT) ENGINE=MyISAM;
20INSERT INTO `t1`(`f1`) VALUES ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1023');
21connection slave;
22select count(*) from `DB_NAME_OF_MAX_LENGTH_AKA_NAME_LEN_64_BYTES_____________________`.`t1` /* must be 1 */;
23count(*)
241
25SHOW STATUS LIKE 'Slave_running';
26Variable_name	Value
27Slave_running	ON
28select * from information_schema.session_status where variable_name= 'SLAVE_RUNNING';
29VARIABLE_NAME	VARIABLE_VALUE
30SLAVE_RUNNING	ON
31connection master;
32drop database DB_NAME_OF_MAX_LENGTH_AKA_NAME_LEN_64_BYTES_____________________;
33connection slave;
34connection master;
35SET @@global.max_allowed_packet=4096;
36SET @@global.net_buffer_length=4096;
37connection slave;
38include/stop_slave.inc
39include/start_slave.inc
40disconnect master;
41connect  master, localhost, root;
42connection master;
43CREATE TABLE `t1` (`f1` LONGTEXT) ENGINE=MyISAM;
44connection slave;
45connection master;
46INSERT INTO `t1`(`f1`) VALUES ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa2048');
47connection slave;
48include/wait_for_slave_io_error.inc [errno=1153]
49Last_IO_Error = 'Got a packet bigger than 'slave_max_allowed_packet' bytes'
50include/stop_slave_sql.inc
51include/rpl_reset.inc
52connection master;
53DROP TABLE t1;
54connection slave;
55connection master;
56CREATE TABLE t1 (f1 int PRIMARY KEY, f2 LONGTEXT, f3 LONGTEXT) ENGINE=MyISAM;
57connection slave;
58connection master;
59INSERT INTO t1(f1, f2, f3) VALUES(1, REPEAT('a', @@global.max_allowed_packet), REPEAT('b', @@global.max_allowed_packet));
60connection slave;
61include/wait_for_slave_io_error.inc [errno=1153]
62Last_IO_Error = 'Got a packet bigger than 'slave_max_allowed_packet' bytes'
63STOP SLAVE;
64RESET SLAVE;
65connection master;
66RESET MASTER;
67SET @max_allowed_packet_0= @@session.max_allowed_packet;
68SHOW BINLOG EVENTS;
69SET @max_allowed_packet_1= @@session.max_allowed_packet;
70SHOW BINLOG EVENTS;
71SET @max_allowed_packet_2= @@session.max_allowed_packet;
72==== clean up ====
73connection master;
74DROP TABLE t1;
75SET @@global.max_allowed_packet= 1024;
76Warnings:
77Warning	1708	The value of 'max_allowed_packet' should be no less than the value of 'net_buffer_length'
78SET @@global.net_buffer_length= 1024;
79SET @@global.slave_max_allowed_packet= 1073741824;
80connection slave;
81DROP TABLE t1;
82RESET SLAVE;
83include/rpl_end.inc
84