Commit ffb1eebe authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

MDEV-13560 Copy all innodb undo tablespaces from the backup directory to destination.

Do not check or rely on innodb_undo_tablespaces in copy-back,
there is no good reason for that.
parent 3a3f1328
......@@ -1700,26 +1700,28 @@ copy_back()
ut_crc32_init();
/* copy undo tablespaces */
if (srv_undo_tablespaces > 0) {
dst_dir = (srv_undo_dir && *srv_undo_dir)
? srv_undo_dir : mysql_data_home;
ds_data = ds_create(dst_dir, DS_TYPE_LOCAL);
dst_dir = (srv_undo_dir && *srv_undo_dir)
? srv_undo_dir : mysql_data_home;
for (i = 1; i <= srv_undo_tablespaces; i++) {
char filename[20];
sprintf(filename, "undo%03u", (uint)i);
if (!(ret = copy_or_move_file(filename, filename,
dst_dir, 1))) {
goto cleanup;
}
}
ds_data = ds_create(dst_dir, DS_TYPE_LOCAL);
ds_destroy(ds_data);
ds_data = NULL;
for (i = 1; ; i++) {
char filename[20];
sprintf(filename, "undo%03u", (uint)i);
if (!file_exists(filename)) {
break;
}
if (!(ret = copy_or_move_file(filename, filename,
dst_dir, 1))) {
goto cleanup;
}
}
ds_destroy(ds_data);
ds_data = NULL;
/* copy redo logs */
dst_dir = (srv_log_group_home_dir && *srv_log_group_home_dir)
......@@ -1844,7 +1846,7 @@ copy_back()
}
}
/* copy buufer pool dump */
/* copy buffer pool dump */
if (innobase_buffer_pool_filename) {
const char *src_name;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment