Bug #33098 myisam_block_size variable not correctly implemented
Submitted: 9 Dec 2007 17:13 Modified: 31 Oct 2008 16:07
Reporter: Baron Schwartz (Basic Quality Contributor) Email Updates:
Status: Closed Impact on me:
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:4.1,5.0, 5.1, 6.0 OS:Any
Assigned to: Paul DuBois CPU Architecture:Any
Tags: qc

[9 Dec 2007 17:13] Baron Schwartz

This option doesn't exist in 5.0.

In 5.1 it exists but http://dev.mysql.com/doc/refman/5.1/en/key-cache-block-size.html says

"Currently, you cannot control the size of the index blocks in a table. This size is set by the server when the .MYI index file is created, depending on the size of the keys in the indexes present in the table definition. In most cases, it is set equal to the I/O buffer size."

I don't think this is true anymore in 5.1.  I think in 5.1 you can set it with myisam_block_size.

How to repeat:
doc bug
[9 Dec 2007 20:39] Valeriy Kravchuk
Thank you for a reasonable documentation request.
[10 Dec 2007 7:27] Jon Stephens
In latest 4.1/5.0/5.1/6.0 from BK:

This variable is shown in the output of mysqld --verbose --help but nowhere else.

It can be set from the command line (using e.g. --myisam-block-size=4096) when starting the server, but trying to set it using SET in the mysql client results in an 'Unknown system variable' error.

It does not appear in the output of SHOW VARIABLES or SHOW STATUS, and setting it from the command line does not appear to influence the value of any variable that is displayed in SHOW VARIABLE or SHOW STATUS output.

Changed category/status to Server/Open, changed synopsis to reflect real issue with this variable.
[29 Feb 2008 19:18] Valeriy Kravchuk
Thank you for a bug report. Verified just as described with 5.1.23-rc. myisam_block_size variables shoudl be implemented as described in the manual, http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html#option_mysqld_myisam_b...
[18 Mar 2008 15:25] Paul DuBois
Related: Bug#34363

(basically, myisam_block_size currently is not really a system variable at all)
[2 Oct 2008 14:48] Konstantin Osipov
Paul, do you agree it's a documentation bug?
Can you fix it without exposing the setting as a system variable?
If you can't, then perhaps the other bug is not a feature request after all.
[3 Oct 2008 22:40] Paul DuBois
Hi Kostja,

Re: the question in your 2 Oct comment: It's a documentation bug that
myisam_block_size is documented as a system variable, but I don't agree
that this is a good situation.  This setting should be exposed as
a system variable, that's why I filed Bug#34363 after discussion
with Serg.

In mysqld.cc, the setting is written with underscores, after all,
which implies that it's system variable and not an option:

 {"myisam_block_size", OPT_MYISAM_BLOCK_SIZE,
  "Block size to be used for MyISAM index pages.",
  (uchar**) &opt_myisam_block_size,
  (uchar**) &opt_myisam_block_size, 0, GET_ULONG, REQUIRED_ARG,
[31 Oct 2008 16:07] Paul DuBois
Thank you for your bug report. This issue has been addressed in the documentation. The updated documentation will appear on our website shortly, and will be included in the next release of the relevant products.

Changing documentation to document myisam_block_size as a startup option only, not as a system variable.

Yes, you can use myisam_block_size to change the .MYI block size; fixing the section that says you cannot change the block size.

See also Bug#20407, Bug#34363.