1
by brian
clean slate |
1 |
#
|
2 |
# Check replication protocol packet size handling
|
|
3 |
# Bug#19402 SQL close to the size of the max_allowed_packet fails on slave
|
|
4 |
#
|
|
5 |
||
6 |
# max-out size db name
|
|
7 |
source include/master-slave.inc; |
|
8 |
||
9 |
let $db= DB_NAME_OF_MAX_LENGTH_AKA_NAME_LEN_64_BYTES_____________________; |
|
10 |
disable_warnings; |
|
11 |
eval drop database if exists $db; |
|
12 |
enable_warnings; |
|
13 |
eval create database $db; |
|
14 |
||
15 |
connection master; |
|
16 |
SET @@global.max_allowed_packet=1024; |
|
17 |
SET @@global.net_buffer_length=1024; |
|
18 |
||
19 |
# Restart slave for setting to take effect
|
|
20 |
connection slave; |
|
21 |
STOP SLAVE; |
|
22 |
source include/wait_for_slave_to_stop.inc; |
|
23 |
START SLAVE; |
|
24 |
source include/wait_for_slave_to_start.inc; |
|
25 |
||
26 |
# Reconnect to master for new setting to take effect
|
|
27 |
disconnect master; |
|
28 |
||
29 |
# alas, can't use eval here; if db name changed apply the change here
|
|
30 |
connect (master,localhost,root,,DB_NAME_OF_MAX_LENGTH_AKA_NAME_LEN_64_BYTES_____________________); |
|
31 |
||
32 |
connection master; |
|
33 |
select @@net_buffer_length, @@max_allowed_packet; |
|
34 |
||
35 |
create table `t1` (`f1` LONGTEXT) ENGINE=MyISAM; |
|
36 |
||
37 |
INSERT INTO `t1`(`f1`) VALUES ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1023'); |
|
38 |
save_master_pos; |
|
39 |
||
40 |
connection slave; |
|
41 |
sync_with_master; |
|
42 |
eval select count(*) from `$db`.`t1` /* must be 1 */; |
|
43 |
||
44 |
SHOW STATUS LIKE 'Slave_running'; |
|
45 |
select * from information_schema.session_status where variable_name= 'SLAVE_RUNNING'; |
|
46 |
connection master; |
|
47 |
eval drop database $db; |
|
48 |
save_master_pos; |
|
49 |
||
50 |
connection slave; |
|
51 |
sync_with_master; |
|
52 |
||
53 |
#
|
|
54 |
# Bug #23755: Replicated event larger that max_allowed_packet infinitely re-transmits
|
|
55 |
#
|
|
56 |
# Check that a situation when the size of event on the master is greater than
|
|
57 |
# max_allowed_packet on the slave does not lead to infinite re-transmits.
|
|
58 |
||
59 |
connection master; |
|
60 |
||
61 |
# Change the max packet size on master
|
|
62 |
||
63 |
SET @@global.max_allowed_packet=4096; |
|
64 |
SET @@global.net_buffer_length=4096; |
|
65 |
||
66 |
# Restart slave for new setting to take effect
|
|
67 |
connection slave; |
|
68 |
STOP SLAVE; |
|
69 |
source include/wait_for_slave_to_stop.inc; |
|
70 |
START SLAVE; |
|
71 |
source include/wait_for_slave_to_start.inc; |
|
72 |
||
73 |
# Reconnect to master for new setting to take effect
|
|
74 |
disconnect master; |
|
75 |
connect (master, localhost, root); |
|
76 |
connection master; |
|
77 |
||
78 |
CREATE TABLe `t1` (`f1` LONGTEXT) ENGINE=MyISAM; |
|
79 |
||
80 |
INSERT INTO `t1`(`f1`) VALUES ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa2048'); |
|
81 |
||
82 |
# The slave I/O thread must stop after trying to read the above event
|
|
83 |
connection slave; |
|
84 |
--source include/wait_for_slave_io_to_stop.inc |
|
85 |
--replace_result $MASTER_MYPORT MASTER_MYPORT |
|
86 |
# important is only the 11th column Slave_IO_Running
|
|
87 |
--replace_column 1 # 7 # 8 # 9 # 12 # 22 # 23 # 33 # 35 # 36 # |
|
88 |
query_vertical show slave status; |
|
89 |
||
90 |
# End of tests
|