Description:
1) Create database, tables and insert some values in the tables.
2) Perform backup database operations from 2 different connections from same server. The following error message is noticed:
ERROR 1627 (HY000): Can't execute this command because another BACKUP/RESTORE operation is in progress
Ideally this should not be the case, User should be able to perform Backup Database operation while Restore operation is going on from other connection and viceversa.
With the current Mysql Backup feature, user is not allowed to perform concurrent Backup and Restore operations.Also concurrent Backup to different locations should be possible.
How to repeat:
Note: I used 33MB database(takes close to 1min to complete restore). It is not required to have huge database(in GB's) as I was able to repeatedly reproduce the issue with just 33MB database. The timings of commands that I issued were very quick and in seconds as mentioned below
connection con1: Local time 5:41:28
===============
mysql> restore from '/export/home/tmp/backup_file/dbb.bak';
Immediately perform another restore from connection 2
connection con2: Local time 5:41:37
===============
mysql> restore from '/export/home/tmp/backup_file/dbb.bak';
ERROR 1627 (HY000): Can't execute this command because another BACKUP/RESTORE operation is in progress
Restore of different database from backup image tt.bak
mysql> restore from '/export/home/tmp/backup_dmp/tt.bak';
ERROR 1627 (HY000): Can't execute this command because another BACKUP/RESTORE operation is in progress
connection con1:
================
mysql> restore from '/export/home/tmp/backup_file/dbb.bak';
+-----------+
| backup_id |
+-----------+
| 263 |
+-----------+
1 row in set (1min 3.75sec)
The same thing happens for backup database also:
connection con1:
================
mysql> backup database dbb to '/export/home/tmp/backup_dmp/dbn.bak';
connection con2:
================
mysql> backup database dbb to '/export/home/tmp/backup_dmp/dbt.bak';
ERROR 1627 (HY000): Can't execute this command because another BACKUP/RESTORE operation is in progress
connection con1:
mysql> backup database dbb to '/export/home/tmp/backup_dmp/dbn.bak';
+-----------+
| backup_id |
+-----------+
| 267 |
+-----------+
1 row in set (12.98 sec)