KEY

typedef struct st_key {
  uint    key_length;            /* Tot length of key */
  ulong flags;                          /* dupp key and pack flags */
  uint    key_parts;            /* How many key_parts */
  uint  extra_length;
  uint    usable_key_parts;        /* Should normally be = key_parts */
  uint  block_size;
  enum  ha_key_alg algorithm;
  /*
    Note that parser is used when the table is opened for use, and
    parser_name is used when the table is being created.
  */
  union
  {
    plugin_ref parser;                  /* Fulltext [pre]parser */
    LEX_STRING *parser_name;            /* Fulltext [pre]parser name */
  };
  KEY_PART_INFO *key_part;
  char    *name;                /* Name of key */
  /*
    Array of AVG(#records with the same field value) for 1st ... Nth key part.
    0 means 'not known'.
    For temporary heap tables this member is NULL.
  */
  ulong *rec_per_key;
  union {
    int  bdb_return_if_eq;
  } handler;
  TABLE *table;
  LEX_STRING comment;
} KEY;
原文地址:https://www.cnblogs.com/taek/p/5217055.html