LOAD DATA INFILE is not replicated correctly if master uses relay-log-info-repos=TABLE
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
MySQL Server |
Unknown
|
Unknown
|
||||
Percona Server moved to https://jira.percona.com/projects/PS | Status tracked in 5.7 | |||||
5.5 |
Triaged
|
High
|
Unassigned | |||
5.6 |
Triaged
|
High
|
Unassigned | |||
5.7 |
Triaged
|
High
|
Unassigned |
Bug Description
This bug is the same as upstream https:/
"LOAD DATA CONCURRENT LOCAL INFILE" is not replicated correctly
relay-log-
max-relay-
There is a master db1.
db2 is a slave for db1 and master for db3.
db2 uses --log-slave-updates --log-bin=
If relay-log-
If relay-log-
db3 MD5: 55d16e47098228f
db3 MD5: 55d16e47098228f
db1 MD5: 6321b74ab1727c9
db2 MD5: 6321b74ab1727c9
Count on slave: 1392236
Count on master: 2000000
Docker script to produce this output:
#!/bin/bash
docker run -d --name db1 -e MYSQL_ROOT_
docker run --link db1:db1 -d --name db2 -e MYSQL_ROOT_
docker run --link db2 -d --name db3 -e MYSQL_ROOT_
# docker exec -it db2 mysql -pOhsh7Zae1d
echo "waiting for mysql start"
while ! docker exec -it db3 mysqladmin -pOhsh7Zae1d ping &>/dev/null ; do sleep 1 ; done
while ! docker exec -it db2 mysqladmin -pOhsh7Zae1d ping &>/dev/null ; do sleep 1 ; done
while ! docker exec -it db1 mysqladmin -pOhsh7Zae1d ping &>/dev/null ; do sleep 1 ; done
sleep 20
echo "loading database data"
docker exec -it db1 mysql -pOhsh7Zae1d -e "SHOW MASTER STATUS\G"
docker exec -it db2 mysql -pOhsh7Zae1d -e "SHOW MASTER STATUS\G"
docker exec -it db1 mysql -pOhsh7Zae1d -e "create database test_db"
docker exec -it db1 mysql -pOhsh7Zae1d test_db -e "CREATE TABLE a ( a int) ENGINE=InnoDB"
docker exec -it db1 /bin/bash -c 'seq 2000000 > /root/test.csv'
docker exec -it db1 mysql -pOhsh7Zae1d test_db -e "LOAD DATA CONCURRENT LOCAL INFILE '/root/test.csv' INTO TABLE a FIELDS TERMINATED BY '\t' LINES TERMINATED BY '\n'";
docker exec -it db2 mysql -pOhsh7Zae1d -e "change master to master_host='db1', master_user='root', master_
docker exec -it db3 mysql -pOhsh7Zae1d -e "change master to master_host='db2', master_user='root', master_
echo "Waiting before checksum"
sleep 150
echo -n "db3 MD5: "
docker exec -it db3 mysql -N -pOhsh7Zae1d -e "select * from test_db.a;" |grep -v 'Using a password on the command line interface can be insecure'|md5sum
sleep 30
echo -n "db3 MD5: "
docker exec -it db3 mysql -N -pOhsh7Zae1d -e "select * from test_db.a;" |grep -v 'Using a password on the command line interface can be insecure'|md5sum
echo -n "db1 MD5: "
docker exec -it db1 mysql -N -pOhsh7Zae1d -e "select * from test_db.a;" |grep -v 'Using a password on the command line interface can be insecure'|md5sum
echo -n "db2 MD5: "
docker exec -it db2 mysql -N -pOhsh7Zae1d -e "select * from test_db.a;" |grep -v 'Using a password on the command line interface can be insecure'|md5sum
echo -n "Count on slave: "
docker exec -it db3 mysql --batch -N -pOhsh7Zae1d -e "select count(*) from test_db.a;" |grep -v 'Using a password on the command line interface can be insecure'
echo -n "Count on master: "
docker exec -it db1 mysql --batch -N -pOhsh7Zae1d -e "select count(*) from test_db.a;" |grep -v 'Using a password on the command line interface can be insecure'
Changed in percona-server: | |
status: | New → Confirmed |
tags: | added: upstream |
if db1 uses percona server 5.5 all three servers will have a different data: 4929b261eef297c 4f - 153a0af2a22b225 72 - d50833e04b48503 2f -
db3 MD5: fdc60840e5171ce
db1 MD5: 8eb5b59b82e619c
db2 MD5: 6321b74ab1727c9
Count on slave: 1358450
Count on master: 2000000