MySQL  8.0.18
Source Code Documentation
sql_const.h File Reference

File containing constants that can be used throughout the server. More...

#include "my_inttypes.h"

Go to the source code of this file.

Macros

#define LIBLEN   FN_REFLEN - FN_LEN /* Max l{ngd p} dev */
 
#define MAX_DBKEY_LENGTH   (NAME_LEN * 2 + 1 + 1 + 4 + 4)
 The maximum length of a key in the table definition cache. More...
 
#define MAX_ALIAS_NAME   256
 
#define MAX_FIELD_NAME   34 /* Max colum name length +2 */
 
#define MAX_SYS_VAR_LENGTH   32
 
#define MAX_KEY   MAX_INDEXES /* Max used keys */
 
#define MAX_REF_PARTS   16U /* Max parts used as ref */
 
#define MAX_KEY_LENGTH   3072U /* max possible key */
 
#define MAX_REFLENGTH   4 /* Max length for record ref */
 
#define MAX_MBWIDTH   3 /* Max multibyte sequence */
 
#define MAX_FIELD_CHARLENGTH   255
 
#define MAX_FIELD_VARCHARLENGTH   65535
 
#define MAX_FIELD_BLOBLENGTH   UINT_MAX32 /* cf field_blob::get_length() */
 
#define CONVERT_IF_BIGGER_TO_BLOB   512 /* Used for CREATE ... SELECT */
 CHAR and VARCHAR fields longer than this number of characters are converted to BLOB. More...
 
#define MAX_FIELD_WIDTH   (MAX_FIELD_CHARLENGTH * MAX_MBWIDTH + 1)
 
#define MAX_BIT_FIELD_LENGTH   64 /* Max length in bits for bit fields */
 
#define MAX_DATE_WIDTH   10 /* YYYY-MM-DD */
 
#define MAX_TIME_WIDTH   10 /* -838:59:59 */
 
#define MAX_TIME_FULL_WIDTH   23 /* -DDDDDD HH:MM:SS.###### */
 
#define MAX_DATETIME_FULL_WIDTH   29 /* YYYY-MM-DD HH:MM:SS.###### AM */
 
#define MAX_DATETIME_WIDTH   19 /* YYYY-MM-DD HH:MM:SS */
 
#define MAX_DATETIME_COMPRESSED_WIDTH   14 /* YYYYMMDDHHMMSS */
 
#define DATE_INT_DIGITS   8 /* YYYYMMDD */
 
#define TIME_INT_DIGITS   7 /* hhhmmss */
 
#define DATETIME_INT_DIGITS   14 /* YYYYMMDDhhmmss */
 
#define MAX_TABLES_FOR_SIZE   (sizeof(table_map) * 8)
 MAX_TABLES and xxx_TABLE_BIT are used in optimization of table factors and expressions, and in join plan generation. More...
 
#define MAX_TABLES   (MAX_TABLES_FOR_SIZE - 3)
 Max tables in join. More...
 
#define INNER_TABLE_BIT   (((table_map)1) << (MAX_TABLES + 0))
 
#define OUTER_REF_TABLE_BIT   (((table_map)1) << (MAX_TABLES + 1))
 
#define RAND_TABLE_BIT   (((table_map)1) << (MAX_TABLES + 2))
 
#define PSEUDO_TABLE_BITS   (INNER_TABLE_BIT | OUTER_REF_TABLE_BIT | RAND_TABLE_BIT)
 
#define MAX_FIELDS   4096 /* Maximum number of columns */
 
#define MAX_PARTITIONS   8192
 
#define MAX_ENUM_VALUES   65535 /* Max number of enumeration values */
 
#define MAX_INTERVAL_VALUE_LENGTH   255 /* Max length of enum/set values */
 
#define MAX_SELECT_NESTING   (sizeof(nesting_map) * 8 - 1)
 
#define DEFAULT_SORT_MEMORY   (256UL * 1024UL)
 
#define MIN_SORT_MEMORY   (32UL * 1024UL)
 
#define STRING_BUFFER_USUAL_SIZE   80
 
#define MEM_ROOT_BLOCK_SIZE   8192
 
#define MEM_ROOT_PREALLOC   8192
 
#define TRANS_MEM_ROOT_BLOCK_SIZE   4096
 
#define TRANS_MEM_ROOT_PREALLOC   4096
 
#define DEFAULT_ERROR_COUNT   1024
 
#define EXTRA_RECORDS   10 /* Extra records in sort */
 
#define SCROLL_EXTRA   5 /* Extra scroll-rows. */
 
#define FERR   -1 /* Error from my_functions */
 
#define CREATE_MODE   0 /* Default mode on new files */
 
#define NAMES_SEP_CHAR   '\377' /* Char to sep. names */
 
#define READ_RECORD_BUFFER   (uint)(IO_SIZE * 8) /* Pointer_buffer_size */
 
#define DISK_BUFFER_SIZE   (uint)(IO_SIZE * 16) /* Size of diskbuffer */
 
#define ACL_CACHE_SIZE   256
 
#define MAX_PASSWORD_LENGTH   32
 
#define HOST_CACHE_SIZE   128
 
#define MAX_ACCEPT_RETRY   10
 
#define MAX_FIELDS_BEFORE_HASH   32
 
#define USER_VARS_HASH_SIZE   16
 
#define TABLE_OPEN_CACHE_MIN   400
 
#define TABLE_OPEN_CACHE_DEFAULT   4000
 
#define MAX_CONNECTIONS_DEFAULT   151
 Maximum number of connections default value. More...
 
#define STACK_MIN_SIZE   20000
 
#define STACK_MIN_SIZE_FOR_OPEN   1024 * 80
 
#define STACK_BUFF_ALLOC   352
 For stack overrun checks. More...
 
#define MYSQLD_NET_RETRY_COUNT   10
 Abort read after this many int. More...
 
#define QUERY_ALLOC_BLOCK_SIZE   8192
 
#define QUERY_ALLOC_PREALLOC_SIZE   8192
 
#define TRANS_ALLOC_BLOCK_SIZE   4096
 
#define TRANS_ALLOC_PREALLOC_SIZE   4096
 
#define RANGE_ALLOC_BLOCK_SIZE   4096
 
#define ACL_ALLOC_BLOCK_SIZE   1024
 
#define UDF_ALLOC_BLOCK_SIZE   1024
 
#define TABLE_ALLOC_BLOCK_SIZE   1024
 
#define WARN_ALLOC_BLOCK_SIZE   2048
 
#define MIN_FILE_LENGTH_TO_USE_ROW_CACHE   (10L * 1024 * 1024)
 
#define MIN_ROWS_TO_USE_TABLE_CACHE   100
 
#define MIN_ROWS_TO_USE_BULK_INSERT   100
 
#define DISK_SEEK_BASE_COST   (0.9)
 
#define BLOCKS_IN_AVG_SEEK   128
 
#define DISK_SEEK_PROP_COST   (0.1 / BLOCKS_IN_AVG_SEEK)
 
#define MATCHING_ROWS_IN_OTHER_TABLE   10
 Number of rows in a reference table when refereed through a not unique key. More...
 
#define MY_CHARSET_BIN_MB_MAXLEN   1
 
#define KEY_DEFAULT_PACK_LENGTH   8
 Don't pack string keys shorter than this (if PACK_KEYS=1 isn't used). More...
 
#define PROCESS_LIST_WIDTH   100
 Characters shown for the command in 'show processlist'. More...
 
#define PROCESS_LIST_INFO_WIDTH   65535
 
#define PRECISION_FOR_DOUBLE   53
 
#define PRECISION_FOR_FLOAT   24
 
#define MAX_FLOAT_STR_LENGTH   (FLT_DIG + 6)
 
#define MAX_DOUBLE_STR_LENGTH   (DBL_DIG + 7)
 
#define CONNECT_TIMEOUT   10
 
#define DEFAULT_CONCURRENCY   10
 
#define DELAYED_LIMIT   100
 pause after xxx inserts More...
 
#define DELAYED_QUEUE_SIZE   1000
 
#define DELAYED_WAIT_TIMEOUT   5 * 60
 Wait for delayed insert. More...
 
#define LONG_TIMEOUT   ((ulong)3600L * 24L * 365L)
 
#define MAX_TIME_ZONE_NAME_LENGTH   (NAME_LEN + 1)
 Maximum length of time zone name that we support (Time zone name is char(64) in db). More...
 
#define INTERRUPT_PRIOR   10
 
#define CONNECT_PRIOR   9
 
#define WAIT_PRIOR   8
 
#define QUERY_PRIOR   6
 
#define CONTEXT_ANALYSIS_ONLY_PREPARE   1
 
#define CONTEXT_ANALYSIS_ONLY_VIEW   2
 
#define CONTEXT_ANALYSIS_ONLY_DERIVED   4
 
#define OPTIMIZER_SWITCH_INDEX_MERGE   (1ULL << 0)
 
#define OPTIMIZER_SWITCH_INDEX_MERGE_UNION   (1ULL << 1)
 
#define OPTIMIZER_SWITCH_INDEX_MERGE_SORT_UNION   (1ULL << 2)
 
#define OPTIMIZER_SWITCH_INDEX_MERGE_INTERSECT   (1ULL << 3)
 
#define OPTIMIZER_SWITCH_ENGINE_CONDITION_PUSHDOWN   (1ULL << 4)
 
#define OPTIMIZER_SWITCH_INDEX_CONDITION_PUSHDOWN   (1ULL << 5)
 
#define OPTIMIZER_SWITCH_MRR   (1ULL << 6)
 If this is off, MRR is never used. More...
 
#define OPTIMIZER_SWITCH_MRR_COST_BASED   (1ULL << 7)
 If OPTIMIZER_SWITCH_MRR is on and this is on, MRR is used depending on a cost-based choice ("automatic"). More...
 
#define OPTIMIZER_SWITCH_BNL   (1ULL << 8)
 
#define OPTIMIZER_SWITCH_BKA   (1ULL << 9)
 
#define OPTIMIZER_SWITCH_MATERIALIZATION   (1ULL << 10)
 
#define OPTIMIZER_SWITCH_SEMIJOIN   (1ULL << 11)
 
#define OPTIMIZER_SWITCH_LOOSE_SCAN   (1ULL << 12)
 
#define OPTIMIZER_SWITCH_FIRSTMATCH   (1ULL << 13)
 
#define OPTIMIZER_SWITCH_DUPSWEEDOUT   (1ULL << 14)
 
#define OPTIMIZER_SWITCH_SUBQ_MAT_COST_BASED   (1ULL << 15)
 
#define OPTIMIZER_SWITCH_USE_INDEX_EXTENSIONS   (1ULL << 16)
 
#define OPTIMIZER_SWITCH_COND_FANOUT_FILTER   (1ULL << 17)
 
#define OPTIMIZER_SWITCH_DERIVED_MERGE   (1ULL << 18)
 
#define OPTIMIZER_SWITCH_USE_INVISIBLE_INDEXES   (1ULL << 19)
 
#define OPTIMIZER_SKIP_SCAN   (1ULL << 20)
 
#define OPTIMIZER_SWITCH_HASH_JOIN   (1ULL << 21)
 
#define OPTIMIZER_SWITCH_LAST   (1ULL << 22)
 
#define OPTIMIZER_SWITCH_DEFAULT
 
#define MYSQLD_SUCCESS_EXIT   0
 
#define MYSQLD_ABORT_EXIT   1
 
#define MYSQLD_FAILURE_EXIT   2
 
#define MYSQLD_RESTART_EXIT   16
 
#define UUID_LENGTH   (8 + 1 + 4 + 1 + 4 + 1 + 4 + 1 + 12)
 

Typedefs

typedef bool(Item::* Item_processor) (uchar *arg)
 Processor type for {Item,SELECT_LEX[_UNIT],Table_function}walk. More...
 

Enumerations

enum  SHOW_COMP_OPTION { SHOW_OPTION_YES, SHOW_OPTION_NO, SHOW_OPTION_DISABLED }
 
enum  enum_mark_columns { MARK_COLUMNS_NONE, MARK_COLUMNS_READ, MARK_COLUMNS_WRITE, MARK_COLUMNS_TEMP }
 
enum  enum_resolution_type {
  NOT_RESOLVED = 0, RESOLVED_BEHIND_ALIAS, RESOLVED_AGAINST_ALIAS, RESOLVED_WITH_NO_ALIAS,
  RESOLVED_IGNORING_ALIAS
}
 
enum  enum_walk {
  enum_walk::PREFIX = 0x01, enum_walk::POSTFIX = 0x02, enum_walk::SUBQUERY = 0x04, enum_walk::SUBQUERY_PREFIX = 0x05,
  enum_walk::SUBQUERY_POSTFIX = 0x06
}
 Enumeration for {Item,SELECT_LEX[_UNIT],Table_function}walk. More...
 

Functions

enum_walk operator| (enum_walk lhs, enum_walk rhs)
 
bool operator & (enum_walk lhs, enum_walk rhs)
 

Variables

static const ulong TABLE_DEF_CACHE_DEFAULT = 400
 
static const ulong SCHEMA_DEF_CACHE_DEFAULT = 256
 
static const ulong STORED_PROGRAM_DEF_CACHE_DEFAULT = 256
 
static const ulong TABLESPACE_DEF_CACHE_DEFAULT = 256
 
static const ulong EVENT_DEF_CACHE_DEFAULT = 256
 
static const ulong TABLE_DEF_CACHE_MIN = 400
 We must have room for at least 400 table definitions in the table cache, since otherwise there is no chance prepared statements that use these many tables can work. More...
 
static const ulong SCHEMA_DEF_CACHE_MIN = 256
 
static const ulong STORED_PROGRAM_DEF_CACHE_MIN = 256
 
static const ulong TABLESPACE_DEF_CACHE_MIN = 256
 
static const ulong EVENT_DEF_CACHE_MIN = 256
 

Detailed Description

File containing constants that can be used throughout the server.

Note
This file shall not contain any includes of any kinds.

Macro Definition Documentation

◆ ACL_ALLOC_BLOCK_SIZE

#define ACL_ALLOC_BLOCK_SIZE   1024

◆ ACL_CACHE_SIZE

#define ACL_CACHE_SIZE   256

◆ BLOCKS_IN_AVG_SEEK

#define BLOCKS_IN_AVG_SEEK   128

◆ CONNECT_PRIOR

#define CONNECT_PRIOR   9

◆ CONNECT_TIMEOUT

#define CONNECT_TIMEOUT   10

◆ CONTEXT_ANALYSIS_ONLY_DERIVED

#define CONTEXT_ANALYSIS_ONLY_DERIVED   4

◆ CONTEXT_ANALYSIS_ONLY_PREPARE

#define CONTEXT_ANALYSIS_ONLY_PREPARE   1

◆ CONTEXT_ANALYSIS_ONLY_VIEW

#define CONTEXT_ANALYSIS_ONLY_VIEW   2

◆ CONVERT_IF_BIGGER_TO_BLOB

#define CONVERT_IF_BIGGER_TO_BLOB   512 /* Used for CREATE ... SELECT */

CHAR and VARCHAR fields longer than this number of characters are converted to BLOB.

Non-character fields longer than this number of bytes are converted to BLOB. Comparisons should be '>' or '<='.

◆ CREATE_MODE

#define CREATE_MODE   0 /* Default mode on new files */

◆ DATE_INT_DIGITS

#define DATE_INT_DIGITS   8 /* YYYYMMDD */

◆ DATETIME_INT_DIGITS

#define DATETIME_INT_DIGITS   14 /* YYYYMMDDhhmmss */

◆ DEFAULT_CONCURRENCY

#define DEFAULT_CONCURRENCY   10

◆ DEFAULT_ERROR_COUNT

#define DEFAULT_ERROR_COUNT   1024

◆ DEFAULT_SORT_MEMORY

#define DEFAULT_SORT_MEMORY   (256UL * 1024UL)

◆ DELAYED_LIMIT

#define DELAYED_LIMIT   100

pause after xxx inserts

◆ DELAYED_QUEUE_SIZE

#define DELAYED_QUEUE_SIZE   1000

◆ DELAYED_WAIT_TIMEOUT

#define DELAYED_WAIT_TIMEOUT   5 * 60

Wait for delayed insert.

◆ DISK_BUFFER_SIZE

#define DISK_BUFFER_SIZE   (uint)(IO_SIZE * 16) /* Size of diskbuffer */

◆ DISK_SEEK_BASE_COST

#define DISK_SEEK_BASE_COST   (0.9)

◆ DISK_SEEK_PROP_COST

#define DISK_SEEK_PROP_COST   (0.1 / BLOCKS_IN_AVG_SEEK)

◆ EXTRA_RECORDS

#define EXTRA_RECORDS   10 /* Extra records in sort */

◆ FERR

#define FERR   -1 /* Error from my_functions */

◆ HOST_CACHE_SIZE

#define HOST_CACHE_SIZE   128

◆ INNER_TABLE_BIT

#define INNER_TABLE_BIT   (((table_map)1) << (MAX_TABLES + 0))

◆ INTERRUPT_PRIOR

#define INTERRUPT_PRIOR   10

◆ KEY_DEFAULT_PACK_LENGTH

#define KEY_DEFAULT_PACK_LENGTH   8

Don't pack string keys shorter than this (if PACK_KEYS=1 isn't used).

◆ LIBLEN

#define LIBLEN   FN_REFLEN - FN_LEN /* Max l{ngd p} dev */

◆ LONG_TIMEOUT

#define LONG_TIMEOUT   ((ulong)3600L * 24L * 365L)

◆ MATCHING_ROWS_IN_OTHER_TABLE

#define MATCHING_ROWS_IN_OTHER_TABLE   10

Number of rows in a reference table when refereed through a not unique key.

This value is only used when we don't know anything about the key distribution.

◆ MAX_ACCEPT_RETRY

#define MAX_ACCEPT_RETRY   10

◆ MAX_ALIAS_NAME

#define MAX_ALIAS_NAME   256

◆ MAX_BIT_FIELD_LENGTH

#define MAX_BIT_FIELD_LENGTH   64 /* Max length in bits for bit fields */

◆ MAX_CONNECTIONS_DEFAULT

#define MAX_CONNECTIONS_DEFAULT   151

Maximum number of connections default value.

151 is larger than Apache's default max children, to avoid "too many connections" error in a common setup.

◆ MAX_DATE_WIDTH

#define MAX_DATE_WIDTH   10 /* YYYY-MM-DD */

◆ MAX_DATETIME_COMPRESSED_WIDTH

#define MAX_DATETIME_COMPRESSED_WIDTH   14 /* YYYYMMDDHHMMSS */

◆ MAX_DATETIME_FULL_WIDTH

#define MAX_DATETIME_FULL_WIDTH   29 /* YYYY-MM-DD HH:MM:SS.###### AM */

◆ MAX_DATETIME_WIDTH

#define MAX_DATETIME_WIDTH   19 /* YYYY-MM-DD HH:MM:SS */

◆ MAX_DBKEY_LENGTH

#define MAX_DBKEY_LENGTH   (NAME_LEN * 2 + 1 + 1 + 4 + 4)

The maximum length of a key in the table definition cache.

The key consists of the schema name, a '\0' character, the table name and a '\0' character. Hence NAME_LEN * 2 + 1 + 1.

Additionally, the key can be suffixed with either 4 + 4 extra bytes for slave tmp tables, or with a single extra byte for tables in a secondary storage engine. Add 4 + 4 to account for either of these suffixes.

◆ MAX_DOUBLE_STR_LENGTH

#define MAX_DOUBLE_STR_LENGTH   (DBL_DIG + 7)

◆ MAX_ENUM_VALUES

#define MAX_ENUM_VALUES   65535 /* Max number of enumeration values */

◆ MAX_FIELD_BLOBLENGTH

#define MAX_FIELD_BLOBLENGTH   UINT_MAX32 /* cf field_blob::get_length() */

◆ MAX_FIELD_CHARLENGTH

#define MAX_FIELD_CHARLENGTH   255

◆ MAX_FIELD_NAME

#define MAX_FIELD_NAME   34 /* Max colum name length +2 */

◆ MAX_FIELD_VARCHARLENGTH

#define MAX_FIELD_VARCHARLENGTH   65535

◆ MAX_FIELD_WIDTH

#define MAX_FIELD_WIDTH   (MAX_FIELD_CHARLENGTH * MAX_MBWIDTH + 1)

◆ MAX_FIELDS

#define MAX_FIELDS   4096 /* Maximum number of columns */

◆ MAX_FIELDS_BEFORE_HASH

#define MAX_FIELDS_BEFORE_HASH   32

◆ MAX_FLOAT_STR_LENGTH

#define MAX_FLOAT_STR_LENGTH   (FLT_DIG + 6)

◆ MAX_INTERVAL_VALUE_LENGTH

#define MAX_INTERVAL_VALUE_LENGTH   255 /* Max length of enum/set values */

◆ MAX_KEY

#define MAX_KEY   MAX_INDEXES /* Max used keys */

◆ MAX_KEY_LENGTH

#define MAX_KEY_LENGTH   3072U /* max possible key */

◆ MAX_MBWIDTH

#define MAX_MBWIDTH   3 /* Max multibyte sequence */

◆ MAX_PARTITIONS

#define MAX_PARTITIONS   8192

◆ MAX_PASSWORD_LENGTH

#define MAX_PASSWORD_LENGTH   32

◆ MAX_REF_PARTS

#define MAX_REF_PARTS   16U /* Max parts used as ref */

◆ MAX_REFLENGTH

#define MAX_REFLENGTH   4 /* Max length for record ref */

◆ MAX_SELECT_NESTING

#define MAX_SELECT_NESTING   (sizeof(nesting_map) * 8 - 1)

◆ MAX_SYS_VAR_LENGTH

#define MAX_SYS_VAR_LENGTH   32

◆ MAX_TABLES

#define MAX_TABLES   (MAX_TABLES_FOR_SIZE - 3)

Max tables in join.

◆ MAX_TABLES_FOR_SIZE

#define MAX_TABLES_FOR_SIZE   (sizeof(table_map) * 8)

MAX_TABLES and xxx_TABLE_BIT are used in optimization of table factors and expressions, and in join plan generation.

MAX_TABLES counts the maximum number of tables that can be handled in a join operation. It is the number of bits in the table_map, minus the number of pseudo table bits (bits that do not represent actual tables, but still need to be handled by our algorithms). The pseudo table bits are: INNER_TABLE_BIT is set for all expressions that contain a parameter, a subquery that accesses tables, or a function that accesses tables. An expression that has only INNER_TABLE_BIT is constant for the duration of a query expression, but must be evaluated at least once during execution. OUTER_REF_TABLE_BIT is set for expressions that contain a column that is resolved as an outer reference. Also notice that all subquery items between the column reference and the query block where the column is resolved, have this bit set. Expressions that are represented by this bit are constant for the duration of the subquery they are defined in. RAND_TABLE_BIT is set for expressions containing a non-deterministic element, such as a random function or a non-deterministic function. Expressions containing this bit cannot be evaluated once and then cached, they must be evaluated at latest possible point. MAX_TABLES_FOR_SIZE adds the pseudo bits and is used for sizing purposes only.Use for sizing ONLY

◆ MAX_TIME_FULL_WIDTH

#define MAX_TIME_FULL_WIDTH   23 /* -DDDDDD HH:MM:SS.###### */

◆ MAX_TIME_WIDTH

#define MAX_TIME_WIDTH   10 /* -838:59:59 */

◆ MAX_TIME_ZONE_NAME_LENGTH

#define MAX_TIME_ZONE_NAME_LENGTH   (NAME_LEN + 1)

Maximum length of time zone name that we support (Time zone name is char(64) in db).

mysqlbinlog needs it.

◆ MEM_ROOT_BLOCK_SIZE

#define MEM_ROOT_BLOCK_SIZE   8192

◆ MEM_ROOT_PREALLOC

#define MEM_ROOT_PREALLOC   8192

◆ MIN_FILE_LENGTH_TO_USE_ROW_CACHE

#define MIN_FILE_LENGTH_TO_USE_ROW_CACHE   (10L * 1024 * 1024)

◆ MIN_ROWS_TO_USE_BULK_INSERT

#define MIN_ROWS_TO_USE_BULK_INSERT   100

◆ MIN_ROWS_TO_USE_TABLE_CACHE

#define MIN_ROWS_TO_USE_TABLE_CACHE   100

◆ MIN_SORT_MEMORY

#define MIN_SORT_MEMORY   (32UL * 1024UL)

◆ MY_CHARSET_BIN_MB_MAXLEN

#define MY_CHARSET_BIN_MB_MAXLEN   1

◆ MYSQLD_ABORT_EXIT

#define MYSQLD_ABORT_EXIT   1

◆ MYSQLD_FAILURE_EXIT

#define MYSQLD_FAILURE_EXIT   2

◆ MYSQLD_NET_RETRY_COUNT

#define MYSQLD_NET_RETRY_COUNT   10

Abort read after this many int.

◆ MYSQLD_RESTART_EXIT

#define MYSQLD_RESTART_EXIT   16

◆ MYSQLD_SUCCESS_EXIT

#define MYSQLD_SUCCESS_EXIT   0

◆ NAMES_SEP_CHAR

#define NAMES_SEP_CHAR   '\377' /* Char to sep. names */

◆ OPTIMIZER_SKIP_SCAN

#define OPTIMIZER_SKIP_SCAN   (1ULL << 20)

◆ OPTIMIZER_SWITCH_BKA

#define OPTIMIZER_SWITCH_BKA   (1ULL << 9)

◆ OPTIMIZER_SWITCH_BNL

#define OPTIMIZER_SWITCH_BNL   (1ULL << 8)

◆ OPTIMIZER_SWITCH_COND_FANOUT_FILTER

#define OPTIMIZER_SWITCH_COND_FANOUT_FILTER   (1ULL << 17)

◆ OPTIMIZER_SWITCH_DEFAULT

#define OPTIMIZER_SWITCH_DEFAULT
Value:
OPTIMIZER_SWITCH_INDEX_MERGE_SORT_UNION | \
OPTIMIZER_SWITCH_INDEX_MERGE_INTERSECT | \
OPTIMIZER_SWITCH_ENGINE_CONDITION_PUSHDOWN | \
OPTIMIZER_SWITCH_INDEX_CONDITION_PUSHDOWN | OPTIMIZER_SWITCH_MRR | \
OPTIMIZER_SWITCH_MRR_COST_BASED | OPTIMIZER_SWITCH_BNL | \
OPTIMIZER_SWITCH_MATERIALIZATION | OPTIMIZER_SWITCH_SEMIJOIN | \
OPTIMIZER_SWITCH_LOOSE_SCAN | OPTIMIZER_SWITCH_FIRSTMATCH | \
OPTIMIZER_SWITCH_DUPSWEEDOUT | OPTIMIZER_SWITCH_SUBQ_MAT_COST_BASED | \
OPTIMIZER_SWITCH_USE_INDEX_EXTENSIONS | \
OPTIMIZER_SWITCH_COND_FANOUT_FILTER | OPTIMIZER_SWITCH_DERIVED_MERGE | \
OPTIMIZER_SKIP_SCAN | OPTIMIZER_SWITCH_HASH_JOIN)
#define OPTIMIZER_SWITCH_INDEX_MERGE_UNION
Definition: sql_const.h:332
#define OPTIMIZER_SWITCH_HASH_JOIN
Definition: sql_const.h:359
#define OPTIMIZER_SWITCH_MRR
If this is off, MRR is never used.
Definition: sql_const.h:338
#define OPTIMIZER_SWITCH_SEMIJOIN
Definition: sql_const.h:349
#define OPTIMIZER_SWITCH_DERIVED_MERGE
Definition: sql_const.h:356
#define OPTIMIZER_SWITCH_FIRSTMATCH
Definition: sql_const.h:351
#define OPTIMIZER_SWITCH_SUBQ_MAT_COST_BASED
Definition: sql_const.h:353
#define OPTIMIZER_SWITCH_INDEX_MERGE
Definition: sql_const.h:331
#define OPTIMIZER_SWITCH_BNL
Definition: sql_const.h:346

◆ OPTIMIZER_SWITCH_DERIVED_MERGE

#define OPTIMIZER_SWITCH_DERIVED_MERGE   (1ULL << 18)

◆ OPTIMIZER_SWITCH_DUPSWEEDOUT

#define OPTIMIZER_SWITCH_DUPSWEEDOUT   (1ULL << 14)

◆ OPTIMIZER_SWITCH_ENGINE_CONDITION_PUSHDOWN

#define OPTIMIZER_SWITCH_ENGINE_CONDITION_PUSHDOWN   (1ULL << 4)

◆ OPTIMIZER_SWITCH_FIRSTMATCH

#define OPTIMIZER_SWITCH_FIRSTMATCH   (1ULL << 13)

◆ OPTIMIZER_SWITCH_HASH_JOIN

#define OPTIMIZER_SWITCH_HASH_JOIN   (1ULL << 21)

◆ OPTIMIZER_SWITCH_INDEX_CONDITION_PUSHDOWN

#define OPTIMIZER_SWITCH_INDEX_CONDITION_PUSHDOWN   (1ULL << 5)

◆ OPTIMIZER_SWITCH_INDEX_MERGE

#define OPTIMIZER_SWITCH_INDEX_MERGE   (1ULL << 0)

◆ OPTIMIZER_SWITCH_INDEX_MERGE_INTERSECT

#define OPTIMIZER_SWITCH_INDEX_MERGE_INTERSECT   (1ULL << 3)

◆ OPTIMIZER_SWITCH_INDEX_MERGE_SORT_UNION

#define OPTIMIZER_SWITCH_INDEX_MERGE_SORT_UNION   (1ULL << 2)

◆ OPTIMIZER_SWITCH_INDEX_MERGE_UNION

#define OPTIMIZER_SWITCH_INDEX_MERGE_UNION   (1ULL << 1)

◆ OPTIMIZER_SWITCH_LAST

#define OPTIMIZER_SWITCH_LAST   (1ULL << 22)

◆ OPTIMIZER_SWITCH_LOOSE_SCAN

#define OPTIMIZER_SWITCH_LOOSE_SCAN   (1ULL << 12)

◆ OPTIMIZER_SWITCH_MATERIALIZATION

#define OPTIMIZER_SWITCH_MATERIALIZATION   (1ULL << 10)

◆ OPTIMIZER_SWITCH_MRR

#define OPTIMIZER_SWITCH_MRR   (1ULL << 6)

If this is off, MRR is never used.

◆ OPTIMIZER_SWITCH_MRR_COST_BASED

#define OPTIMIZER_SWITCH_MRR_COST_BASED   (1ULL << 7)

If OPTIMIZER_SWITCH_MRR is on and this is on, MRR is used depending on a cost-based choice ("automatic").

If OPTIMIZER_SWITCH_MRR is on and this is off, MRR is "forced" (i.e. used as long as the storage engine is capable of doing it).

◆ OPTIMIZER_SWITCH_SEMIJOIN

#define OPTIMIZER_SWITCH_SEMIJOIN   (1ULL << 11)

◆ OPTIMIZER_SWITCH_SUBQ_MAT_COST_BASED

#define OPTIMIZER_SWITCH_SUBQ_MAT_COST_BASED   (1ULL << 15)

◆ OPTIMIZER_SWITCH_USE_INDEX_EXTENSIONS

#define OPTIMIZER_SWITCH_USE_INDEX_EXTENSIONS   (1ULL << 16)

◆ OPTIMIZER_SWITCH_USE_INVISIBLE_INDEXES

#define OPTIMIZER_SWITCH_USE_INVISIBLE_INDEXES   (1ULL << 19)

◆ OUTER_REF_TABLE_BIT

#define OUTER_REF_TABLE_BIT   (((table_map)1) << (MAX_TABLES + 1))

◆ PRECISION_FOR_DOUBLE

#define PRECISION_FOR_DOUBLE   53

◆ PRECISION_FOR_FLOAT

#define PRECISION_FOR_FLOAT   24

◆ PROCESS_LIST_INFO_WIDTH

#define PROCESS_LIST_INFO_WIDTH   65535

◆ PROCESS_LIST_WIDTH

#define PROCESS_LIST_WIDTH   100

Characters shown for the command in 'show processlist'.

◆ PSEUDO_TABLE_BITS

#define PSEUDO_TABLE_BITS   (INNER_TABLE_BIT | OUTER_REF_TABLE_BIT | RAND_TABLE_BIT)

◆ QUERY_ALLOC_BLOCK_SIZE

#define QUERY_ALLOC_BLOCK_SIZE   8192

◆ QUERY_ALLOC_PREALLOC_SIZE

#define QUERY_ALLOC_PREALLOC_SIZE   8192

◆ QUERY_PRIOR

#define QUERY_PRIOR   6

◆ RAND_TABLE_BIT

#define RAND_TABLE_BIT   (((table_map)1) << (MAX_TABLES + 2))

◆ RANGE_ALLOC_BLOCK_SIZE

#define RANGE_ALLOC_BLOCK_SIZE   4096

◆ READ_RECORD_BUFFER

#define READ_RECORD_BUFFER   (uint)(IO_SIZE * 8) /* Pointer_buffer_size */

◆ SCROLL_EXTRA

#define SCROLL_EXTRA   5 /* Extra scroll-rows. */

◆ STACK_BUFF_ALLOC

#define STACK_BUFF_ALLOC   352

For stack overrun checks.

◆ STACK_MIN_SIZE

#define STACK_MIN_SIZE   20000

◆ STACK_MIN_SIZE_FOR_OPEN

#define STACK_MIN_SIZE_FOR_OPEN   1024 * 80

◆ STRING_BUFFER_USUAL_SIZE

#define STRING_BUFFER_USUAL_SIZE   80

◆ TABLE_ALLOC_BLOCK_SIZE

#define TABLE_ALLOC_BLOCK_SIZE   1024

◆ TABLE_OPEN_CACHE_DEFAULT

#define TABLE_OPEN_CACHE_DEFAULT   4000

◆ TABLE_OPEN_CACHE_MIN

#define TABLE_OPEN_CACHE_MIN   400

◆ TIME_INT_DIGITS

#define TIME_INT_DIGITS   7 /* hhhmmss */

◆ TRANS_ALLOC_BLOCK_SIZE

#define TRANS_ALLOC_BLOCK_SIZE   4096

◆ TRANS_ALLOC_PREALLOC_SIZE

#define TRANS_ALLOC_PREALLOC_SIZE   4096

◆ TRANS_MEM_ROOT_BLOCK_SIZE

#define TRANS_MEM_ROOT_BLOCK_SIZE   4096

◆ TRANS_MEM_ROOT_PREALLOC

#define TRANS_MEM_ROOT_PREALLOC   4096

◆ UDF_ALLOC_BLOCK_SIZE

#define UDF_ALLOC_BLOCK_SIZE   1024

◆ USER_VARS_HASH_SIZE

#define USER_VARS_HASH_SIZE   16

◆ UUID_LENGTH

#define UUID_LENGTH   (8 + 1 + 4 + 1 + 4 + 1 + 4 + 1 + 12)

◆ WAIT_PRIOR

#define WAIT_PRIOR   8

◆ WARN_ALLOC_BLOCK_SIZE

#define WARN_ALLOC_BLOCK_SIZE   2048

Typedef Documentation

◆ Item_processor

typedef bool(Item::* Item_processor) (uchar *arg)

Processor type for {Item,SELECT_LEX[_UNIT],Table_function}walk.

Enumeration Type Documentation

◆ enum_mark_columns

Enumerator
MARK_COLUMNS_NONE 
MARK_COLUMNS_READ 
MARK_COLUMNS_WRITE 
MARK_COLUMNS_TEMP 

◆ enum_resolution_type

Enumerator
NOT_RESOLVED 
RESOLVED_BEHIND_ALIAS 
RESOLVED_AGAINST_ALIAS 
RESOLVED_WITH_NO_ALIAS 
RESOLVED_IGNORING_ALIAS 

◆ enum_walk

enum enum_walk
strong

Enumeration for {Item,SELECT_LEX[_UNIT],Table_function}walk.

Enumerator
PREFIX 
POSTFIX 
SUBQUERY 
SUBQUERY_PREFIX 
SUBQUERY_POSTFIX 

◆ SHOW_COMP_OPTION

Enumerator
SHOW_OPTION_YES 
SHOW_OPTION_NO 
SHOW_OPTION_DISABLED 

Function Documentation

◆ operator &()

bool operator& ( enum_walk  lhs,
enum_walk  rhs 
)
inline

◆ operator|()

enum_walk operator| ( enum_walk  lhs,
enum_walk  rhs 
)
inline

Variable Documentation

◆ EVENT_DEF_CACHE_DEFAULT

const ulong EVENT_DEF_CACHE_DEFAULT = 256
static

◆ EVENT_DEF_CACHE_MIN

const ulong EVENT_DEF_CACHE_MIN = 256
static

◆ SCHEMA_DEF_CACHE_DEFAULT

const ulong SCHEMA_DEF_CACHE_DEFAULT = 256
static

◆ SCHEMA_DEF_CACHE_MIN

const ulong SCHEMA_DEF_CACHE_MIN = 256
static

◆ STORED_PROGRAM_DEF_CACHE_DEFAULT

const ulong STORED_PROGRAM_DEF_CACHE_DEFAULT = 256
static

◆ STORED_PROGRAM_DEF_CACHE_MIN

const ulong STORED_PROGRAM_DEF_CACHE_MIN = 256
static

◆ TABLE_DEF_CACHE_DEFAULT

const ulong TABLE_DEF_CACHE_DEFAULT = 400
static

◆ TABLE_DEF_CACHE_MIN

const ulong TABLE_DEF_CACHE_MIN = 400
static

We must have room for at least 400 table definitions in the table cache, since otherwise there is no chance prepared statements that use these many tables can work.

Prepared statements use table definition cache ids (table_map_id) as table version identifiers. If the table definition cache size is less than the number of tables used in a statement, the contents of the table definition cache is guaranteed to rotate between a prepare and execute. This leads to stable validation errors. In future we shall use more stable version identifiers, for now the only solution is to ensure that the table definition cache can contain at least all tables of a given statement.

◆ TABLESPACE_DEF_CACHE_DEFAULT

const ulong TABLESPACE_DEF_CACHE_DEFAULT = 256
static

◆ TABLESPACE_DEF_CACHE_MIN

const ulong TABLESPACE_DEF_CACHE_MIN = 256
static