Bug #17122 myisam_ftdump requires write access to files although only reads from them
Submitted: 4 Feb 2006 16:16 Modified: 7 Aug 2006 8:26
Reporter: Hartmut Holzgraefe Email Updates:
Status: Closed Impact on me:
Category:MySQL Server: MyISAM storage engine Severity:S3 (Non-critical)
Version:5.1 OS:
Assigned to: Jim Winstead CPU Architecture:Any

[4 Feb 2006 16:16] Hartmut Holzgraefe
myisam_ftdump openes the index file it analyzes in read/write mode
although it only reads from the file

How to repeat:
try myisam_ftdump on a file you only have read access to,
this will return an error 13 (permission denied)

when dumping a writeable index file strace shows that the file is opened using 


but the only write() calls in the trace are to stdout, myisam_ftdump only reads
from the index file

Suggested fix:
open the file in read only mode
[21 Jul 2006 20:52] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

[3 Aug 2006 18:03] Jim Winstead
Pushed into mysql-5.1-new-maint tree.
[4 Aug 2006 18:41] Timothy Smith
Pushed to 5.1; will be in 5.1.13.
[4 Aug 2006 19:18] Timothy Smith
Oops, I apoligize; this will be in 5.1.12.
[7 Aug 2006 8:26] MC Brown
A note for this bug has been added to the 5.1 changelog:

<command>myisam_ftdump</command> would fail when trying to open a MyISAM index file that you did not have write permissions to access, even though the command would only be reading from the file. (Bug #17122)