innodb_data_file_path is handled by innobackupex incorrectly

Bug #1169726 reported by Sergei Glushchenko
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona XtraBackup moved to https://jira.percona.com/projects/PXB
Fix Released
Low
Sergei Glushchenko
2.0
Fix Released
Low
Sergei Glushchenko
2.1
Fix Released
Low
Sergei Glushchenko

Bug Description

Test case:

###############################################################################
# This testcase demonstrates incorrect handling of innodb-data-file-path by
# innobackupex script
###############################################################################

. inc/common.sh

cheaty_path=test_table.MYD:10M:autoextend

start_server --innodb-data-file-path=$cheaty_path

echo "innodb-data-file-path=$cheaty_path" >>$topdir/my.cnf

${MYSQL} ${MYSQL_ARGS} test <<EOF
create table test_table (a int) engine=MyISAM;
insert into test_table values (100);
EOF

backup_dir=$topdir/backup
innobackupex --no-timestamp $backup_dir

vlog "Backup created in directory $backup_dir"

stop_server
rm -rf $mysql_datadir/*
vlog "Data destroyed"

innobackupex --copy-back $backup_dir

start_server

# Following will fail if bug is present
${MYSQL} ${MYSQL_ARGS} test <<EOF
select * from test_table;
EOF

Is failing with message:
ERROR 29 (HY000) at line 1: File './test/test_table.MYD' not found (Errcode: 2)

Related branches

summary: - innodb_data_file_path if handled by innobackupex incorrectly
+ innodb_data_file_path is handled by innobackupex incorrectly
Revision history for this message
Alexey Kopytov (akopytov) wrote :

What's exactly is the condition that triggers this bug? Is it that the system tablespace name must end with '.MYD'?

no longer affects: percona-xtrabackup/1.6
Revision history for this message
Sergei Glushchenko (sergei.glushchenko) wrote :

The copy_back routine construct regexp to skip files. It looks like ^(pattern1|...|patternN)$. Among the others one of the patterns will look like 'test_table.MYD'. This patent then is used to filter out the output of File::find inside the callback. Variables which passed inside callback are:

$File::Find::dir = /some/path/
$_ = foo.ext
$File::Find::name = /some/path/foo.ext

Matching is performed against $_, which means that files which are named same as system system tablespace will not be restored from backup.

Revision history for this message
Alexey Kopytov (akopytov) wrote :

Thanks.

Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PXB-873

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

Other bug subscribers

Remote bug watches

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