MySQL 8.4.0
Source Code Documentation
sql_const.h
Go to the documentation of this file.
1/* Copyright (c) 2006, 2024, Oracle and/or its affiliates.
2
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License, version 2.0,
5 as published by the Free Software Foundation.
6
7 This program is designed to work with certain software (including
8 but not limited to OpenSSL) that is licensed under separate terms,
9 as designated in a particular file or component or in included license
10 documentation. The authors of MySQL hereby grant you an additional
11 permission to link the program and your derivative works with the
12 separately licensed software that they have either included with
13 the program or referenced in the documentation.
14
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License, version 2.0, for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
23
24/**
25 @file
26 File containing constants that can be used throughout the server.
27
28 @note This file shall not contain any includes of sql/xxx.h files.
29*/
30
31#ifndef SQL_CONST_INCLUDED
32#define SQL_CONST_INCLUDED
33
34#include <float.h>
35#include <stddef.h>
36#include <stdint.h>
37
38#include <limits>
39
40#include "my_config.h" // MAX_INDEXES
41#include "my_table_map.h" // table_map
42
43constexpr const int MAX_ALIAS_NAME{256};
44constexpr const int MAX_FIELD_NAME{34}; /* Max column name length +2 */
45
46constexpr const unsigned int MAX_KEY{MAX_INDEXES}; /* Max used keys */
47constexpr const unsigned int MAX_REF_PARTS{16}; /* Max parts used as ref */
48constexpr const unsigned int MAX_KEY_LENGTH{3072}; /* max possible key */
49
50constexpr const int MAX_FIELD_CHARLENGTH{255};
51constexpr const int MAX_FIELD_VARCHARLENGTH{65535};
52
53/* cf Field_blob::get_length() */
54constexpr const unsigned int MAX_FIELD_BLOBLENGTH{
55 std::numeric_limits<uint32_t>::max()};
56
57/**
58 CHAR and VARCHAR fields longer than this number of characters are converted
59 to BLOB.
60 Non-character fields longer than this number of bytes are converted to BLOB.
61 Comparisons should be '>' or '<='.
62*/
63constexpr const int CONVERT_IF_BIGGER_TO_BLOB{512};
64
65/** Max column width + 1. 3 is mbmaxlen for utf8mb3 */
66constexpr const int MAX_FIELD_WIDTH{MAX_FIELD_CHARLENGTH * 3 + 1};
67
68/** YYYY-MM-DD */
69constexpr const int MAX_DATE_WIDTH{10};
70/** -838:59:59 */
71constexpr const int MAX_TIME_WIDTH{10};
72/** -DDDDDD HH:MM:SS.###### */
73constexpr const int MAX_TIME_FULL_WIDTH{23};
74/** YYYY-MM-DD HH:MM:SS.###### AM */
75constexpr const int MAX_DATETIME_FULL_WIDTH{29};
76/** YYYY-MM-DD HH:MM:SS */
77constexpr const int MAX_DATETIME_WIDTH{19};
78
79/**
80 MAX_TABLES and xxx_TABLE_BIT are used in optimization of table factors and
81 expressions, and in join plan generation.
82 MAX_TABLES counts the maximum number of tables that can be handled in a
83 join operation. It is the number of bits in the table_map, minus the
84 number of pseudo table bits (bits that do not represent actual tables, but
85 still need to be handled by our algorithms). The pseudo table bits are:
86 INNER_TABLE_BIT is set for all expressions that contain a parameter,
87 a subquery that accesses tables, or a function that accesses tables.
88 An expression that has only INNER_TABLE_BIT is constant for the duration
89 of a query expression, but must be evaluated at least once during execution.
90 OUTER_REF_TABLE_BIT is set for expressions that contain a column that
91 is resolved as an outer reference. Also notice that all subquery items
92 between the column reference and the query block where the column is
93 resolved, have this bit set. Expressions that are represented by this bit
94 are constant for the duration of the subquery they are defined in.
95 RAND_TABLE_BIT is set for expressions containing a non-deterministic
96 element, such as a random function or a non-deterministic function.
97 Expressions containing this bit cannot be evaluated once and then cached,
98 they must be evaluated at latest possible point.
99 RAND_TABLE_BIT is also piggy-backed to avoid moving Item_func_reject_if
100 from its join condition. This usage is similar to its use by
101 Item_is_not_null_test.
102 MAX_TABLES_FOR_SIZE adds the pseudo bits and is used for sizing purposes only.
103*/
104/** Use for sizing ONLY */
105constexpr const size_t MAX_TABLES_FOR_SIZE{sizeof(table_map) * 8};
106
107/** Max tables in join */
108constexpr const size_t MAX_TABLES{MAX_TABLES_FOR_SIZE - 3};
109
110constexpr const table_map INNER_TABLE_BIT{1ULL << (MAX_TABLES + 0)};
111constexpr const table_map OUTER_REF_TABLE_BIT{1ULL << (MAX_TABLES + 1)};
112constexpr const table_map RAND_TABLE_BIT{1ULL << (MAX_TABLES + 2)};
115
116/** Maximum number of columns */
117constexpr const int MAX_FIELDS{4096};
118constexpr const int MAX_PARTITIONS{8192};
119
120/** Max length of enum/set values */
121constexpr const int MAX_INTERVAL_VALUE_LENGTH{255};
122
123constexpr const size_t MIN_SORT_MEMORY{32 * 1024};
124
125constexpr const size_t STRING_BUFFER_USUAL_SIZE{80};
126
127/** Memory allocated when parsing a statement */
128constexpr const size_t MEM_ROOT_BLOCK_SIZE{8192};
129
130/** Default mode on new files */
131constexpr const int CREATE_MODE{0};
132
133constexpr const size_t MAX_PASSWORD_LENGTH{32};
134
135/**
136 Stack reservation.
137 Feel free to raise this by the smallest amount you can to get the
138 "execution_constants" test to pass.
139*/
140#if defined HAVE_UBSAN && SIZEOF_CHARP == 4
141constexpr const long STACK_MIN_SIZE{30000}; // Abort if less stack during eval.
142#else
143constexpr const long STACK_MIN_SIZE{20000}; // Abort if less stack during eval.
144#endif
145
146constexpr const int STACK_BUFF_ALLOC{352}; ///< For stack overrun checks
147
148constexpr const size_t ACL_ALLOC_BLOCK_SIZE{1024};
149constexpr const size_t TABLE_ALLOC_BLOCK_SIZE{1024};
150
151constexpr const int PRECISION_FOR_DOUBLE{53};
152constexpr const int PRECISION_FOR_FLOAT{24};
153
154/** -[digits].E+## */
155constexpr const int MAX_FLOAT_STR_LENGTH{FLT_DIG + 6};
156/** -[digits].E+### */
157constexpr const int MAX_DOUBLE_STR_LENGTH{DBL_DIG + 7};
158
159constexpr const unsigned long LONG_TIMEOUT{3600 * 24 * 365};
160
161/*
162 Flags below are set when we perform
163 context analysis of the statement and make
164 subqueries non-const. It prevents subquery
165 evaluation at context analysis stage.
166*/
167
168/**
169 Don't evaluate this subquery during statement prepare even if
170 it's a constant one. The flag is switched off in the end of
171 mysqld_stmt_prepare.
172*/
173constexpr const uint8_t CONTEXT_ANALYSIS_ONLY_PREPARE{1};
174/**
175 Special Query_block::prepare mode: changing of query is prohibited.
176 When creating a view, we need to just check its syntax omitting
177 any optimizations: afterwards definition of the view will be
178 reconstructed by means of ::print() methods and written to
179 to an .frm file. We need this definition to stay untouched.
180*/
181constexpr const uint8_t CONTEXT_ANALYSIS_ONLY_VIEW{2};
182/**
183 Don't evaluate this subquery during derived table prepare even if
184 it's a constant one.
185*/
186constexpr const uint8_t CONTEXT_ANALYSIS_ONLY_DERIVED{4};
187
188/**
189 @@optimizer_switch flags.
190 These must be in sync with optimizer_switch_typelib
191 */
192constexpr const uint64_t OPTIMIZER_SWITCH_INDEX_MERGE{1ULL << 0};
193constexpr const uint64_t OPTIMIZER_SWITCH_INDEX_MERGE_UNION{1ULL << 1};
194constexpr const uint64_t OPTIMIZER_SWITCH_INDEX_MERGE_SORT_UNION{1ULL << 2};
195constexpr const uint64_t OPTIMIZER_SWITCH_INDEX_MERGE_INTERSECT{1ULL << 3};
196constexpr const uint64_t OPTIMIZER_SWITCH_ENGINE_CONDITION_PUSHDOWN{1ULL << 4};
197constexpr const uint64_t OPTIMIZER_SWITCH_INDEX_CONDITION_PUSHDOWN{1ULL << 5};
198/** If this is off, MRR is never used. */
199constexpr const uint64_t OPTIMIZER_SWITCH_MRR{1ULL << 6};
200/**
201 If OPTIMIZER_SWITCH_MRR is on and this is on, MRR is used depending on a
202 cost-based choice ("automatic"). If OPTIMIZER_SWITCH_MRR is on and this is
203 off, MRR is "forced" (i.e. used as long as the storage engine is capable of
204 doing it).
205*/
206constexpr const uint64_t OPTIMIZER_SWITCH_MRR_COST_BASED{1ULL << 7};
207constexpr const uint64_t OPTIMIZER_SWITCH_BNL{1ULL << 8};
208constexpr const uint64_t OPTIMIZER_SWITCH_BKA{1ULL << 9};
209constexpr const uint64_t OPTIMIZER_SWITCH_MATERIALIZATION{1ULL << 10};
210constexpr const uint64_t OPTIMIZER_SWITCH_SEMIJOIN{1ULL << 11};
211constexpr const uint64_t OPTIMIZER_SWITCH_LOOSE_SCAN{1ULL << 12};
212constexpr const uint64_t OPTIMIZER_SWITCH_FIRSTMATCH{1ULL << 13};
213constexpr const uint64_t OPTIMIZER_SWITCH_DUPSWEEDOUT{1ULL << 14};
214constexpr const uint64_t OPTIMIZER_SWITCH_SUBQ_MAT_COST_BASED{1ULL << 15};
215constexpr const uint64_t OPTIMIZER_SWITCH_USE_INDEX_EXTENSIONS{1ULL << 16};
216constexpr const uint64_t OPTIMIZER_SWITCH_COND_FANOUT_FILTER{1ULL << 17};
217constexpr const uint64_t OPTIMIZER_SWITCH_DERIVED_MERGE{1ULL << 18};
218constexpr const uint64_t OPTIMIZER_SWITCH_USE_INVISIBLE_INDEXES{1ULL << 19};
219constexpr const uint64_t OPTIMIZER_SKIP_SCAN{1ULL << 20};
220constexpr const uint64_t OPTIMIZER_SWITCH_HASH_JOIN{1ULL << 21};
221constexpr const uint64_t OPTIMIZER_SWITCH_SUBQUERY_TO_DERIVED{1ULL << 22};
222constexpr const uint64_t OPTIMIZER_SWITCH_PREFER_ORDERING_INDEX{1ULL << 23};
223constexpr const uint64_t OPTIMIZER_SWITCH_HYPERGRAPH_OPTIMIZER{1ULL << 24};
225 << 25};
226constexpr const uint64_t OPTIMIZER_SWITCH_HASH_SET_OPERATIONS{1ULL << 26};
227constexpr const uint64_t OPTIMIZER_SWITCH_LAST{1ULL << 27};
228
230
237
238/**
239 Exit code used by mysqld_exit, exit and _exit function
240 to indicate successful termination of mysqld.
241*/
242constexpr const int MYSQLD_SUCCESS_EXIT{0};
243/**
244 Exit code used by mysqld_exit, exit and _exit function to
245 signify unsuccessful termination of mysqld. The exit
246 code signifies the server should NOT BE RESTARTED AUTOMATICALLY
247 by init systems like systemd.
248*/
249constexpr const int MYSQLD_ABORT_EXIT{1};
250/**
251 Exit code used by mysqld_exit, exit and _exit function to
252 signify unsuccessful termination of mysqld. The exit code
253 signifies the server should be RESTARTED AUTOMATICALLY by
254 init systems like systemd.
255*/
256constexpr const int MYSQLD_FAILURE_EXIT{2};
257/**
258 Exit code used by mysqld_exit, my_thread_exit function which allows
259 for external programs like systemd, mysqld_safe to restart mysqld
260 server. The exit code 16 is chosen so it is safe as InnoDB code
261 exit directly with values like 3.
262*/
263constexpr const int MYSQLD_RESTART_EXIT{16};
264
265constexpr const size_t UUID_LENGTH{8 + 1 + 4 + 1 + 4 + 1 + 4 + 1 + 12};
266
267/**
268 This enumeration type is used only by the function find_item_in_list
269 to return the info on how an item has been resolved against a list
270 of possibly aliased items.
271 The item can be resolved:
272 - against an alias name of the list's element (RESOLVED_AGAINST_ALIAS)
273 - against non-aliased field name of the list (RESOLVED_WITH_NO_ALIAS)
274 - against an aliased field name of the list (RESOLVED_BEHIND_ALIAS)
275 - ignoring the alias name in cases when SQL requires to ignore aliases
276 (e.g. when the resolved field reference contains a table name or
277 when the resolved item is an expression) (RESOLVED_IGNORING_ALIAS)
278*/
286
287/// Enumeration for {Item,Query_block[_UNIT],Table_function}::walk
288enum class enum_walk {
289 PREFIX = 0x01,
290 POSTFIX = 0x02,
291 SUBQUERY = 0x04,
292 SUBQUERY_PREFIX = 0x05, // Combine prefix and subquery traversal
293 SUBQUERY_POSTFIX = 0x06 // Combine postfix and subquery traversal
294};
295
297 return enum_walk(int(lhs) | int(rhs));
298}
299
300inline bool operator&(enum_walk lhs, enum_walk rhs) {
301 return (int(lhs) & int(rhs)) != 0;
302}
303
304class Item;
305/// Processor type for {Item,Query_block[_UNIT],Table_function}::walk
306using Item_processor = bool (Item::*)(unsigned char *);
307
308/// Enumeration for Query_block::condition_context.
309/// If the expression being resolved belongs to a condition clause (WHERE, etc),
310/// it is connected to the clause's root through a chain of Items; tells if this
311/// chain matches ^(AND)*$ ("is top-level"), ^(AND|OR)*$, or neither.
313 NEITHER,
314 ANDS,
315 ANDS_ORS,
316};
317
318/// Used to uniquely name expressions in derived tables
319#define SYNTHETIC_FIELD_NAME "Name_exp_"
320#endif /* SQL_CONST_INCLUDED */
Base class that is used to represent any kind of expression in a relational query.
Definition: item.h:934
#define MAX_INDEXES
Definition: config.h:210
uint64_t table_map
Definition: my_table_map.h:30
constexpr const table_map RAND_TABLE_BIT
Definition: sql_const.h:112
constexpr const int MAX_TIME_FULL_WIDTH
-DDDDDD HH:MM:SS.
Definition: sql_const.h:73
SHOW_COMP_OPTION
Definition: sql_const.h:229
@ SHOW_OPTION_DISABLED
Definition: sql_const.h:229
@ SHOW_OPTION_YES
Definition: sql_const.h:229
@ SHOW_OPTION_NO
Definition: sql_const.h:229
constexpr const size_t MEM_ROOT_BLOCK_SIZE
Memory allocated when parsing a statement.
Definition: sql_const.h:128
constexpr const size_t TABLE_ALLOC_BLOCK_SIZE
Definition: sql_const.h:149
constexpr const uint64_t OPTIMIZER_SWITCH_DERIVED_MERGE
Definition: sql_const.h:217
constexpr const int MAX_FIELD_WIDTH
Max column width + 1.
Definition: sql_const.h:66
constexpr const size_t UUID_LENGTH
Definition: sql_const.h:265
constexpr const uint64_t OPTIMIZER_SWITCH_HYPERGRAPH_OPTIMIZER
Definition: sql_const.h:223
constexpr const uint64_t OPTIMIZER_SWITCH_MRR
If this is off, MRR is never used.
Definition: sql_const.h:199
constexpr const uint64_t OPTIMIZER_SWITCH_HASH_SET_OPERATIONS
Definition: sql_const.h:226
constexpr const uint64_t OPTIMIZER_SWITCH_COND_FANOUT_FILTER
Definition: sql_const.h:216
constexpr const size_t MIN_SORT_MEMORY
Definition: sql_const.h:123
constexpr const uint64_t OPTIMIZER_SWITCH_MRR_COST_BASED
If OPTIMIZER_SWITCH_MRR is on and this is on, MRR is used depending on a cost-based choice ("automati...
Definition: sql_const.h:206
constexpr const uint64_t OPTIMIZER_SWITCH_HASH_JOIN
Definition: sql_const.h:220
constexpr const unsigned int MAX_KEY
Definition: sql_const.h:46
constexpr const int MAX_FIELD_VARCHARLENGTH
Definition: sql_const.h:51
constexpr const uint8_t CONTEXT_ANALYSIS_ONLY_PREPARE
Don't evaluate this subquery during statement prepare even if it's a constant one.
Definition: sql_const.h:173
constexpr const int MAX_FIELDS
Maximum number of columns.
Definition: sql_const.h:117
constexpr const uint64_t OPTIMIZER_SWITCH_INDEX_CONDITION_PUSHDOWN
Definition: sql_const.h:197
constexpr const int MAX_TIME_WIDTH
-838:59:59
Definition: sql_const.h:71
constexpr const int MAX_DATE_WIDTH
YYYY-MM-DD.
Definition: sql_const.h:69
constexpr const uint64_t OPTIMIZER_SWITCH_DERIVED_CONDITION_PUSHDOWN
Definition: sql_const.h:224
constexpr const table_map PSEUDO_TABLE_BITS
Definition: sql_const.h:113
constexpr const size_t MAX_PASSWORD_LENGTH
Definition: sql_const.h:133
bool operator&(enum_walk lhs, enum_walk rhs)
Definition: sql_const.h:300
constexpr const uint64_t OPTIMIZER_SWITCH_BKA
Definition: sql_const.h:208
constexpr const uint64_t OPTIMIZER_SWITCH_MATERIALIZATION
Definition: sql_const.h:209
constexpr const uint64_t OPTIMIZER_SWITCH_INDEX_MERGE_UNION
Definition: sql_const.h:193
constexpr const int CONVERT_IF_BIGGER_TO_BLOB
CHAR and VARCHAR fields longer than this number of characters are converted to BLOB.
Definition: sql_const.h:63
constexpr const int MAX_FIELD_CHARLENGTH
Definition: sql_const.h:50
constexpr const uint64_t OPTIMIZER_SWITCH_USE_INVISIBLE_INDEXES
Definition: sql_const.h:218
enum_walk operator|(enum_walk lhs, enum_walk rhs)
Definition: sql_const.h:296
constexpr const int MYSQLD_RESTART_EXIT
Exit code used by mysqld_exit, my_thread_exit function which allows for external programs like system...
Definition: sql_const.h:263
constexpr const uint64_t OPTIMIZER_SWITCH_INDEX_MERGE_INTERSECT
Definition: sql_const.h:195
constexpr const unsigned int MAX_REF_PARTS
Definition: sql_const.h:47
constexpr const size_t STRING_BUFFER_USUAL_SIZE
Definition: sql_const.h:125
constexpr const int MAX_PARTITIONS
Definition: sql_const.h:118
constexpr const int PRECISION_FOR_FLOAT
Definition: sql_const.h:152
enum_resolution_type
This enumeration type is used only by the function find_item_in_list to return the info on how an ite...
Definition: sql_const.h:279
@ NOT_RESOLVED
Definition: sql_const.h:280
@ RESOLVED_BEHIND_ALIAS
Definition: sql_const.h:281
@ RESOLVED_AGAINST_ALIAS
Definition: sql_const.h:282
@ RESOLVED_WITH_NO_ALIAS
Definition: sql_const.h:283
@ RESOLVED_IGNORING_ALIAS
Definition: sql_const.h:284
constexpr const long STACK_MIN_SIZE
Stack reservation.
Definition: sql_const.h:143
constexpr const table_map OUTER_REF_TABLE_BIT
Definition: sql_const.h:111
constexpr const uint64_t OPTIMIZER_SWITCH_INDEX_MERGE_SORT_UNION
Definition: sql_const.h:194
constexpr const uint64_t OPTIMIZER_SWITCH_SUBQUERY_TO_DERIVED
Definition: sql_const.h:221
constexpr const int MAX_INTERVAL_VALUE_LENGTH
Max length of enum/set values.
Definition: sql_const.h:121
constexpr const uint8_t CONTEXT_ANALYSIS_ONLY_DERIVED
Don't evaluate this subquery during derived table prepare even if it's a constant one.
Definition: sql_const.h:186
constexpr const unsigned int MAX_KEY_LENGTH
Definition: sql_const.h:48
constexpr const int MAX_DOUBLE_STR_LENGTH
-[digits].E+###
Definition: sql_const.h:157
constexpr const uint64_t OPTIMIZER_SWITCH_LOOSE_SCAN
Definition: sql_const.h:211
constexpr const uint64_t OPTIMIZER_SWITCH_BNL
Definition: sql_const.h:207
constexpr const int STACK_BUFF_ALLOC
For stack overrun checks.
Definition: sql_const.h:146
constexpr const int MYSQLD_SUCCESS_EXIT
Exit code used by mysqld_exit, exit and _exit function to indicate successful termination of mysqld.
Definition: sql_const.h:242
constexpr const int MYSQLD_ABORT_EXIT
Exit code used by mysqld_exit, exit and _exit function to signify unsuccessful termination of mysqld.
Definition: sql_const.h:249
constexpr const uint64_t OPTIMIZER_SWITCH_USE_INDEX_EXTENSIONS
Definition: sql_const.h:215
constexpr const size_t MAX_TABLES
Max tables in join.
Definition: sql_const.h:108
enum_walk
Enumeration for {Item,Query_block[_UNIT],Table_function}walk.
Definition: sql_const.h:288
@ SUBQUERY_POSTFIX
constexpr const size_t ACL_ALLOC_BLOCK_SIZE
Definition: sql_const.h:148
constexpr const uint64_t OPTIMIZER_SWITCH_LAST
Definition: sql_const.h:227
constexpr const int MYSQLD_FAILURE_EXIT
Exit code used by mysqld_exit, exit and _exit function to signify unsuccessful termination of mysqld.
Definition: sql_const.h:256
constexpr const uint64_t OPTIMIZER_SWITCH_PREFER_ORDERING_INDEX
Definition: sql_const.h:222
constexpr const uint64_t OPTIMIZER_SWITCH_ENGINE_CONDITION_PUSHDOWN
Definition: sql_const.h:196
constexpr const int MAX_FLOAT_STR_LENGTH
-[digits].E+##
Definition: sql_const.h:155
bool(Item::*)(unsigned char *) Item_processor
Processor type for {Item,Query_block[_UNIT],Table_function}walk.
Definition: sql_const.h:306
constexpr const uint8_t CONTEXT_ANALYSIS_ONLY_VIEW
Special Query_block::prepare mode: changing of query is prohibited.
Definition: sql_const.h:181
constexpr const int PRECISION_FOR_DOUBLE
Definition: sql_const.h:151
constexpr const uint64_t OPTIMIZER_SWITCH_FIRSTMATCH
Definition: sql_const.h:212
constexpr const table_map INNER_TABLE_BIT
Definition: sql_const.h:110
constexpr const int MAX_DATETIME_FULL_WIDTH
YYYY-MM-DD HH:MM:SS.
Definition: sql_const.h:75
constexpr const int MAX_DATETIME_WIDTH
YYYY-MM-DD HH:MM:SS.
Definition: sql_const.h:77
constexpr const uint64_t OPTIMIZER_SWITCH_DUPSWEEDOUT
Definition: sql_const.h:213
enum_mark_columns
Definition: sql_const.h:231
@ MARK_COLUMNS_TEMP
Definition: sql_const.h:235
@ MARK_COLUMNS_READ
Definition: sql_const.h:233
@ MARK_COLUMNS_WRITE
Definition: sql_const.h:234
@ MARK_COLUMNS_NONE
Definition: sql_const.h:232
constexpr const int MAX_ALIAS_NAME
Definition: sql_const.h:43
constexpr const uint64_t OPTIMIZER_SWITCH_SEMIJOIN
Definition: sql_const.h:210
constexpr const size_t MAX_TABLES_FOR_SIZE
MAX_TABLES and xxx_TABLE_BIT are used in optimization of table factors and expressions,...
Definition: sql_const.h:105
constexpr const int MAX_FIELD_NAME
Definition: sql_const.h:44
constexpr const int CREATE_MODE
Default mode on new files.
Definition: sql_const.h:131
enum_condition_context
Enumeration for Query_block::condition_context.
Definition: sql_const.h:312
constexpr const unsigned long LONG_TIMEOUT
Definition: sql_const.h:159
constexpr const uint64_t OPTIMIZER_SWITCH_INDEX_MERGE
@optimizer_switch flags.
Definition: sql_const.h:192
constexpr const unsigned int MAX_FIELD_BLOBLENGTH
Definition: sql_const.h:54
constexpr const uint64_t OPTIMIZER_SWITCH_SUBQ_MAT_COST_BASED
Definition: sql_const.h:214
constexpr const uint64_t OPTIMIZER_SKIP_SCAN
Definition: sql_const.h:219