285#define DATA_BIG_COL(col) DATA_BIG_LEN_MTYPE((col)->len, (col)->mtype)
293#ifndef UNIV_HOTBACKUP
353#ifndef UNIV_HOTBACKUP
375#ifndef UNIV_HOTBACKUP
386#ifndef UNIV_HOTBACKUP
442#ifndef UNIV_HOTBACKUP
477 unsigned len,
char *
name,
unsigned name_sz);
525 std::ostream &
print(std::ostream &out)
const;
529 return (obj.
print(out));
532static_assert(
true == 1,
"true != 1");
static ulint dtype_get_mbmaxlen(const dtype_t *type)
Gets the maximum length of a character, in bytes.
constexpr uint32_t DATA_FLOAT
Definition: data0type.h:79
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 siz...
static char * dtype_sql_name(unsigned mtype, unsigned prtype, unsigned len, char *name, unsigned name_sz)
Returns the type's SQL name (e.g.
constexpr uint32_t DATA_GIS_MBR
Used as GIS MBR column.
Definition: data0type.h:213
constexpr uint32_t DATA_MULTI_VALUE
Multi-value Virtual column.
Definition: data0type.h:224
constexpr uint32_t DATA_FIXBINARY
binary string of fixed length
Definition: data0type.h:61
constexpr uint32_t DATA_POINT
geometry datatype of fixed length POINT
Definition: data0type.h:106
ulint DATA_MBMINMAXLEN(ulint mbminlen, ulint mbmaxlen)
Definition: data0type.h:249
constexpr uint32_t DATA_BINARY
binary string
Definition: data0type.h:63
constexpr uint32_t DATA_SYS_PRTYPE_MASK
mask to extract the above from prtype
Definition: data0type.h:202
constexpr size_t DATA_ROLL_PTR
Rollback data pointer: 7 bytes.
Definition: data0type.h:187
constexpr uint32_t DATA_BLOB
binary large object, or a TEXT type; if prtype & DATA_BINARY_TYPE == 0, then this is actually a TEXT ...
Definition: data0type.h:68
constexpr uint32_t DATA_MISSING
missing column
Definition: data0type.h:53
constexpr uint32_t DATA_MYSQL_BINARY_CHARSET_COLL
Definition: data0type.h:39
static ulint dtype_get_mtype(const dtype_t *type)
Gets the SQL main data type.
static void dtype_get_mblen(ulint mtype, ulint prtype, ulint *mbminlen, ulint *mbmaxlen)
Compute the mbminlen and mbmaxlen members of a data type structure.
constexpr uint32_t DATA_MBMAX
Definition: data0type.h:237
constexpr size_t DATA_ROLL_PTR_LEN
Rollback data pointer type size in bytes.
Definition: data0type.h:190
constexpr uint32_t DATA_SYS_CHILD
address of the child page in node pointer
Definition: data0type.h:72
static ulint dtype_get_max_size_low(ulint mtype, ulint len)
Returns the maximum size of a data type.
constexpr uint32_t DATA_VAR_POINT
geometry datatype of variable length POINT, used when we want to store POINT as BLOB internally
Definition: data0type.h:109
constexpr uint32_t MAX_CHAR_COLL_NUM
Definition: data0type.h:288
constexpr uint32_t DATA_MTYPE_MAX
dtype_store_for_order_and_null_size() requires the values are <= 63
Definition: data0type.h:111
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 siz...
constexpr uint32_t DATA_VIRTUAL
Virtual column.
Definition: data0type.h:222
constexpr uint32_t DATA_FTS_DOC_ID
Used as FTS DOC ID column.
Definition: data0type.h:199
constexpr uint32_t DATA_ROW_ID
row id: a 48-bit integer
Definition: data0type.h:176
ulint data_mysql_default_charset_coll
Definition: data0type.cc:45
constexpr uint32_t DATA_ITT_N_SYS_COLS
number of system columns for intrinsic temporary table
Definition: data0type.h:196
static ulint dtype_get_mbminlen(const dtype_t *type)
Gets the minimum length of a character, in bytes.
constexpr uint32_t DATA_MYSQL_TRUE_VARCHAR
MySQL type code for the >= 5.0.3 format true VARCHAR.
Definition: data0type.h:170
constexpr uint32_t DATA_SYS
system column
Definition: data0type.h:74
constexpr size_t DATA_TRX_ID
Transaction id: 6 bytes.
Definition: data0type.h:181
static ulint dtype_get_len(const dtype_t *type)
Gets the type length.
bool dtype_is_string_type(ulint mtype)
Checks if a data main type is a string type.
Definition: data0type.cc:84
ulint DATA_MBMINLEN(ulint mbminmaxlen)
Definition: data0type.h:254
bool dtype_validate(const dtype_t *type)
Validates a data type structure.
Definition: data0type.cc:141
bool DATA_LARGE_MTYPE(ulint mtype)
Definition: data0type.h:274
constexpr uint32_t CHAR_COLL_MASK
Definition: data0type.h:291
constexpr uint32_t DATA_MTYPE_CURRENT_MAX
maximum value of mtype
Definition: data0type.h:116
constexpr uint32_t DATA_UNSIGNED
Definition: data0type.h:208
constexpr uint32_t DATA_POINT_LEN
Definition: data0type.h:246
static void dtype_set_mbminmaxlen(dtype_t *type, ulint mbminlen, ulint mbmaxlen)
Sets the minimum and maximum length of a character, in bytes.
constexpr uint32_t DATA_VARMYSQL
any charset varying length char
Definition: data0type.h:84
constexpr uint32_t DATA_MBR_LEN
GIS MBR length.
Definition: data0type.h:215
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 ...
constexpr size_t DATA_TRX_ID_LEN
Transaction ID type size in bytes.
Definition: data0type.h:184
std::ostream & operator<<(std::ostream &out, const dtype_t &obj)
Definition: data0type.h:528
constexpr uint32_t DATA_ROW_ID_LEN
stored length for row id
Definition: data0type.h:178
constexpr uint32_t DATA_BINARY_TYPE
if the data type is a binary character string, this is ORed to the precise type: this only holds for ...
Definition: data0type.h:211
static void dtype_copy(dtype_t *type1, const dtype_t *type2)
Copies a data type structure.
ulint DATA_MBMAXLEN(ulint mbminmaxlen)
Definition: data0type.h:258
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.
Definition: data0type.cc:51
constexpr uint32_t DATA_ENGLISH
English language character string: this is a relic from pre-MySQL time and only used for InnoDB's own...
Definition: data0type.h:163
constexpr uint32_t DATA_INT
integer: can be any size 1 - 8 bytes
Definition: data0type.h:70
bool dtype_is_non_binary_string_type(ulint mtype, ulint prtype)
Checks if a type is a non-binary string type.
Definition: data0type.cc:114
constexpr uint32_t DATA_DOUBLE
Definition: data0type.h:80
static void dtype_set(dtype_t *type, ulint mtype, ulint prtype, ulint len)
Sets a data type structure.
constexpr uint32_t DATA_CHAR
fixed length character of the latin1_swedish_ci charset-collation
Definition: data0type.h:59
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.
constexpr uint32_t DATA_LONG_TRUE_VARCHAR
this is ORed to the precise data type when the column is true VARCHAR where MySQL uses 2 bytes to sto...
Definition: data0type.h:220
constexpr uint32_t DATA_DECIMAL
decimal number stored as an ASCII string
Definition: data0type.h:82
static ulint dtype_get_prtype(const dtype_t *type)
Gets the precise data type.
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.
Definition: data0type.cc:128
constexpr uint32_t DATA_NOT_NULL
this is ORed to the precise type when the column is declared as NOT NULL
Definition: data0type.h:206
constexpr uint32_t DATA_N_SYS_COLS
number of system columns defined above
Definition: data0type.h:193
constexpr uint32_t DATA_NEW_ORDER_NULL_TYPE_BUF_SIZE
Definition: data0type.h:234
static bool dtype_is_utf8(ulint prtype)
Determines if a MySQL string type is a subset of UTF-8.
constexpr uint32_t DATA_MTYPE_CURRENT_MIN
minimum value of mtype
Definition: data0type.h:114
constexpr uint32_t DATA_MYSQL_TYPE_MASK
AND with this mask to extract the MySQL type from the precise type.
Definition: data0type.h:168
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.
void dtype_print(const dtype_t *type)
Print a data type structure.
Definition: data0type.cc:159
constexpr uint32_t DATA_VARCHAR
character varying of the latin1_swedish_ci charset-collation; note that the MySQL format for this,...
Definition: data0type.h:57
static ulint dtype_get_min_size_low(ulint mtype, ulint prtype, ulint len, ulint mbminmaxlen)
Returns the minimum size of a data type.
constexpr uint32_t DATA_ORDER_NULL_TYPE_BUF_SIZE
Definition: data0type.h:231
static ulint dtype_get_charset_coll(ulint prtype)
Gets the MySQL charset-collation code for MySQL string types.
ib_like_t
SQL Like operator comparison types.
Definition: data0type.h:45
@ IB_LIKE_PREFIX
e.g., STRING%
Definition: data0type.h:47
@ IB_LIKE_EXACT
e.g.
Definition: data0type.h:46
constexpr uint32_t DATA_MYSQL
any charset fixed length char NOTE that 4.1.1 used DATA_MYSQL and DATA_VARMYSQL for all character set...
Definition: data0type.h:89
static ulint dtype_get_mysql_type(const dtype_t *type)
Gets the MySQL type code from a dtype.
constexpr uint32_t DATA_ERROR
another relic from pre-MySQL time
Definition: data0type.h:165
bool dtype_is_binary_string_type(ulint mtype, ulint prtype)
Checks if a type is a binary string type.
Definition: data0type.cc:98
constexpr uint32_t DATA_GEOMETRY
Definition: data0type.h:100
bool DATA_BIG_LEN_MTYPE(ulint len, ulint mtype)
Definition: data0type.h:280
bool DATA_POINT_MTYPE(ulint mtype)
Definition: data0type.h:263
bool DATA_GEOMETRY_MTYPE(ulint mtype)
Definition: data0type.h:268
std::string str(const mysqlrouter::ConfigGenerator::Options::Endpoint &ep)
Definition: config_generator.cc:1063
Definition: buf0block_hint.cc:29
required string type
Definition: replication_group_member_actions.proto:33
case opt name
Definition: sslopt-case.h:32
Definition: data0type.h:497
unsigned prtype
precise type; MySQL data type, charset code, flags to indicate nullability, signedness,...
Definition: data0type.h:498
std::ostream & print(std::ostream &out) const
Definition: data0type.cc:272
unsigned len
length; for MySQL data this is field->pack_length(), except that for a >= 5.0.3 type true VARCHAR thi...
Definition: data0type.h:509
bool is_virtual() const
Definition: data0type.h:523
unsigned mbminmaxlen
minimum and maximum length of a character, in bytes; DATA_MBMINMAXLEN(mbminlen,mbmaxlen); mbminlen=DA...
Definition: data0type.h:517
unsigned mtype
main data type
Definition: data0type.h:505
Version control for database, common definitions, and include files.
constexpr uint32_t SPDIMS
Definition: univ.i:642
unsigned long int ulint
Definition: univ.i:405
#define UNIV_EXPECT(expr, value)
Definition: univ.i:511