zoukankan      html  css  js  c++  java
  • 结构体key

     http://www.cnblogs.com/xpchild/p/3770823.html

    http://blog.sae.sina.com.cn/archives/3968

    实例

    http://blog.sae.sina.com.cn/archives/3968

    http://www.cnblogs.com/xpchild/p/3770823.html

    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 */ //一共有多少个column
      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; //key中具体的column
      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;
    typedef struct st_key_part_info {    /* Info about a key part */
      Field *field;
      uint    offset;                /* offset in record (from 0) */
      uint    null_offset;            /* Offset to null_bit in record */
      uint16 length;                        /* Length of keypart value in bytes */
      /* 
        Number of bytes required to store the keypart value. This may be
        different from the "length" field as it also counts
         - possible NULL-flag byte (see HA_KEY_NULL_LENGTH)
         - possible HA_KEY_BLOB_LENGTH bytes needed to store actual value length.
      */
      uint16 store_length;
      uint16 key_type;
      uint16 fieldnr;            /* Fieldnum in UNIREG */
      uint16 key_part_flag;            /* 0 or HA_REVERSE_SORT */
      uint8 type;
      uint8 null_bit;            /* Position to null_bit */
    } KEY_PART_INFO ;
    typedef struct st_keyfile_info {    /* used with ha_info() */
      uchar ref[MAX_REFLENGTH];        /* Pointer to current row */
      uchar dupp_ref[MAX_REFLENGTH];    /* Pointer to dupp row */
      uint ref_length;            /* Length of ref (1-8) */
      uint block_size;            /* index block size */
      File filenr;                /* (uniq) filenr for table */
      ha_rows records;            /* Records i datafilen */
      ha_rows deleted;            /* Deleted records */
      ulonglong data_file_length;        /* Length off data file */
      ulonglong max_data_file_length;    /* Length off data file */
      ulonglong index_file_length;
      ulonglong max_index_file_length;
      ulonglong delete_length;        /* Free bytes */
      ulonglong auto_increment_value;
      int errkey,sortkey;            /* Last errorkey and sorted by */
      time_t create_time;            /* When table was created */
      time_t check_time;
      time_t update_time;
      ulong mean_rec_length;        /* physical reclength */
    } KEYFILE_INFO;
  • 相关阅读:
    R绘图 第七篇:绘制条形图(ggplot2)
    R实战 第11篇:处理缺失值
    R实战 第十篇:列联表和频数表
    贝叶斯概率
    分析思维 第三篇:数据分析的三板斧
    分析思维 第二篇:数据指标体系
    分析思维 第一篇:认识数据
    R数据挖掘 第三篇:聚类的评估(簇数确定和轮廓系数)和可视化
    R数据挖掘 第二篇:基于距离评估数据的相似性和相异性
    R数据挖掘 第一篇:聚类分析(划分)
  • 原文地址:https://www.cnblogs.com/taek/p/5073602.html
Copyright © 2011-2022 走看看