Percona Server with XtraDB

slave_max_allowed_packet Not Honored on Slave IO Reconnect

Reported by Jervin R on 2013-02-28
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
MySQL Server
Unknown
Unknown
Percona Server
Status tracked in 5.6
5.1
Undecided
Unassigned
5.5
High
George Ormond Lorch III
5.6
High
George Ormond Lorch III

Bug Description

Description:
It seems that in the event that a slave was disconnected from the master, under certain conditions, upon reconnect, it will report that it received a packet larger the slave_max_allowed_packet.

Using my test below, max_allowed_packet is set to 4M, slave is 1M and slave_max_allowed_packet is 1G and I am trying to update a row with a 1.5M file import to a blob column. This is easily reproducible on 5.5.30. The max_allowed_packet difference is to demonstrate that the problem could be on this value not on slave_max_allowed_packet, if I tried to set both to 4M and find a file about 4M in size as well, I think it would still trigger.

If I do stop slave; start slave; the replication would go through fine.

How to repeat:
This is using MySQL Sandbox and the test file can be anything around 1.5M, have not tested up to what size limits would work.

<script>
#!/bin/bash

VER=$1
PRT=$2
PFX=$3
PTH=/ssd/msb/rsandbox_$PFX
ERR=1

#while [ $ERR ]; do

sbtool -o delete --source_dir=$PTH 2>&1 /dev/null
make_replication_sandbox --sandbox_base_port=$PRT $VER 2>&1 /dev/null

for n in master node1 node2; do
cat >> $PTH/$n/my.sandbox.cnf <<EOF
innodb_file_per_table
binlog_format=ROW
secure-file-priv=/tmp
EOF
done

$PTH/restart_all 2>&1 /dev/null
$PTH/master/restart
$PTH/m -e 'set global max_allowed_packet = 1048576*4'

t=$(cat <<EOF
show global variables like '%packet%';
CREATE TABLE tblblobs (
  id int(11) NOT NULL AUTO_INCREMENT,
  activity_timestamp timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  blob_name char(16) NOT NULL COMMENT 'unique blob name',
  status enum('INCOMPLETE','UNSUBMITTED','SUBMITTED','REJECTED','APPROVED') DEFAULT 'UNSUBMITTED',
  payload mediumblob NOT NULL,
  PRIMARY KEY (id),
  UNIQUE KEY blob_name (blob_name)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;
INSERT INTO tblblobs (blob_name, payload) VALUES('test', LOAD_FILE('/tmp/percona-toolkit-2.1.7.tar.gz')) ON DUPLICATE KEY UPDATE payload = LOAD_FILE('/tmp/percona-toolkit-2.1.7.tar.gz');
INSERT INTO tblblobs (blob_name, payload) VALUES('test', LOAD_FILE('/tmp/percona-toolkit-2.1.7.tar.gz')) ON DUPLICATE KEY UPDATE payload = LOAD_FILE('/tmp/percona-toolkit-2.1.7.tar.gz')
EOF
)

echo $t | $PTH/m test
sleep 60
$PTH/s1 -e "SHOW SLAVE STATUS \G"|grep slave_max_allowed_packet
ERR=$?

#done
</script>

This is a cross report for http://bugs.mysql.com/bug.php?id=68490

George -

What is the status of this bug on 5.1?

Laurynas Biveinis <email address hidden> writes:
> What is the status of this bug on 5.1?

I'd be happy if we skipped this in 5.1. If somebody wants it they can
pay for us to backport it.

--
Stewart Smith

George Ormond Lorch III (gl-az) wrote :

It was not requested to be fixed in 5.1.

Upstream fix in 5.5.32.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.