mirror of
https://github.com/MariaDB/server.git
synced 2025-01-20 14:02:32 +01:00
df8543868d
conflicts: Text conflict in client/mysqltest.cc Text conflict in mysql-test/include/wait_until_connected_again.inc Text conflict in mysql-test/lib/mtr_report.pm Text conflict in mysql-test/mysql-test-run.pl Text conflict in mysql-test/r/events_bugs.result Text conflict in mysql-test/r/log_state.result Text conflict in mysql-test/r/myisam_data_pointer_size_func.result Text conflict in mysql-test/r/mysqlcheck.result Text conflict in mysql-test/r/query_cache.result Text conflict in mysql-test/r/status.result Text conflict in mysql-test/suite/binlog/r/binlog_index.result Text conflict in mysql-test/suite/binlog/r/binlog_innodb.result Text conflict in mysql-test/suite/rpl/r/rpl_packet.result Text conflict in mysql-test/suite/rpl/t/rpl_packet.test Text conflict in mysql-test/t/disabled.def Text conflict in mysql-test/t/events_bugs.test Text conflict in mysql-test/t/log_state.test Text conflict in mysql-test/t/myisam_data_pointer_size_func.test Text conflict in mysql-test/t/mysqlcheck.test Text conflict in mysql-test/t/query_cache.test Text conflict in mysql-test/t/rpl_init_slave_func.test Text conflict in mysql-test/t/status.test
99 lines
5.6 KiB
Text
99 lines
5.6 KiB
Text
#
|
|
# Check replication protocol packet size handling
|
|
# Bug#19402 SQL close to the size of the max_allowed_packet fails on slave
|
|
#
|
|
|
|
# max-out size db name
|
|
source include/master-slave.inc;
|
|
|
|
let $db= DB_NAME_OF_MAX_LENGTH_AKA_NAME_LEN_64_BYTES_____________________;
|
|
disable_warnings;
|
|
eval drop database if exists $db;
|
|
enable_warnings;
|
|
eval create database $db;
|
|
|
|
connection master;
|
|
let $old_max_allowed_packet= `SELECT @@global.max_allowed_packet`;
|
|
let $old_net_buffer_length= `SELECT @@global.net_buffer_length`;
|
|
SET @@global.max_allowed_packet=1024;
|
|
SET @@global.net_buffer_length=1024;
|
|
|
|
# Restart slave for setting to take effect
|
|
connection slave;
|
|
source include/stop_slave.inc;
|
|
source include/start_slave.inc;
|
|
|
|
# Reconnect to master for new setting to take effect
|
|
disconnect master;
|
|
|
|
# alas, can't use eval here; if db name changed apply the change here
|
|
connect (master,localhost,root,,DB_NAME_OF_MAX_LENGTH_AKA_NAME_LEN_64_BYTES_____________________);
|
|
|
|
connection master;
|
|
select @@net_buffer_length, @@max_allowed_packet;
|
|
|
|
create table `t1` (`f1` LONGTEXT) ENGINE=MyISAM;
|
|
|
|
INSERT INTO `t1`(`f1`) VALUES ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1023');
|
|
save_master_pos;
|
|
|
|
connection slave;
|
|
sync_with_master;
|
|
eval select count(*) from `$db`.`t1` /* must be 1 */;
|
|
|
|
SHOW STATUS LIKE 'Slave_running';
|
|
select * from information_schema.session_status where variable_name= 'SLAVE_RUNNING';
|
|
connection master;
|
|
eval drop database $db;
|
|
save_master_pos;
|
|
|
|
connection slave;
|
|
sync_with_master;
|
|
|
|
#
|
|
# Bug #23755: Replicated event larger that max_allowed_packet infinitely re-transmits
|
|
#
|
|
# Check that a situation when the size of event on the master is greater than
|
|
# max_allowed_packet on the slave does not lead to infinite re-transmits.
|
|
|
|
connection master;
|
|
|
|
# Change the max packet size on master
|
|
|
|
SET @@global.max_allowed_packet=4096;
|
|
SET @@global.net_buffer_length=4096;
|
|
|
|
# Restart slave for new setting to take effect
|
|
connection slave;
|
|
source include/stop_slave.inc;
|
|
source include/start_slave.inc;
|
|
|
|
# Reconnect to master for new setting to take effect
|
|
disconnect master;
|
|
connect (master, localhost, root);
|
|
connection master;
|
|
|
|
CREATE TABLE `t1` (`f1` LONGTEXT) ENGINE=MyISAM;
|
|
|
|
sync_slave_with_master;
|
|
|
|
connection master;
|
|
|
|
INSERT INTO `t1`(`f1`) VALUES ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa2048');
|
|
|
|
# The slave I/O thread must stop after trying to read the above event
|
|
connection slave;
|
|
--source include/wait_for_slave_io_to_stop.inc
|
|
let $slave_io_running= query_get_value(SHOW SLAVE STATUS, Slave_IO_Running, 1);
|
|
--echo Slave_IO_Running = $slave_io_running (expect No)
|
|
|
|
--echo ==== clean up ====
|
|
connection master;
|
|
DROP TABLE t1;
|
|
eval SET @@global.max_allowed_packet= $old_max_allowed_packet;
|
|
eval SET @@global.net_buffer_length= $old_net_buffer_length;
|
|
# slave is stopped
|
|
connection slave;
|
|
DROP TABLE t1;
|
|
|
|
# End of tests
|