Commit bb3f4fbb authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

MDEV-13310 Preparing an incremental backup twice can corrupt data

Remove .delta file after it was successfully applied
parent 8d1fb47e
...@@ -4974,8 +4974,11 @@ xtrabackup_apply_delta( ...@@ -4974,8 +4974,11 @@ xtrabackup_apply_delta(
if (incremental_buffer_base) if (incremental_buffer_base)
ut_free(incremental_buffer_base); ut_free(incremental_buffer_base);
if (src_file != XB_FILE_UNDEFINED) if (src_file != XB_FILE_UNDEFINED) {
os_file_close(src_file); os_file_close(src_file);
/* Remove .delta file after it was successfully applied.*/
os_file_delete(0,src_path);
}
if (dst_file != XB_FILE_UNDEFINED) if (dst_file != XB_FILE_UNDEFINED)
os_file_close(dst_file); os_file_close(dst_file);
return TRUE; return TRUE;
......
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