Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions storage/innobase/xtrabackup/src/backup_copy.cc
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ struct datadir_thread_ctxt_t {
bool ret;
};


/************************************************************************
Trim leading slashes from absolute path so it becomes relative */
static const char *trim_dotslash(const char *path) {
Expand Down Expand Up @@ -2290,7 +2289,15 @@ bool copy_back(int argc, char **argv) {

/* copy undo tablespaces */
if (srv_undo_tablespaces > 0) {
dst_dir = (srv_undo_dir && *srv_undo_dir) ? srv_undo_dir : mysql_data_home;
dst_dir = mysql_data_home;

// If innodb_undo_directory is set, use it as the destination directory.
// Ignore innodb_undo_directory if it's set to "./" (default value), because
// it will make xtrabackup try to copy files back to backup directory,
// resulting in "file exists" errors.
if (srv_undo_dir && *srv_undo_dir && strcmp(srv_undo_dir, "./") != 0) {
dst_dir = srv_undo_dir;
}

ds_data = ds_create(dst_dir, DS_TYPE_LOCAL);

Expand Down