Bug #87729 Unable to run myisamchk commands
Submitted: 11 Sep 2017 19:33 Modified: 13 Nov 2017 17:38
Reporter: Sean Combs Email Updates:
Status: Verified Impact on me:
Category:MySQL Server: Command-line Clients Severity:S3 (Non-critical)
Version:5.6.37, 5.7.19 OS:CentOS (7)
Assigned to: CPU Architecture:Any
Tags: regression

[11 Sep 2017 19:33] Sean Combs
Any 'myisamchk' command with MySQL 5.6.37 results in 'myisamchk: error: 140 when opening MyISAM-table'.  It worked on the previous version that was in use, MySQL 5.6.35.  In our cPanel environment, cPanel distributes MySQL and they pull the package directly from the official mysql community repositories.

How to repeat:
================= Demonstrate Unsuccessful myisamchk on MySQL 5.6.37 Installation =================
 - Enable mysql-community server version 5.6 repo and install
# Enable to use MySQL 5.6 on CentOS 7
name=MySQL 5.6 Community Server

[root@vps31350 ~]# mysql -V
mysql  Ver 14.14 Distrib 5.6.37, for Linux (x86_64) using  EditLine wrapper

 - Download a copy of example database (Vanilla Wordpress Install)
 - wget http://combsvb.com/wordpress.sql
 - Import database
 - run myisamchk

[root@vps31350 ~]# myisamchk -a /var/lib/mysql/wordpress/wpss_options.MYI
myisamchk: error: 140 when opening MyISAM-table '/var/lib/mysql/wordpress/wpss_options.MYI'

================= Demonstrate Successful myisamchk on MySQL 5.6.36 Installation =================
 - Download MySQL-server-5.6.36-1.linux_glibc2.5.x86_64.rpm, and MySQL-client-5.6.36-1.linux_glibc2.5.x86_64.rpm
 - Install Above rpms

[root@vps31350 ~]# mysql -V
mysql  Ver 14.14 Distrib 5.6.36, for Linux (x86_64) using  EditLine wrapper

 - Download a copy of example database (Vanilla WordPress Install)
 - wget http://combsvb.com/wordpress.sql
 - Import database
 - Run myisamchk

[root@vps31350 ~]# myisamchk -a /var/lib/mysql/wordpress/wpss_options.MYI
Checking MyISAM file: /var/lib/mysql/wordpress/wpss_options.MYI
Data records:     117   Deleted blocks:       0
- check file-size
- check record delete-chain
- check key delete-chain
- check index reference
- check data record references index: 1
- check data record references in
[12 Sep 2017 5:28] MySQL Verification Team
Hello Sean Combs,

Thank you for the report.
Verified as described.

[13 Nov 2017 15:31] Rodrigo Paris
test : myisamchk -a /var/lib/mysql/wordpress/wpss_options

without ".MYI"

it's work for me
[13 Nov 2017 17:07] Sean Combs
Thank you.
[13 Nov 2017 17:22] Sean Combs
Per your documentation, https://dev.mysql.com/doc/refman/5.7/en/myisamchk.html, the .MYI extension is referenced and provided as the correct way to run the command.  Would it be possible to add this feature back to the effected versions.  This can cause problems with maintenance scripts that rely on myisamchk.
[29 Jan 2018 15:26] Simon Mudd
Change of behaviour is really frustrating.  This is verified as a bug but I'm still rather surprised it slipped through.
[12 Jun 2018 14:28] Jesús Uzcanga
Still happening in MySQL 8.0.11
[June 2018]
[5 Mar 2019 12:22] Peter VARGA
And still in 8.0.15 - guys, what is the problem? Please, could you finally fix this?