Bug #29637 ER_BAD_TABLE_ERROR returned for DROP TABLE during NDB errno 701 schema ops
Submitted: 9 Jul 2007 6:21 Modified: 9 Jul 2007 15:22
Reporter: Sean Pringle Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S4 (Feature request)
Version:mysql-5.1 OS:Any
Assigned to: Assigned Account CPU Architecture:Any
Tags: 5.0, 5.1

[9 Jul 2007 6:21] Sean Pringle
Description:
MySQL 5.0 returns a generic ER_BAD_TABLE_ERROR when running DROP TABLE on a known NDBCLUSTER table during a node restart, due to schema operation being disallowed at this time.  ER_BAD_TABLE_ERROR results in a generic and misleading error message for this situation:

"ERROR 1051 (42S02): Unknown table '<ndb_table>'"

The user must know to issue SHOW WARNINGS to get further information:

"Got error 701 'System busy with other schema operation' from ndbcluster"

A possibly a related change in MySQL 5.1:  MySQL apparently now blocks for a while until the schema operation can complete.  This behavior seems less appropriate than returning an error, and equally non-intuitive.

How to repeat:
Issue "DROP TABLE <ndb_table>" on a MySQL node while a data node is restarting.

Suggested fix:
While is it expected that schema operations are disabled during a node restart, it would be nice to have a server error code that recognizes this situation, particularly as MySQL does know about this table being dropped via a local .frm.

We already have special server error codes for failure of schema operations on other storage engines, eg:  ER_CANT_CREATE_FEDERATED_TABLE

How about something like ER_NDB_BUSY_WITH_SCHEMA_OPS to handle both CREATE TABLE and DROP TABLE for cluster as appropriate?
[9 Jul 2007 15:22] Valeriy Kravchuk
Thank you for a reasonable feature request.