>>>>> "Yuri" == Yuri Dario <mc6530@stripped> writes:
Yuri> the merge.test is failing with access denied when deleting tables. A
Yuri> minimal version of merge.test as follows, show the bug:
Yuri> drop table if exists t1,t2,t3;
Yuri> create table t1 (a int not null primary key auto_increment, message
Yuri> create table t2 (a int not null primary key auto_increment, message
Yuri> INSERT INTO t1 (message) VALUES ("Testing"),("table"),("t1");
Yuri> INSERT INTO t2 (message) VALUES ("Testing"),("table"),("t2");
Yuri> create table t3 (a int not null, b char(20), key(a)) type=MERGE
Yuri> explain select * from t3 where a < 10;
Yuri> drop table t1;
Yuri> drop table t2;
Yuri> drop table t3;
Yuri> drop table t4;
Yuri> The result is
Yuri> E:\usr\local\mysql\mysql-test\t1>..\..\bin\mysql test < m1
Yuri> table type possible_keys key key_len ref rows Extra
Yuri> t3 ALL a NULL NULL NULL 6 where used
Yuri> ERROR 6 at line 29: Error on delete of '.\test\t1.MYI' (Errcode: 13)
Yuri> I suspect multiple call to open() against t1.myi. The mysqld.trace file
Yuri> has been saved.
Yuri> Where can I start looking in code?
The problem is that OS2 has the same problem as Windows in that it
can't delete a file that is open.
I have updated the MySQL manual with the following item:
*`DROP TABLE' on a table that is in use by a `MERGE' table will not work.*
The `MERGE' handler does it table mapping hidden from *MySQL*.
Because windows doesn't allow one to drop files that are open, you
have to first flush all `MERGE' tables (with `FLUSH TABLES') or
drop the `MERGE' table before drooping the table. We will fix
this at the same time we introduce `VIEW''s.
I have 'fixed' the test case by changing it to first drop the MERGE
table and then the other tables.