Bug #75704 Enabling keys got errno 175
Submitted: 30 Jan 2015 15:57 Modified: 5 Feb 2018 21:25
Reporter: James McKelvey Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: MyISAM storage engine Severity:S2 (Serious)
Version:5.5.37 OS:Linux
Assigned to: CPU Architecture:Any

[30 Jan 2015 15:57] James McKelvey
Description:
I have a MyISAM table with 2.7G rows. It has no indexes and I am trying to add them back.

It runs for 4 hours with Repair by sort and then switches to keycache. It does that when this appears in the error log:

Enabling keys got errno 175 on smap_ampcs_v5_0_0.#sql-15c4_d, retrying

Repair by keycache runs for 14 hours without completion.

There appears to be plenty of temp space.

myisam_sort_buffer size is 25G and 30G and 3500M also tried, same result.

How to repeat:
Repeatable on my system. I cannot reindex! I don't have a test case, the database is about 1T and I have not seen this problem on smaller databases.
[30 Jan 2015 22:51] MySQL Verification Team
If you have enough disk space to rebuild via sort, try setting myisam_max_sort_file_size=999*1024*1024*1024 to just stop it from switching over.
Does it succeed then?
[31 Jan 2015 0:04] MySQL Verification Team
MySQL error code 175: File to short; Expected more data in file

Watch how large a tmpfile becomes before seeing the error?
[2 Feb 2015 16:07] James McKelvey
myisam_sort_file_size set to enormous value.

705G of space left on data drive.

Table is about 180G.

Should be enough, am monitoring now
[2 Feb 2015 17:43] James McKelvey
Finished copying to temp table. Temp MYD same size as original MYD.

Says Repair by sorting

Temp MYI file is still just 1.0K
[2 Feb 2015 19:33] James McKelvey
After about 4 hours went into repair with keycache.

MYI file at 45G.

Disc in only 81% full with 493G available.

In error log:

Warning: Enabling keys got errno 175 on smap_ampcs_v5_0_0.#sql-15c4_26, retrying

What do I try next?
[2 Feb 2015 19:58] MySQL Verification Team
Can we see SHOW CREATE TABLE ...  and SHOW TABLE STATUS outputs for this table?
[2 Feb 2015 20:12] James McKelvey
Create table, show table status

Attachment: x.txt (text/plain), 6.85 KiB.

[3 Feb 2015 14:52] James McKelvey
Finished adding indexes after 22 hours (by keycache).

MYI is bigger than MYD.
[5 Feb 2015 15:28] James McKelvey
I attempted to ANALYZE TABLE on table ChannelValue.
It ran for 23 hours before I killed it.

The MySQL server has been restarted and there were no errors in the log.
[5 Jan 2018 21:25] MySQL Verification Team
This issue still happens with latest release?. Thanks.
[6 Feb 2018 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".