WL#4571: Assign Key Cache per partition

Affects: Server-5.5   —   Status: Complete

Make it possible to assign key caches per partition

The new proposed syntax to do this is:

      CACHE INDEX keycache_list|keycache_parts IN key_cache_name
      
      keycache_list:
      tbl_name [INDEX|KEY (index_name[, index_name] ...)][, tbl_name ...]
      
      keycache_parts:
      tbl_name PARTITION (ALL|partition[, partition] ...)
      [INDEX|KEY (index_name[, index_name] ...)]
      
      
      LOAD INDEX INTO CACHE tbl_index_list|parts_index_list
      
      tbl_index_list:
      tbl_name [INDEX|KEY (index_name[, index_name] ...)]
      [INGORE LEAVES][, tbl_name ...]
      
      parts_index_list:
      tbl_name PARTITION (ALL|partition[, partition] ...)
      [INDEX|KEY (index_name[,index_name] ...)
      [IGNORE LEAVES]

This will make it possible to have larger key caches for
popular partitions. It will also make it possible to
assign different key caches to all partitions in preparation
for a PARALLEL ALTER TABLE (WL#2550) to ensure that we
can parallelize ALTER TABLE on MyISAM even when there is a
primary key involved in the table.

This would also solve BUG#39637.