mirror of
https://github.com/MariaDB/server.git
synced 2025-08-30 11:22:14 +03:00
ARE NOT BEING HONORED max_allowed_packet works in conjunction with net_buffer_length. max_allowed_packet is an upper bound of net_buffer_length. So it doesn't make sense to set the upper limit lower than the value. Added a warning (using ER_UNKNOWN_ERRROR and a specific message) when this is done (in the log at startup and when setting either max_allowed_packet or the net_buffer_length variables) Added a test case. Fixed several tests that broke the above rule.
58 lines
5.4 KiB
Plaintext
58 lines
5.4 KiB
Plaintext
include/master-slave.inc
|
|
[connection master]
|
|
call mtr.add_suppression("Slave I/O: Got a packet bigger than 'max_allowed_packet' bytes, Error_code: 1153");
|
|
call mtr.add_suppression("Slave I/O: Got fatal error 1236 from master when reading data from binary log:");
|
|
drop database if exists DB_NAME_OF_MAX_LENGTH_AKA_NAME_LEN_64_BYTES_____________________;
|
|
create database DB_NAME_OF_MAX_LENGTH_AKA_NAME_LEN_64_BYTES_____________________;
|
|
SET @@global.max_allowed_packet=1024;
|
|
SET @@global.net_buffer_length=1024;
|
|
include/stop_slave.inc
|
|
include/start_slave.inc
|
|
select @@net_buffer_length, @@max_allowed_packet;
|
|
@@net_buffer_length @@max_allowed_packet
|
|
1024 1024
|
|
create table `t1` (`f1` LONGTEXT) ENGINE=MyISAM;
|
|
INSERT INTO `t1`(`f1`) VALUES ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1023');
|
|
select count(*) from `DB_NAME_OF_MAX_LENGTH_AKA_NAME_LEN_64_BYTES_____________________`.`t1` /* must be 1 */;
|
|
count(*)
|
|
1
|
|
SHOW STATUS LIKE 'Slave_running';
|
|
Variable_name Value
|
|
Slave_running ON
|
|
select * from information_schema.session_status where variable_name= 'SLAVE_RUNNING';
|
|
VARIABLE_NAME VARIABLE_VALUE
|
|
SLAVE_RUNNING ON
|
|
drop database DB_NAME_OF_MAX_LENGTH_AKA_NAME_LEN_64_BYTES_____________________;
|
|
SET @@global.max_allowed_packet=4096;
|
|
SET @@global.net_buffer_length=4096;
|
|
include/stop_slave.inc
|
|
include/start_slave.inc
|
|
CREATE TABLE `t1` (`f1` LONGTEXT) ENGINE=MyISAM;
|
|
INSERT IN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aaaaaaaaaaaaaa2048');
|
|
include/wait_for_slave_io_error.inc [errno=1153]
|
|
Last_IO_Error = 'Got a packet bigger than 'max_allowed_packet' bytes'
|
|
include/stop_slave_sql.inc
|
|
include/rpl_reset.inc
|
|
DROP TABLE t1;
|
|
CREATE TABLE t1 (f1 int PRIMARY KEY, f2 LONGTEXT, f3 LONGTEXT) ENGINE=MyISAM;
|
|
INSERT INTO t1(f1, f2, f3) VALUES(1, REPEAT('a', @@global.max_allowed_packet), REPEAT('b', @@global.max_allowed_packet));
|
|
include/wait_for_slave_io_error.inc [errno=1236]
|
|
Last_IO_Error = 'Got fatal error 1236 from master when reading data from binary log: 'log event entry exceeded max_allowed_packet; Increase max_allowed_packet on master''
|
|
STOP SLAVE;
|
|
RESET SLAVE;
|
|
RESET MASTER;
|
|
SET @max_allowed_packet_0= @@session.max_allowed_packet;
|
|
SHOW BINLOG EVENTS;
|
|
SET @max_allowed_packet_1= @@session.max_allowed_packet;
|
|
SHOW BINLOG EVENTS;
|
|
SET @max_allowed_packet_2= @@session.max_allowed_packet;
|
|
==== clean up ====
|
|
DROP TABLE t1;
|
|
SET @@global.max_allowed_packet= 1024;
|
|
Warnings:
|
|
Warning 1105 The value of 'max_allowed_packet' should be no less than the value of 'net_buffer_length'
|
|
SET @@global.net_buffer_length= 1024;
|
|
DROP TABLE t1;
|
|
RESET SLAVE;
|
|
include/rpl_end.inc
|