Bug #49355 Not able to abort backup and restore operation
Submitted: 2 Dec 2009 15:50 Modified: 9 Dec 2009 13:23
Reporter: Hema Sridharan Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Backup Severity:S2 (Serious)
Version:mysql-6.0-backup OS:Any
Assigned to: CPU Architecture:Any

[2 Dec 2009 15:50] Hema Sridharan
Description:
It is not possible to abort the ongoing backup / restore operation.
Even by pressing CTRL+C when backup / restore is running, the operation is not interrupted and eventually gets completed.

How to repeat:
Perform backup of huge database which will take some time to complete. Press CTRL C to abort the ongoing backup and restore and check for the results.

Also after pressing CTRL C, execute another backup / restore command from mysql prompt and we get the following message,

mysql> backup database test to 'tt';
ERROR 1651 (HY000): Can't execute this command because another BACKUP/RESTORE 
operation is in progress

The above message indicates that backup / restore continues even after aborting the operation.

Note: This issue looks like regression as it was fixed by WL#4538
[2 Dec 2009 20:46] Chuck Bell
Please confirm that a kill process also fails. For example, use mysqladmin to kill the process. If it is 'killable' this way, then there may be a less severe issue.
[3 Dec 2009 15:26] Hema Sridharan
Yes, the backup / restore can be interrupted by killing the process. But it is also essential that operation gets aborted by hitting CTRL C. This is as per design mentioned in WL#4538.
[8 Dec 2009 19:44] Sveta Smirnova
Verified as described.

Terminal 1:

mysql>  backup database test to 't3';
Query aborted by Ctrl+C

Terminal 2:

mysql> show processlist;
+----+------+-----------+------+---------+------+-----------+------------------------------+
| Id | User | Host      | db   | Command | Time | State     | Info                         |
+----+------+-----------+------+---------+------+-----------+------------------------------+
| 43 | root | localhost | NULL | Query   |    0 | NULL      | show processlist             |
| 44 | root | localhost | test | Query   |    2 | query end | backup database test to 't3' |
+----+------+-----------+------+---------+------+-----------+------------------------------+
2 rows in set (0.00 sec)

mysql> show processlist;
+----+------+-----------+------+---------+------+-------+------------------------------+
| Id | User | Host      | db   | Command | Time | State | Info                         |
+----+------+-----------+------+---------+------+-------+------------------------------+
| 43 | root | localhost | NULL | Query   |    0 | NULL  | show processlist             |
| 44 | root | localhost | test | Query   |    8 | NULL  | backup database test to 't3' |
+----+------+-----------+------+---------+------+-------+------------------------------+
2 rows in set (0.00 sec)

mysql> show processlist;
+----+------+-----------+------+---------+------+-------+------------------------------+
| Id | User | Host      | db   | Command | Time | State | Info                         |
+----+------+-----------+------+---------+------+-------+------------------------------+
| 43 | root | localhost | NULL | Query   |    0 | NULL  | show processlist             |
| 44 | root | localhost | test | Query   |   12 | NULL  | backup database test to 't3' |
+----+------+-----------+------+---------+------+-------+------------------------------+
2 rows in set (0.00 sec)

mysql> backup database test to 't3';
ERROR 1651 (HY000): Can't execute this command because another BACKUP/RESTORE operation is in progress

Terminal 1:

ERROR 1317 (70100): Query execution was interrupted

If I kill query interrupted, but with invalid error message:

mysql>  backup database test to 't1';
ERROR 1053 (08S01): Server shutdown in progress

Which is not the case.
[8 Dec 2009 19:49] Sveta Smirnova
More tests showed queries were killed, just slow.
[9 Dec 2009 13:23] Lars Thalmann
According to Sveta's tests it is possible to do the abort, it is just slow.
Setting to "not a bug".