Bug #3747 Drop table does not remove frm file from second mysql server
Submitted: 13 May 2004 16:33 Modified: 5 Oct 2004 11:06
Reporter: Johan Andersson Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S4 (Feature request)
Version:mysql 4.1.2 - ndb 3.5.0 - alpha OS:Linux (rh 7.3)
Assigned to: Magnus Blåudd CPU Architecture:Any

[13 May 2004 16:33] Johan Andersson
Description:
2 mysql server (denoted A and B) connected to 
1 ndbcluster.

I create one table on A and do "select * .." on that table on node B. 
Then, I drop the table on A, but the .frm file is not removed from B.
On B), I can still do show table since the frm file exists.

How to repeat:

0. On node A and B: use test;
1. On node A: create table t1(a integer primary key, b integer) type=ndb;
2. On node B: select * from t1; -> empty set.
3, On node A: drop table t1;
4. On node B: show tables; gives:
+----------------+
| Tables_in_test |
+----------------+
| t1             |
+----------------+

5. On node B: select * from t1; gives:
   ERROR 1030 (HY000): Got error 4114 from storage engine
[17 May 2004 11:21] Magnus Blåudd
The frm file will not be removed from the second MySQL Server at this time. It will ba handled, when a utility thread that listen for events from NDB have been developed. Let's add a WL for that.

However when the table is used, an error message describing that the table does not exist should be returned. Currently in the case when you describe above, it should return:
1. If the table has already been opened, error "Got error 284 'Table not defined in transaction coordinator" from NDBCLUSTER" will be returned.
2. If the table is NOT opened, error "Can't open file: 't4' (errno: 709)" will be returned.

I have added tests to mysql-test's that verifies the above behaviour and other things related to automatic table discovery, it's called ndb_autodiscovery and ndb_autodicovery2. Please look at it.
[23 Sep 2004 9:15] Magnus Blåudd
Will be fixed when WL#1424 is pushed.
[5 Oct 2004 11:06] Magnus Blåudd
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html