MDEV-12814 mariabackup : don't try io throttling in copy-back

Throttling only works with when creating backup.  Attempt to use it with
 --copy-back results in crash, since throttle events are not initialized.
Thus, ignore throttling unless --backup is given.
This commit is contained in:
Vladislav Vaintroub 2017-05-16 17:11:25 +00:00
commit 40c7778e05
2 changed files with 2 additions and 2 deletions

View file

@ -2169,7 +2169,7 @@ xb_write_delta_metadata(const char *filename, const xb_delta_info_t *info)
void
xtrabackup_io_throttling(void)
{
if (xtrabackup_throttle && (io_ticket--) < 0) {
if (xtrabackup_backup && xtrabackup_throttle && (io_ticket--) < 0) {
os_event_reset(wait_throttle);
os_event_wait(wait_throttle);
}