Bug #26367 MIN_ROWS not working for MyISAM tables
Submitted: 14 Feb 2007 13:10
Reporter: Mark Leith Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: MyISAM storage engine Severity:S4 (Feature request)
Version:4.1-BK, 5.0-BK, 5.1-BK OS:Any (Any)
Assigned to: CPU Architecture:Any

[14 Feb 2007 13:10] Mark Leith
Description:
The MIN_ROWS option for MyISAM tables is ignored due to being protected by the USE_RELOC define, which is not used within any of our builds it seems:

From myisam/mi_create.c:

if (! (flags & HA_DONT_TOUCH_DATA))
{
#ifdef USE_RELOC
if (my_chsize(dfile,share.base.min_pack_length*ci->reloc_rows,0,MYF(0)))
goto err;
#endif
errpos=2;
if (my_close(dfile,MYF(0)))
goto err;
}

mysql> create table my_min_rows (i int, j int) engine = myisam min_rows = 100000000;
Query OK, 0 rows affected (0.38 sec)
...
-rw-rw----   1 mysql  wheel      0 Feb 14 12:54 my_min_rows.MYD
-rw-rw----   1 mysql  wheel   1024 Feb 14 12:54 my_min_rows.MYI
-rw-rw----   1 mysql  wheel   8578 Feb 14 12:54 my_min_rows.frm

mysql> create table my_min_rows_avg (i int, j int) engine = myisam min_rows = 100000000 avg_row_length = 8;
Query OK, 0 rows affected (0.00 sec)
...
-rw-rw----   1 mysql  wheel      0 Feb 14 12:58 my_min_rows_avg.MYD
-rw-rw----   1 mysql  wheel   1024 Feb 14 12:58 my_min_rows_avg.MYI
-rw-rw----   1 mysql  wheel   8578 Feb 14 12:58 my_min_rows_avg.frm

This is a documented feature, so should work. It seems it has been like this right back to 3.23.x.. 

How to repeat:
create table my_min_rows_avg (i int, j int) engine = myisam min_rows = 100000000 avg_row_length = 8;

/* Check database directory for file sizes */
[25 Oct 2010 6:29] MySQL Verification Team
This never did apply to MyISAM tables, and as such is merely a feature request.
The fact that the syntax got accepted but not used is another facet of bug #47771