Description:
Tables cannot be dropped or altered during an ongoing
backup. This is detected nad reported.
When writing testcase for bug#44695 ALTER TABLE during START BACKUP crashes mysqld
it was discovered that attempting to drop table gives wrong error.
Table is reported to be non-existing.
How to repeat:
mysql> create table t1(k int not null primary key auto_increment) engine=ndb;
Query OK, 0 rows affected (0.72 sec)
mysql> INSERT INTO t1 VALUES (NULL);
Query OK, 1 row affected (0.01 sec)
mysql> INSERT INTO t1 SELECT NULL FROM t1;
Query OK, 1 row affected (0.01 sec)
Records: 1 Duplicates: 0 Warnings: 0
repeat above
....
ndb_mgm> start backup nowait
mysql> drop table t1;
ERROR 1051 (42S02): Unknown table 't1'
mysql> show warnings;
+-------+------+-------------------------------------------------------------------------------+
| Level | Code | Message |
+-------+------+-------------------------------------------------------------------------------+
| Error | 1296 | Got error 761 'Unable to drop table as backup is in progress' from NDB
|
| Error | 761 | Got error 761 'Unable to drop table as backup is in progress' from
NDBCLUSTER |
+-------+------+-------------------------------------------------------------------------------+
2 rows in set (0.00 sec)
Suggested fix:
No existing error code seems apropriate,
create ER_TABLE_DROP_FAILED and return that.
Add documentation.