Bug #62570 ENABLE KEYS runs in 'Repair with keycache' mode
Submitted: 29 Sep 2011 7:24 Modified: 10 Jan 2012 12:22
Reporter: Denis Melnikov Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: MyISAM storage engine Severity:S3 (Non-critical)
Version:5.5.15 OS:Any (x86_64)
Assigned to: CPU Architecture:Any
Tags: KEYCACHE, myisam_sort_buffer_size

[29 Sep 2011 7:24] Denis Melnikov
Description:
Tested at FreeBSD and Linux.
When myisam_sort_buffer_size set to 4G, ALTER TABLE ENABLE KEYS switches to 'Repair with keycache' mode instead of 'Repair by sorting'.
The following message appears in log-error:

[ERROR] myisam_sort_buffer_size is too small
[Warning] Warning: Enabling keys got errno 175 on <table>, retrying

errno may vary.

How to repeat:
SET myisam_sort_buffer_size=4*1024*1024*1024;
ALTER TABLE <myisam table> DISABLE KEYS;
ALTER TABLE <myisam table> ENABLE KEYS;

Suggested fix:
Workaround:
Set myisam_sort_buffer_size to 3500M, for example.
[31 Dec 2011 15:01] Valeriy Kravchuk
Please, check if this still happens with a newer version, 5.5.19. I do not see this problem with 5.5.17 (64-bit) on Mac OS X.
[10 Jan 2012 11:59] Denis Melnikov
5.5.17 isn't subjected to the bug.
I cannot check 5.5.19 unfortunately.
[10 Jan 2012 12:22] Valeriy Kravchuk
OK, so let's assume the problem is fixed in newer versions, at least until somebody proves this is wrong...