Bug #68342 myisamchk myisam_sort_buffer_size Option Not Recognized
Submitted: 11 Feb 2013 23:58 Modified: 12 Feb 2013 1:25
Reporter: Jervin R Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:5.5.30 OS:Any
Assigned to: Matthew Lord CPU Architecture:Any

[11 Feb 2013 23:58] Jervin R
Description:
myisamchk domentation says --myisam_sort_buffer_size is supported, however the binary does not recognize this properly, instead sort_buffer_size is used.

http://dev.mysql.com/doc/refman/5.5/en/myisamchk.html

 298   { "sort_buffer_size", OPT_SORT_BUFFER_SIZE,
 299     "Deprecated. myisam_sort_buffer_size alias is being used",
 300     &check_param.sort_buffer_length,
 301     &check_param.sort_buffer_length, 0, GET_ULL, REQUIRED_ARG,
 302     (long) SORT_BUFFER_INIT, (long) (MIN_SORT_BUFFER + MALLOC_OVERHEAD),
 303     SIZE_T_MAX, (long) MALLOC_OVERHEAD, (long) 1L, 0},
 304   { "myisam_sort_buffer_size", OPT_SORT_BUFFER_SIZE,
 305     "Alias of sort_buffer_size parameter",
 306     &check_param.sort_buffer_length,
 307     &check_param.sort_buffer_length, 0, GET_ULL, REQUIRED_ARG,
 308     (long) SORT_BUFFER_INIT, (long) (MIN_SORT_BUFFER + MALLOC_OVERHEAD),
 309     SIZE_T_MAX, (long) MALLOC_OVERHEAD, (long) 1L, 0},

This should be documented to use sort_buffer_size instead, and known as alias to myisam_sort_buffer_size.

How to repeat:
[revin@forge pt-stalk]$ /wok/bin/mysql/5.5.280/bin/myisamchk --silent --force --fast --update-state --key_buffer_size=4096M --myisam_sort_buffer_size=64M --read_buffer_size=16M --write_buffer_size=16M /ssd/msb/msb_5_5_280/data/mysql/*/*.MYI 
/wok/bin/mysql/5.5.280/bin/myisamchk: unknown variable 'myisam_sort_buffer_size=64M'
[12 Feb 2013 0:55] Matthew Lord
Hi Jervin,

I am unable to repeat this using 5.5.30:

root@boyjr:/disk2/home/matt# /usr/local/mysql55/bin/myisamchk -V
/usr/local/mysql55/bin/myisamchk  Ver 2.7 for linux2.6 at x86_64

root@boyjr:/disk2/home/matt# /usr/local/mysql55/bin/mysql -V
/usr/local/mysql55/bin/mysql  Ver 14.14 Distrib 5.5.30, for linux2.6 (x86_64) using  EditLine wrapper

root@boyjr:/disk2/home/matt# /usr/local/mysql55/bin/myisamchk --silent --force --fast --update-state --key_buffer_size=4096M --myisam_sort_buffer_size=64M --read_buffer_size=16M --write_buffer_size=16M /var/lib/mysql/mysql5.5/mysql/*.MYI
myisamchk: MyISAM file /var/lib/mysql/mysql5.5/mysql/inventory.MYI
myisamchk: warning: 1 client is using or hasn't closed the table properly
myisamchk: MyISAM file /var/lib/mysql/mysql5.5/mysql/user.MYI
myisamchk: warning: 1 client is using or hasn't closed the table properly

Please let me know if you feel that I'm missing anything here.

Best Regards,

Matt
[12 Feb 2013 1:25] Jervin R
Matt,

Thanks for looking - looks like I was testing with 5.5.28 and looked up the 5.5.30 code. Feel free to mark as invalid.