Bug #68631 Docs about tmpdir hidden files can be improved
Submitted: 11 Mar 2013 8:12 Modified: 12 Mar 2013 18:28
Reporter: Daniël van Eeden (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:5.6.10 OS:Any
Assigned to: Paul Dubois CPU Architecture:Any

[11 Mar 2013 8:12] Daniël van Eeden
Description:
Page: http://dev.mysql.com/doc/refman/5.6/en/temporary-files.html

"MySQL creates all temporary files as hidden files. This ensures that the temporary files are removed if mysqld is terminated. The disadvantage of using hidden files is that you do not see a big temporary file that fills up the file system in which the temporary file directory is located."

"For some SELECT queries, MySQL also creates temporary SQL tables. These are not hidden and have names of the form SQL_*." 

In the UNIX world hidden files are considered files with a dot as first character of the filename (e.g. ".my.cnf"). This doesn't ensure they're removed when mysqld is terminated. I expect that the files are unlinked instead of hidden as this does ensure removal when the mysqld process ends.

How to repeat:
Read docs.

watch "lsof +L1"

Suggested fix:
Adjust documentation
[11 Mar 2013 11:18] Erlend Dahl
Thank you for the bug report.
[12 Mar 2013 18:28] Paul Dubois
Thank you for your bug report. This issue has been addressed in the documentation. The updated documentation will appear on our website shortly, and will be included in the next release of the relevant products.

Updated text:

MySQL arranges that temporary files are removed if mysqld is
terminated. On platforms that support it (such as Unix), this is done
by unlinking the file after opening it. The disadvantage of this is
that the name does not appear in directory listings and you do not
see a big temporary file that fills up the file system in which the
temporary file directory is located. (In such cases, ls +L1 may be
helpful in identifying large files associated with mysqld.)
[17 Aug 2013 12:18] Gabor Kormos
Due to this fix a huge bug crept into all documentation versions. The document says "ls +L1", whereas the original request said "lsof +L1". ls does not have a +L1 option, only lsof does and gives the desired output. Please reopen this and fix the documentation.
[20 Aug 2013 16:51] Paul Dubois
ls -> lsof fix applied. Thanks for noticing this.