MySQL 8.0.39
Source Code Documentation
data0type.h File Reference

Data types. More...

#include "univ.i"
#include "data0type.ic"

Go to the source code of this file.

Classes

struct  dtype_t
 

Macros

#define DATA_BIG_COL(col)   DATA_BIG_LEN_MTYPE((col)->len, (col)->mtype)
 

Enumerations

enum  ib_like_t { IB_LIKE_EXACT , IB_LIKE_PREFIX }
 SQL Like operator comparison types. More...
 

Functions

ulint DATA_MBMINMAXLEN (ulint mbminlen, ulint mbmaxlen)
 
ulint DATA_MBMINLEN (ulint mbminmaxlen)
 
ulint DATA_MBMAXLEN (ulint mbminmaxlen)
 
bool DATA_POINT_MTYPE (ulint mtype)
 
bool DATA_GEOMETRY_MTYPE (ulint mtype)
 
bool DATA_LARGE_MTYPE (ulint mtype)
 
bool DATA_BIG_LEN_MTYPE (ulint len, ulint mtype)
 
static ulint dtype_get_mysql_type (const dtype_t *type)
 Gets the MySQL type code from a dtype. More...
 
ulint dtype_get_at_most_n_mbchars (ulint prtype, ulint mbminmaxlen, ulint prefix_len, ulint data_len, const char *str)
 Determine how many bytes the first n characters of the given string occupy. More...
 
bool dtype_is_string_type (ulint mtype)
 Checks if a data main type is a string type. More...
 
bool dtype_is_binary_string_type (ulint mtype, ulint prtype)
 Checks if a type is a binary string type. More...
 
bool dtype_is_non_binary_string_type (ulint mtype, ulint prtype)
 Checks if a type is a non-binary string type. More...
 
static void dtype_set (dtype_t *type, ulint mtype, ulint prtype, ulint len)
 Sets a data type structure. More...
 
static void dtype_copy (dtype_t *type1, const dtype_t *type2)
 Copies a data type structure. More...
 
static ulint dtype_get_mtype (const dtype_t *type)
 Gets the SQL main data type. More...
 
static ulint dtype_get_prtype (const dtype_t *type)
 Gets the precise data type. More...
 
static void dtype_get_mblen (ulint mtype, ulint prtype, ulint *mbminlen, ulint *mbmaxlen)
 Compute the mbminlen and mbmaxlen members of a data type structure. More...
 
static ulint dtype_get_charset_coll (ulint prtype)
 Gets the MySQL charset-collation code for MySQL string types. More...
 
ulint dtype_form_prtype (ulint old_prtype, ulint charset_coll)
 Forms a precise type from the < 4.1.2 format precise type plus the charset-collation code. More...
 
static bool dtype_is_utf8 (ulint prtype)
 Determines if a MySQL string type is a subset of UTF-8. More...
 
static ulint dtype_get_len (const dtype_t *type)
 Gets the type length. More...
 
static ulint dtype_get_mbminlen (const dtype_t *type)
 Gets the minimum length of a character, in bytes. More...
 
static ulint dtype_get_mbmaxlen (const dtype_t *type)
 Gets the maximum length of a character, in bytes. More...
 
static void dtype_set_mbminmaxlen (dtype_t *type, ulint mbminlen, ulint mbmaxlen)
 Sets the minimum and maximum length of a character, in bytes. More...
 
static ulint dtype_get_fixed_size_low (ulint mtype, ulint prtype, ulint len, ulint mbminmaxlen, bool comp)
 Returns the size of a fixed size data type, 0 if not a fixed size type. More...
 
static ulint dtype_get_min_size_low (ulint mtype, ulint prtype, ulint len, ulint mbminmaxlen)
 Returns the minimum size of a data type. More...
 
static ulint dtype_get_max_size_low (ulint mtype, ulint len)
 Returns the maximum size of a data type. More...
 
static ulint dtype_get_sql_null_size (const dtype_t *type, bool comp)
 Returns the ROW_FORMAT=REDUNDANT stored SQL NULL size of a type. More...
 
static void dtype_read_for_order_and_null_size (dtype_t *type, const byte *buf)
 Reads to a type the stored information which determines its alphabetical ordering and the storage size of an SQL NULL value. More...
 
static void dtype_new_store_for_order_and_null_size (byte *buf, const dtype_t *type, ulint prefix_len)
 Stores for a type the information which determines its alphabetical ordering and the storage size of an SQL NULL value. More...
 
static void dtype_new_read_for_order_and_null_size (dtype_t *type, const byte *buf)
 Reads to a type the stored information which determines its alphabetical ordering and the storage size of an SQL NULL value. More...
 
static char * dtype_sql_name (unsigned mtype, unsigned prtype, unsigned len, char *name, unsigned name_sz)
 Returns the type's SQL name (e.g. More...
 
bool dtype_validate (const dtype_t *type)
 Validates a data type structure. More...
 
void dtype_print (const dtype_t *type)
 Print a data type structure. More...
 
std::ostream & operator<< (std::ostream &out, const dtype_t &obj)
 

Variables

ulint data_mysql_default_charset_coll
 
constexpr uint32_t DATA_MYSQL_BINARY_CHARSET_COLL = 63
 
constexpr uint32_t DATA_MISSING = 0
 missing column More...
 
constexpr uint32_t DATA_VARCHAR = 1
 character varying of the latin1_swedish_ci charset-collation; note that the MySQL format for this, DATA_BINARY, DATA_VARMYSQL, is also affected by whether the 'precise type' contains DATA_MYSQL_TRUE_VARCHAR More...
 
constexpr uint32_t DATA_CHAR = 2
 fixed length character of the latin1_swedish_ci charset-collation More...
 
constexpr uint32_t DATA_FIXBINARY = 3
 binary string of fixed length More...
 
constexpr uint32_t DATA_BINARY = 4
 binary string More...
 
constexpr uint32_t DATA_BLOB = 5
 binary large object, or a TEXT type; if prtype & DATA_BINARY_TYPE == 0, then this is actually a TEXT column (or a BLOB created with < 4.0.14; since column prefix indexes came only in 4.0.14, the missing flag in BLOBs created before that does not cause any harm) More...
 
constexpr uint32_t DATA_INT = 6
 integer: can be any size 1 - 8 bytes More...
 
constexpr uint32_t DATA_SYS_CHILD = 7
 address of the child page in node pointer More...
 
constexpr uint32_t DATA_SYS = 8
 system column More...
 
constexpr uint32_t DATA_FLOAT = 9
 
constexpr uint32_t DATA_DOUBLE = 10
 
constexpr uint32_t DATA_DECIMAL = 11
 decimal number stored as an ASCII string More...
 
constexpr uint32_t DATA_VARMYSQL = 12
 any charset varying length char More...
 
constexpr uint32_t DATA_MYSQL = 13
 any charset fixed length char NOTE that 4.1.1 used DATA_MYSQL and DATA_VARMYSQL for all character sets, and the charset-collation for tables created with it can also be latin1_swedish_ci More...
 
constexpr uint32_t DATA_GEOMETRY = 14
 
constexpr uint32_t DATA_POINT = 15
 geometry datatype of fixed length POINT More...
 
constexpr uint32_t DATA_VAR_POINT = 16
 geometry datatype of variable length POINT, used when we want to store POINT as BLOB internally More...
 
constexpr uint32_t DATA_MTYPE_MAX = 63
 dtype_store_for_order_and_null_size() requires the values are <= 63 More...
 
constexpr uint32_t DATA_MTYPE_CURRENT_MIN = DATA_VARCHAR
 minimum value of mtype More...
 
constexpr uint32_t DATA_MTYPE_CURRENT_MAX = DATA_VAR_POINT
 maximum value of mtype More...
 
constexpr uint32_t DATA_ENGLISH = 4
 English language character string: this is a relic from pre-MySQL time and only used for InnoDB's own system tables. More...
 
constexpr uint32_t DATA_ERROR = 111
 another relic from pre-MySQL time More...
 
constexpr uint32_t DATA_MYSQL_TYPE_MASK = 255
 AND with this mask to extract the MySQL type from the precise type. More...
 
constexpr uint32_t DATA_MYSQL_TRUE_VARCHAR = 15
 MySQL type code for the >= 5.0.3 format true VARCHAR. More...
 
constexpr uint32_t DATA_ROW_ID = 0
 row id: a 48-bit integer More...
 
constexpr uint32_t DATA_ROW_ID_LEN = 6
 stored length for row id More...
 
constexpr size_t DATA_TRX_ID = 1
 Transaction id: 6 bytes. More...
 
constexpr size_t DATA_TRX_ID_LEN = 6
 Transaction ID type size in bytes. More...
 
constexpr size_t DATA_ROLL_PTR = 2
 Rollback data pointer: 7 bytes. More...
 
constexpr size_t DATA_ROLL_PTR_LEN = 7
 Rollback data pointer type size in bytes. More...
 
constexpr uint32_t DATA_N_SYS_COLS = 3
 number of system columns defined above More...
 
constexpr uint32_t DATA_ITT_N_SYS_COLS = 2
 number of system columns for intrinsic temporary table More...
 
constexpr uint32_t DATA_FTS_DOC_ID = 3
 Used as FTS DOC ID column. More...
 
constexpr uint32_t DATA_SYS_PRTYPE_MASK = 0xF
 mask to extract the above from prtype More...
 
constexpr uint32_t DATA_NOT_NULL = 256
 this is ORed to the precise type when the column is declared as NOT NULL More...
 
constexpr uint32_t DATA_UNSIGNED = 512
 
constexpr uint32_t DATA_BINARY_TYPE = 1024
 if the data type is a binary character string, this is ORed to the precise type: this only holds for tables created with >= MySQL-4.0.14 More...
 
constexpr uint32_t DATA_GIS_MBR = 2048
 Used as GIS MBR column. More...
 
constexpr uint32_t DATA_MBR_LEN = SPDIMS * 2 * sizeof(double)
 GIS MBR length. More...
 
constexpr uint32_t DATA_LONG_TRUE_VARCHAR = 4096
 this is ORed to the precise data type when the column is true VARCHAR where MySQL uses 2 bytes to store the data len; for shorter VARCHARs MySQL uses only 1 byte More...
 
constexpr uint32_t DATA_VIRTUAL = 8192
 Virtual column. More...
 
constexpr uint32_t DATA_MULTI_VALUE = 16384
 Multi-value Virtual column. More...
 
constexpr uint32_t DATA_ORDER_NULL_TYPE_BUF_SIZE = 4
 
constexpr uint32_t DATA_NEW_ORDER_NULL_TYPE_BUF_SIZE = 6
 
constexpr uint32_t DATA_MBMAX = 5
 
constexpr uint32_t DATA_POINT_LEN = 25
 
constexpr uint32_t MAX_CHAR_COLL_NUM = 32767
 
constexpr uint32_t CHAR_COLL_MASK = MAX_CHAR_COLL_NUM
 

Detailed Description

Data types.

Created 1/16/1996 Heikki Tuuri

Macro Definition Documentation

◆ DATA_BIG_COL

#define DATA_BIG_COL (   col)    DATA_BIG_LEN_MTYPE((col)->len, (col)->mtype)

Enumeration Type Documentation

◆ ib_like_t

enum ib_like_t

SQL Like operator comparison types.

Enumerator
IB_LIKE_EXACT 

e.g.

STRING

IB_LIKE_PREFIX 

e.g., STRING%

Function Documentation

◆ DATA_BIG_LEN_MTYPE()

bool DATA_BIG_LEN_MTYPE ( ulint  len,
ulint  mtype 
)
inline

◆ DATA_GEOMETRY_MTYPE()

bool DATA_GEOMETRY_MTYPE ( ulint  mtype)
inline

◆ DATA_LARGE_MTYPE()

bool DATA_LARGE_MTYPE ( ulint  mtype)
inline

◆ DATA_MBMAXLEN()

ulint DATA_MBMAXLEN ( ulint  mbminmaxlen)
inline

◆ DATA_MBMINLEN()

ulint DATA_MBMINLEN ( ulint  mbminmaxlen)
inline

◆ DATA_MBMINMAXLEN()

ulint DATA_MBMINMAXLEN ( ulint  mbminlen,
ulint  mbmaxlen 
)
inline

◆ DATA_POINT_MTYPE()

bool DATA_POINT_MTYPE ( ulint  mtype)
inline

◆ dtype_copy()

static void dtype_copy ( dtype_t type1,
const dtype_t type2 
)
inlinestatic

Copies a data type structure.

Parameters
[in]type1type struct to copy to
[in]type2type struct to copy from

◆ dtype_form_prtype()

ulint dtype_form_prtype ( ulint  old_prtype,
ulint  charset_coll 
)

Forms a precise type from the < 4.1.2 format precise type plus the charset-collation code.

Returns
precise type, including the charset-collation code in: MySQL charset-collation code
precise type, including the charset-collation code
Parameters
old_prtypein: the MySQL type code and the flags DATA_BINARY_TYPE etc.
charset_collin: MySQL charset-collation code

◆ dtype_get_at_most_n_mbchars()

ulint dtype_get_at_most_n_mbchars ( ulint  prtype,
ulint  mbminmaxlen,
ulint  prefix_len,
ulint  data_len,
const char *  str 
)

Determine how many bytes the first n characters of the given string occupy.

If the string is shorter than n characters, returns the number of bytes the characters in the string occupy.

Returns
length of the prefix, in bytes in: the string whose prefix length is being determined

If the string is shorter than n characters, returns the number of bytes the characters in the string occupy.

Returns
length of the prefix, in bytes
Parameters
prtypein: precise type
mbminmaxlenin: minimum and maximum length of a multi-byte character
prefix_lenin: length of the requested prefix, in characters, multiplied by dtype_get_mbmaxlen(dtype)
data_lenin: length of str (in bytes)
strin: the string whose prefix length is being determined

◆ dtype_get_charset_coll()

static ulint dtype_get_charset_coll ( ulint  prtype)
inlinestatic

Gets the MySQL charset-collation code for MySQL string types.

Returns
MySQL charset-collation code in: precise data type

◆ dtype_get_fixed_size_low()

static ulint dtype_get_fixed_size_low ( ulint  mtype,
ulint  prtype,
ulint  len,
ulint  mbminmaxlen,
bool  comp 
)
inlinestatic

Returns the size of a fixed size data type, 0 if not a fixed size type.

Parameters
[in]mtypemain type
[in]prtypeprecise type
[in]lenlength
[in]mbminmaxlenminimum and maximum length of a multibyte character, in bytes
[in]compnonzero=ROW_FORMAT=COMPACT
Returns
fixed size, or 0

◆ dtype_get_len()

static ulint dtype_get_len ( const dtype_t type)
inlinestatic

Gets the type length.

Returns
fixed length of the type, in bytes, or 0 if variable-length in: data type

◆ dtype_get_max_size_low()

static ulint dtype_get_max_size_low ( ulint  mtype,
ulint  len 
)
inlinestatic

Returns the maximum size of a data type.

Note: types in system tables may be incomplete and return incorrect information.

Parameters
[in]mtypemain type
[in]lenlength
Returns
maximum size

◆ dtype_get_mblen()

static void dtype_get_mblen ( ulint  mtype,
ulint  prtype,
ulint mbminlen,
ulint mbmaxlen 
)
inlinestatic

Compute the mbminlen and mbmaxlen members of a data type structure.

Parameters
[in]mtypemain type
[in]prtypeprecise type (and collation)
[out]mbminlenminimum length of a multi-byte character
[out]mbmaxlenmaximum length of a multi-byte character

◆ dtype_get_mbmaxlen()

static ulint dtype_get_mbmaxlen ( const dtype_t type)
inlinestatic

Gets the maximum length of a character, in bytes.

Returns
maximum length of a char, in bytes, or 0 if this is not a character type in: type

◆ dtype_get_mbminlen()

static ulint dtype_get_mbminlen ( const dtype_t type)
inlinestatic

Gets the minimum length of a character, in bytes.

Returns
minimum length of a char, in bytes, or 0 if this is not a character type in: type

◆ dtype_get_min_size_low()

static ulint dtype_get_min_size_low ( ulint  mtype,
ulint  prtype,
ulint  len,
ulint  mbminmaxlen 
)
inlinestatic

Returns the minimum size of a data type.

Parameters
[in]mtypemain type
[in]prtypeprecise type
[in]lenlength
[in]mbminmaxlenminimum and maximum length of a multibyte character, in bytes
Returns
minimum size

◆ dtype_get_mtype()

static ulint dtype_get_mtype ( const dtype_t type)
inlinestatic

Gets the SQL main data type.

Returns
SQL main data type in: data type

◆ dtype_get_mysql_type()

static ulint dtype_get_mysql_type ( const dtype_t type)
inlinestatic

Gets the MySQL type code from a dtype.

Returns
MySQL type code; this is NOT an InnoDB type code! in: type struct

◆ dtype_get_prtype()

static ulint dtype_get_prtype ( const dtype_t type)
inlinestatic

Gets the precise data type.

Returns
precise data type in: data type

◆ dtype_get_sql_null_size()

static ulint dtype_get_sql_null_size ( const dtype_t type,
bool  comp 
)
inlinestatic

Returns the ROW_FORMAT=REDUNDANT stored SQL NULL size of a type.

For fixed length types it is the fixed length of the type, otherwise 0.

Parameters
[in]typetype struct
[in]compnonzero=ROW_FORMAT=COMPACT
Returns
SQL null storage size in ROW_FORMAT=REDUNDANT

◆ dtype_is_binary_string_type()

bool dtype_is_binary_string_type ( ulint  mtype,
ulint  prtype 
)

Checks if a type is a binary string type.

Note that for tables created with < 4.0.14, we do not know if a DATA_BLOB column is a BLOB or a TEXT column. For those DATA_BLOB columns this function currently returns false.

Returns
true if binary string type in: precise type

Note that for tables created with < 4.0.14, we do not know if a DATA_BLOB column is a BLOB or a TEXT column. For those DATA_BLOB columns this function currently returns false.

Returns
true if binary string type
Parameters
mtypein: main data type
prtypein: precise type

◆ dtype_is_non_binary_string_type()

bool dtype_is_non_binary_string_type ( ulint  mtype,
ulint  prtype 
)

Checks if a type is a non-binary string type.

That is, dtype_is_string_type is true and dtype_is_binary_string_type is false. Note that for tables created with < 4.0.14, we do not know if a DATA_BLOB column is a BLOB or a TEXT column. For those DATA_BLOB columns this function currently returns true.

Returns
true if non-binary string type in: precise type

That is, dtype_is_string_type is true and dtype_is_binary_string_type is false. Note that for tables created with < 4.0.14, we do not know if a DATA_BLOB column is a BLOB or a TEXT column. For those DATA_BLOB columns this function currently returns true.

Returns
true if non-binary string type
Parameters
mtypein: main data type
prtypein: precise type

◆ dtype_is_string_type()

bool dtype_is_string_type ( ulint  mtype)

Checks if a data main type is a string type.

Also a BLOB is considered a string type.

Returns
true if string type in: InnoDB main data type code: DATA_CHAR, ...

Also a BLOB is considered a string type.

Returns
true if string type
Parameters
mtypein: InnoDB main data type code: DATA_CHAR, ...

◆ dtype_is_utf8()

static bool dtype_is_utf8 ( ulint  prtype)
inlinestatic

Determines if a MySQL string type is a subset of UTF-8.

This function may return false negatives, in case further character-set collation codes are introduced in MySQL later.

Returns
true if a subset of UTF-8 in: precise data type

◆ dtype_new_read_for_order_and_null_size()

static void dtype_new_read_for_order_and_null_size ( dtype_t type,
const byte buf 
)
inlinestatic

Reads to a type the stored information which determines its alphabetical ordering and the storage size of an SQL NULL value.

This is the 4.1.x storage format.

Parameters
[in]typetype struct
[in]bufbuffer for stored type order info

◆ dtype_new_store_for_order_and_null_size()

static void dtype_new_store_for_order_and_null_size ( byte buf,
const dtype_t type,
ulint  prefix_len 
)
inlinestatic

Stores for a type the information which determines its alphabetical ordering and the storage size of an SQL NULL value.

This is the >= 4.1.x storage format.

Parameters
[in]bufbuffer for DATA_NEW_ORDER_NULL_TYPE_BUF_SIZE bytes where we store the info
[in]typetype struct
[in]prefix_lenprefix length to replace type->len, or 0

◆ dtype_print()

void dtype_print ( const dtype_t type)

Print a data type structure.

Parameters
[in]typedata type

◆ dtype_read_for_order_and_null_size()

static void dtype_read_for_order_and_null_size ( dtype_t type,
const byte buf 
)
inlinestatic

Reads to a type the stored information which determines its alphabetical ordering and the storage size of an SQL NULL value.

Parameters
[in]typetype struct
[in]bufbuffer for the stored order info

◆ dtype_set()

static void dtype_set ( dtype_t type,
ulint  mtype,
ulint  prtype,
ulint  len 
)
inlinestatic

Sets a data type structure.

Parameters
[in]typetype struct to init
[in]mtypemain data type
[in]prtypeprecise type
[in]lenprecision of type

◆ dtype_set_mbminmaxlen()

static void dtype_set_mbminmaxlen ( dtype_t type,
ulint  mbminlen,
ulint  mbmaxlen 
)
inlinestatic

Sets the minimum and maximum length of a character, in bytes.

Parameters
[in,out]typetype
[in]mbminlenminimum length of a char, in bytes, or 0 if this is not a character type
[in]mbmaxlenmaximum length of a char, in bytes, or 0 if this is not a character type

◆ dtype_sql_name()

static char * dtype_sql_name ( unsigned  mtype,
unsigned  prtype,
unsigned  len,
char *  name,
unsigned  name_sz 
)
inlinestatic

Returns the type's SQL name (e.g.

BIGINT UNSIGNED) from mtype,prtype,len

Parameters
[in]mtypemain type
[in]prtypeprecise type
[in]lenlength
[out]nameSQL name
[in]name_szsize of the name buffer
Returns
the SQL type name

◆ dtype_validate()

bool dtype_validate ( const dtype_t type)

Validates a data type structure.

Returns
true if ok in: type struct to validate
true if ok
Parameters
typein: type struct to validate

◆ operator<<()

std::ostream & operator<< ( std::ostream &  out,
const dtype_t obj 
)
inline

Variable Documentation

◆ CHAR_COLL_MASK

constexpr uint32_t CHAR_COLL_MASK = MAX_CHAR_COLL_NUM
constexpr

◆ DATA_BINARY

constexpr uint32_t DATA_BINARY = 4
constexpr

binary string

◆ DATA_BINARY_TYPE

constexpr uint32_t DATA_BINARY_TYPE = 1024
constexpr

if the data type is a binary character string, this is ORed to the precise type: this only holds for tables created with >= MySQL-4.0.14

◆ DATA_BLOB

constexpr uint32_t DATA_BLOB = 5
constexpr

binary large object, or a TEXT type; if prtype & DATA_BINARY_TYPE == 0, then this is actually a TEXT column (or a BLOB created with < 4.0.14; since column prefix indexes came only in 4.0.14, the missing flag in BLOBs created before that does not cause any harm)

◆ DATA_CHAR

constexpr uint32_t DATA_CHAR = 2
constexpr

fixed length character of the latin1_swedish_ci charset-collation

◆ DATA_DECIMAL

constexpr uint32_t DATA_DECIMAL = 11
constexpr

decimal number stored as an ASCII string

◆ DATA_DOUBLE

constexpr uint32_t DATA_DOUBLE = 10
constexpr

◆ DATA_ENGLISH

constexpr uint32_t DATA_ENGLISH = 4
constexpr

English language character string: this is a relic from pre-MySQL time and only used for InnoDB's own system tables.

◆ DATA_ERROR

constexpr uint32_t DATA_ERROR = 111
constexpr

another relic from pre-MySQL time

◆ DATA_FIXBINARY

constexpr uint32_t DATA_FIXBINARY = 3
constexpr

binary string of fixed length

◆ DATA_FLOAT

constexpr uint32_t DATA_FLOAT = 9
constexpr

◆ DATA_FTS_DOC_ID

constexpr uint32_t DATA_FTS_DOC_ID = 3
constexpr

Used as FTS DOC ID column.

◆ DATA_GEOMETRY

constexpr uint32_t DATA_GEOMETRY = 14
constexpr

◆ DATA_GIS_MBR

constexpr uint32_t DATA_GIS_MBR = 2048
constexpr

Used as GIS MBR column.

◆ DATA_INT

constexpr uint32_t DATA_INT = 6
constexpr

integer: can be any size 1 - 8 bytes

◆ DATA_ITT_N_SYS_COLS

constexpr uint32_t DATA_ITT_N_SYS_COLS = 2
constexpr

number of system columns for intrinsic temporary table

◆ DATA_LONG_TRUE_VARCHAR

constexpr uint32_t DATA_LONG_TRUE_VARCHAR = 4096
constexpr

this is ORed to the precise data type when the column is true VARCHAR where MySQL uses 2 bytes to store the data len; for shorter VARCHARs MySQL uses only 1 byte

◆ DATA_MBMAX

constexpr uint32_t DATA_MBMAX = 5
constexpr

◆ DATA_MBR_LEN

constexpr uint32_t DATA_MBR_LEN = SPDIMS * 2 * sizeof(double)
constexpr

GIS MBR length.

◆ DATA_MISSING

constexpr uint32_t DATA_MISSING = 0
constexpr

missing column

◆ DATA_MTYPE_CURRENT_MAX

constexpr uint32_t DATA_MTYPE_CURRENT_MAX = DATA_VAR_POINT
constexpr

maximum value of mtype

◆ DATA_MTYPE_CURRENT_MIN

constexpr uint32_t DATA_MTYPE_CURRENT_MIN = DATA_VARCHAR
constexpr

minimum value of mtype

◆ DATA_MTYPE_MAX

constexpr uint32_t DATA_MTYPE_MAX = 63
constexpr

dtype_store_for_order_and_null_size() requires the values are <= 63

◆ DATA_MULTI_VALUE

constexpr uint32_t DATA_MULTI_VALUE = 16384
constexpr

Multi-value Virtual column.

◆ DATA_MYSQL

constexpr uint32_t DATA_MYSQL = 13
constexpr

any charset fixed length char NOTE that 4.1.1 used DATA_MYSQL and DATA_VARMYSQL for all character sets, and the charset-collation for tables created with it can also be latin1_swedish_ci

◆ DATA_MYSQL_BINARY_CHARSET_COLL

constexpr uint32_t DATA_MYSQL_BINARY_CHARSET_COLL = 63
constexpr

◆ data_mysql_default_charset_coll

ulint data_mysql_default_charset_coll
extern

◆ DATA_MYSQL_TRUE_VARCHAR

constexpr uint32_t DATA_MYSQL_TRUE_VARCHAR = 15
constexpr

MySQL type code for the >= 5.0.3 format true VARCHAR.

◆ DATA_MYSQL_TYPE_MASK

constexpr uint32_t DATA_MYSQL_TYPE_MASK = 255
constexpr

AND with this mask to extract the MySQL type from the precise type.

◆ DATA_N_SYS_COLS

constexpr uint32_t DATA_N_SYS_COLS = 3
constexpr

number of system columns defined above

◆ DATA_NEW_ORDER_NULL_TYPE_BUF_SIZE

constexpr uint32_t DATA_NEW_ORDER_NULL_TYPE_BUF_SIZE = 6
constexpr

◆ DATA_NOT_NULL

constexpr uint32_t DATA_NOT_NULL = 256
constexpr

this is ORed to the precise type when the column is declared as NOT NULL

◆ DATA_ORDER_NULL_TYPE_BUF_SIZE

constexpr uint32_t DATA_ORDER_NULL_TYPE_BUF_SIZE = 4
constexpr

◆ DATA_POINT

constexpr uint32_t DATA_POINT = 15
constexpr

geometry datatype of fixed length POINT

◆ DATA_POINT_LEN

constexpr uint32_t DATA_POINT_LEN = 25
constexpr

◆ DATA_ROLL_PTR

constexpr size_t DATA_ROLL_PTR = 2
constexpr

Rollback data pointer: 7 bytes.

◆ DATA_ROLL_PTR_LEN

constexpr size_t DATA_ROLL_PTR_LEN = 7
constexpr

Rollback data pointer type size in bytes.

◆ DATA_ROW_ID

constexpr uint32_t DATA_ROW_ID = 0
constexpr

row id: a 48-bit integer

◆ DATA_ROW_ID_LEN

constexpr uint32_t DATA_ROW_ID_LEN = 6
constexpr

stored length for row id

◆ DATA_SYS

constexpr uint32_t DATA_SYS = 8
constexpr

system column

◆ DATA_SYS_CHILD

constexpr uint32_t DATA_SYS_CHILD = 7
constexpr

address of the child page in node pointer

◆ DATA_SYS_PRTYPE_MASK

constexpr uint32_t DATA_SYS_PRTYPE_MASK = 0xF
constexpr

mask to extract the above from prtype

◆ DATA_TRX_ID

constexpr size_t DATA_TRX_ID = 1
constexpr

Transaction id: 6 bytes.

◆ DATA_TRX_ID_LEN

constexpr size_t DATA_TRX_ID_LEN = 6
constexpr

Transaction ID type size in bytes.

◆ DATA_UNSIGNED

constexpr uint32_t DATA_UNSIGNED = 512
constexpr

◆ DATA_VAR_POINT

constexpr uint32_t DATA_VAR_POINT = 16
constexpr

geometry datatype of variable length POINT, used when we want to store POINT as BLOB internally

◆ DATA_VARCHAR

constexpr uint32_t DATA_VARCHAR = 1
constexpr

character varying of the latin1_swedish_ci charset-collation; note that the MySQL format for this, DATA_BINARY, DATA_VARMYSQL, is also affected by whether the 'precise type' contains DATA_MYSQL_TRUE_VARCHAR

◆ DATA_VARMYSQL

constexpr uint32_t DATA_VARMYSQL = 12
constexpr

any charset varying length char

◆ DATA_VIRTUAL

constexpr uint32_t DATA_VIRTUAL = 8192
constexpr

Virtual column.

◆ MAX_CHAR_COLL_NUM

constexpr uint32_t MAX_CHAR_COLL_NUM = 32767
constexpr