Bug #15549 Make statements like REPAIR TABLE honour tmpdir variable
Submitted: 7 Dec 2005 10:56 Modified: 7 Dec 2005 14:36
Reporter: Thorben Jändling Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:mysql-standard-5.0.15-linux-x86_64-glibc OS:Linux (Debian Linux (etch) amd64)
Assigned to: CPU Architecture:Any

[7 Dec 2005 10:56] Thorben Jändling
Description:
I noticed that RECOVER TABLE does not honour tmpdir and
creates the .TMD in the db directory.

This does cause my problems. So now I just get a table write lock
and then call myisamchk with the -t option

I don't know what other statements that cause heavy disk io
ignore tmpdir or if this is on purpose.

As a side mysqlcheck could then have a tmpdir option/argument
added.

Thanks,

Thorben

How to repeat:
Have tmpdir pointed somewhere.
Run RECOVER TABLE
see that the temporary TMD file is create in db dir alongside
table.

Suggested fix:
Make statments honour tmpdir or add an option/argument to them
[7 Dec 2005 14:36] Sergei Golubchik
This is not a bug. Temporary files are created in tmpdir, but when MySQL creates a temporary copy of the table that is later renamed over the original table, it cannot use tmpdir for that, as one cannot rename over filesystem boundaries. OPTIMIZE, ALTER are affected as well.