Show
added a comment - - edited It looks like it was fixed in 10.0.2, my suspicion is – as a part of table discovery implementation.
See strace fragments related to t1.frm and t2.frm for 10.0.1 and 10.0.2 for the following test case:
create table t1 (i int);
insert into t1 values (1);
rename table t1 to t2;
insert into t2 values (2);
drop table t2;
strace fragments from 10.0.1
write(8, "\t\t 2 Query\tcreate table t1 (i"..., 38) = 38
...
access("./test/t1.frm", F_OK) = -1 ENOENT (No such file or directory)
...
access("./test/t1.frm", F_OK) = -1 ENOENT (No such file or directory)
access("./test/t1.frm", F_OK) = -1 ENOENT (No such file or directory)
...
open("./test/t1.frm", O_RDWR|O_CREAT|O_TRUNC, 0660) = 51
...
open("./test/t1.frm", O_RDONLY) = 51
...
write(8, "\t\t 2 Query\tinsert into t1 val"..., 40) = 40
...
open("./test/t1.frm", O_RDONLY) = 51
...
write(8, "\t\t 2 Query\trename table t1 to"..., 36) = 36
...
access("./test/t2.frm", F_OK) = -1 ENOENT (No such file or directory)
access("./test/t2.frm", F_OK) = -1 ENOENT (No such file or directory)
...
open("./test/t1.frm", O_RDONLY) = 51
...
rename("./test/t1.frm", "./test/t2.frm") = 0
...
write(8, "\t\t 2 Query\tinsert into t2 val"..., 40) = 40
...
open("./test/t2.frm", O_RDONLY) = 57
...
write(8, "\t\t 2 Query\tdrop table t2\n", 28) = 28
...
access("./test/t2.frm", F_OK) = 0
...
open("./test/t2.frm", O_RDONLY) = 57
...
unlink("./test/t2.frm") = 0
...
strace fragments from 10.0.2
write(8, "\t\t 2 Query\tcreate table t1 (i"..., 38) = 38
...
access("./test/t1.frm", F_OK) = -1 ENOENT (No such file or directory)
...
access("./test/t1.frm", F_OK) = -1 ENOENT (No such file or directory)
...
open("./test/t1.frm", O_RDWR|O_CREAT|O_TRUNC, 0660) = 51
...
write(8, "\t\t 2 Query\tinsert into t1 val"..., 40) = 40
...
open("./test/t1.frm", O_RDONLY) = 51
...
write(8, "\t\t 2 Query\trename table t1 to"..., 36) = 36
...
access("./test/t2.frm", F_OK) = -1 ENOENT (No such file or directory)
...
rename("./test/t1.frm", "./test/t2.frm") = 0
...
write(8, "\t\t 2 Query\tinsert into t2 val"..., 40) = 40
...
open("./test/t2.frm", O_RDONLY) = 57
...
write(8, "\t\t 2 Query\tdrop table t2\n", 28) = 28
...
unlink("./test/t2.frm") = 0
So, I'm closing it as fixed in 10.0 (set 10.0.6 in Fix version because it's the lowest available on the list, but in fact it's 10.0.2).
If anyone disagrees, please comment and/or re-open.
According to Monty, this only happens for LOCK TABLES on a view and SHOW TABLES