mirror of
https://github.com/MariaDB/server.git
synced 2025-01-22 06:44:16 +01:00
78a3abeced
Problem: Many test cases don't clean up after themselves (fail to drop tables or fail to reset variables). This implies that: (1) check-testcase in the new mtr that currently lives in 5.1-rpl failed. (2) it may cause unexpected results in subsequent tests. Fix: make all tests clean up. Also: cleaned away unnecessary output in rpl_packet.result Also: fixed bug where rpl_log called RESET MASTER with a running slave. This is not supposed to work. Also: removed unnecessary code from rpl_stm_EE_err2 and made it verify that an error occurred. Also: removed unnecessary code from rpl_ndb_ctype_ucs2_def.
96 lines
5.6 KiB
Text
96 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;
|
|
|
|
INSERT INTO `t1`(`f1`) VALUES ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa2048');
|
|
|
|
# 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
|