MySQL 9.0.0
Source Code Documentation
KEY_PART_INFO Class Reference

#include <key.h>

Public Member Functions

void init_from_field (Field *fld)
 Initialize KEY_PART_INFO from the given field. More...
 
void init_flags ()
 Fill data from given field. More...
 

Public Attributes

Fieldfield {nullptr}
 
uint offset {0}
 
uint null_offset {0}
 
uint16 length {0}
 
uint16 store_length {0}
 
uint16 fieldnr {0}
 
uint16 key_part_flag {0}
 
uint8 type {0}
 
uint8 null_bit {0}
 
bool bin_cmp {false}
 True - if key part allows trivial binary comparison, False - if charset collation function needs to be involved. More...
 

Member Function Documentation

◆ init_flags()

void KEY_PART_INFO::init_flags ( )

Fill data from given field.

Initialize key_part_flag from source field.

◆ init_from_field()

void KEY_PART_INFO::init_from_field ( Field fld)

Initialize KEY_PART_INFO from the given field.

Parameters
fldThe field to initialize keypart from

Member Data Documentation

◆ bin_cmp

bool KEY_PART_INFO::bin_cmp {false}

True - if key part allows trivial binary comparison, False - if charset collation function needs to be involved.

Note
Not set for KEY_PART_INFO which are used for creating tables, only set when table is opened or for internal temporary tables.

This value is set a bit too optimistically and disregards the way in which value is stored in record (e.g. it is true for BLOB types). So in practice key_cmp_if_same() also has to check key_part_flag for presence of HA_BLOB_PART, HA_VAR_LENGTH_PART and HA_BIT_PART flags.

◆ field

Field* KEY_PART_INFO::field {nullptr}

◆ fieldnr

uint16 KEY_PART_INFO::fieldnr {0}

◆ key_part_flag

uint16 KEY_PART_INFO::key_part_flag {0}

◆ length

uint16 KEY_PART_INFO::length {0}

◆ null_bit

uint8 KEY_PART_INFO::null_bit {0}

◆ null_offset

uint KEY_PART_INFO::null_offset {0}

◆ offset

uint KEY_PART_INFO::offset {0}

◆ store_length

uint16 KEY_PART_INFO::store_length {0}

◆ type

uint8 KEY_PART_INFO::type {0}

The documentation for this class was generated from the following files: