Buggy --slave-info code in innobackupex
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona XtraBackup moved to https://jira.percona.com/projects/PXB |
Fix Released
|
Low
|
Alexey Kopytov | ||
2.0 |
Won't Fix
|
Low
|
Unassigned | ||
2.1 |
Fix Released
|
Low
|
Alexey Kopytov |
Bug Description
innobackupex --slave-info executes the following code to get the master binlog coordinates for CHANGE MASTER TO written xtrabackup_
mysql_send 'SHOW SLAVE STATUS\G';
# get output of the "show slave status" command from mysql output
# and extract binlog position of the master server
file_
for (@lines) {
$master = $1 if /Master_
$filename = $1 if /Master_
$position = $1 if /Master_
}
That code works, but there's a couple of problems with it, making it dependent on specific SHOW SLAVE STATUS output format:
- we actually want to read Relay_Master_
- there's no column in the SHOW SLAVE STATUS output named "Master_Log_Pos", but there are "Read_Master_
The fix is to change the column names in the above code to not depend on specific order and other column naming in SHOW SLAVE STATUS.
Related branches
- Stewart Smith (community): Approve
- Daniel Nichter (community): Needs Fixing
- Laurynas Biveinis (community): Approve
-
Diff: 1067 lines (+346/-381)4 files modifieddoc/source/innobackupex/privileges.rst (+0/-4)
innobackupex (+340/-371)
test/t/bug729843.sh (+2/-3)
test/t/bug977101.sh (+4/-3)
tags: | added: low-hanging-fruit |
description: | updated |
This is also fixed in lp:~akopytov/percona-xtrabackup/use-dbd-mysql-in-innobackupex