Bug #31711 Warning messages of 'drop tablespace' is not correct
Submitted: 19 Oct 2007 10:37 Modified: 19 Oct 2007 12:23
Reporter: li zhou Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Cluster: Disk Data Severity:S3 (Non-critical)
Version:mysql-5.1 OS:Any
Assigned to: CPU Architecture:Any
Triage: Triaged: D4 (Minor)

[19 Oct 2007 10:37] li zhou
Description:
The warning message is not correct when do 'drop tablespace'.
We got "Cant drop filegroup, filegroup isused" when try to drop a tablespace.

How to repeat:
mysql> show tables;
Empty set (0.01 sec)

mysql> CREATE LOGFILE GROUP lg1
    -> ADD UNDOFILE 'undofile.dat'
    -> INITIAL_SIZE 16M
    -> UNDO_BUFFER_SIZE = 1M
    -> ENGINE NDB;
Query OK, 0 rows affected (1.68 sec)

mysql> CREATE TABLESPACE ts1
    -> ADD DATAFILE 'datafile.dat'
    -> USE LOGFILE GROUP lg1
    -> ENGINE NDB;
Query OK, 0 rows affected (11.16 sec)

mysql> show warnings;
Empty set (0.01 sec)

mysql> DROP TABLESPACE ts1
    -> ENGINE NDB;
ERROR 1526 (HY000): Failed to drop TABLESPACE
mysql> show warnings;
+-------+------+-----------------------------------------------------------------+
| Level | Code | Message               |
+-------+------+-----------------------------------------------------------------+
| Error | 1296 | Got error 768 'Cant drop filegroup, filegroup isused' from NDB |
| Error | 1526 | Failed to drop TABLESPACE               |
+-------+------+-----------------------------------------------------------------+
2 rows in set (0.00 sec)

Suggested fix:
Should we say "Cant drop tablespace, tablespace isused"?