MySQL  8.0.18
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
 
uint offset
 
uint null_offset
 
uint16 length
 
uint16 store_length
 
uint16 fieldnr
 
uint16 key_part_flag {0}
 
uint8 type
 
uint8 null_bit {0}
 
bool bin_cmp
 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

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

◆ fieldnr

uint16 KEY_PART_INFO::fieldnr

◆ key_part_flag

uint16 KEY_PART_INFO::key_part_flag {0}

◆ length

uint16 KEY_PART_INFO::length

◆ null_bit

uint8 KEY_PART_INFO::null_bit {0}

◆ null_offset

uint KEY_PART_INFO::null_offset

◆ offset

uint KEY_PART_INFO::offset

◆ store_length

uint16 KEY_PART_INFO::store_length

◆ type

uint8 KEY_PART_INFO::type

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