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,16 +1700,19 @@ copy_back() ...@@ -1700,16 +1700,19 @@ copy_back()
ut_crc32_init(); ut_crc32_init();
/* copy undo tablespaces */ /* copy undo tablespaces */
if (srv_undo_tablespaces > 0) {
dst_dir = (srv_undo_dir && *srv_undo_dir) dst_dir = (srv_undo_dir && *srv_undo_dir)
? srv_undo_dir : mysql_data_home; ? srv_undo_dir : mysql_data_home;
ds_data = ds_create(dst_dir, DS_TYPE_LOCAL); ds_data = ds_create(dst_dir, DS_TYPE_LOCAL);
for (i = 1; i <= srv_undo_tablespaces; i++) { for (i = 1; ; i++) {
char filename[20]; char filename[20];
sprintf(filename, "undo%03u", (uint)i); sprintf(filename, "undo%03u", (uint)i);
if (!file_exists(filename)) {
break;
}
if (!(ret = copy_or_move_file(filename, filename, if (!(ret = copy_or_move_file(filename, filename,
dst_dir, 1))) { dst_dir, 1))) {
goto cleanup; goto cleanup;
...@@ -1718,7 +1721,6 @@ copy_back() ...@@ -1718,7 +1721,6 @@ copy_back()
ds_destroy(ds_data); ds_destroy(ds_data);
ds_data = NULL; ds_data = NULL;
}
/* copy redo logs */ /* copy redo logs */
...@@ -1844,7 +1846,7 @@ copy_back() ...@@ -1844,7 +1846,7 @@ copy_back()
} }
} }
/* copy buufer pool dump */ /* copy buffer pool dump */
if (innobase_buffer_pool_filename) { if (innobase_buffer_pool_filename) {
const char *src_name; 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