MySQL 9.5.0
Source Code Documentation
system_variables.h
Go to the documentation of this file.
1/* Copyright (c) 2015, 2025, 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#ifndef SYSTEM_VARIABLES_INCLUDED
25#define SYSTEM_VARIABLES_INCLUDED
26
27#include <stddef.h>
28#include <stdint.h>
29#include <sys/types.h>
30
31#include "my_base.h" // ha_rows
32#include "my_inttypes.h"
33#include "my_sqlcommand.h"
34#include "my_thread_local.h" // my_thread_id
36#include "sql/rpl_gtid.h" // Gitd_specification
37#include "sql/sql_plugin_ref.h" // plugin_ref
38
39class MY_LOCALE;
40class Time_zone;
41
42using sql_mode_t = uint64_t;
43struct LIST;
44
45// Values for binlog_format sysvar
47 BINLOG_FORMAT_MIXED = 0, ///< statement if safe, otherwise row - autodetected
48 BINLOG_FORMAT_STMT = 1, ///< statement-based
49 BINLOG_FORMAT_ROW = 2, ///< row-based
51 3 ///< thd_binlog_format() returns it when binlog is closed
52};
53
54// Values for rbr_exec_mode_options sysvar
59};
60
61// Values for binlog_row_image sysvar
63 /** PKE in the before image and changed columns in the after image */
65 /** Whenever possible, before and after image contain all columns except
66 blobs. */
68 /** All columns in both before and after image. */
70};
71
72// Bits for binlog_row_value_options sysvar
74 /// Store JSON updates in partial form
76};
77
78// Values for binlog_row_metadata sysvar
82};
83
84// Values for session_track_gtids sysvar
89};
90
91/** Values for use_secondary_engine sysvar. */
96};
97
98/**
99 Values for explain_format sysvar.
100
101 The value "TRADITIONAL_STRICT" is meant only to be used by the mtr test
102 suite. With hypergraph optimizer, if explain_format value is TRADITIONAL,
103 EXPLAIN without a format specifier prints in TREE format. The mtr tests were
104 written *before* this traditional-tree conversion was introduced. So mtr was
105 designed to just ignore the "format not supported with hypergraph" error when
106 a test runs an EXPLAIN without format specifier with --hypergraph. With the
107 conversion introduced, EXPLAIN without format specifier therefore would have
108 output in different formats with and without the mtr --hypergraph option. In
109 order for the mtr tests to be able to continue to pass, mtr internally sets
110 explain_format to TRADITIONAL_STRICT so that these statements continue to
111 error out rather than print TREE format as they would do with TRADITIONAL
112 format. This is a temporary stuff. Once all tests start using TREE format,
113 we will deprecate this value.
114*/
115enum class Explain_format_type : ulong {
116 TRADITIONAL = 0,
118 TREE = 2,
119 JSON = 3
120};
121
122/* Bits for different SQL modes modes (including ANSI mode) */
123inline constexpr sql_mode_t MODE_REAL_AS_FLOAT = 1;
124inline constexpr sql_mode_t MODE_PIPES_AS_CONCAT = 2;
125inline constexpr sql_mode_t MODE_ANSI_QUOTES = 4;
126inline constexpr sql_mode_t MODE_IGNORE_SPACE = 8;
127inline constexpr sql_mode_t MODE_NOT_USED = 16;
130inline constexpr sql_mode_t MODE_NO_DIR_IN_CREATE = 128;
131inline constexpr sql_mode_t MODE_ANSI = 0x40000;
139/*
140 * NO_ZERO_DATE, NO_ZERO_IN_DATE and ERROR_FOR_DIVISION_BY_ZERO modes are
141 * removed in 5.7 and their functionality is merged with STRICT MODE.
142 * However, For backward compatibility during upgrade, these modes are kept
143 * but they are not used. Setting these modes in 5.7 will give warning and
144 * have no effect.
145 */
151inline constexpr sql_mode_t MODE_TRADITIONAL =
153inline constexpr sql_mode_t MODE_HIGH_NOT_PRECEDENCE = 1ULL << 29;
156inline constexpr sql_mode_t MODE_PAD_CHAR_TO_FULL_LENGTH = 1ULL << 31;
157/*
158 If this mode is set the fractional seconds which cannot fit in given fsp will
159 be truncated.
160*/
161inline constexpr sql_mode_t MODE_TIME_TRUNCATE_FRACTIONAL = 1ULL << 32;
162
163inline constexpr sql_mode_t MODE_INTERPRET_UTF8_AS_UTF8MB4 = 1ULL << 33;
164
165inline constexpr sql_mode_t MODE_LAST = 1ULL << 34;
166
177
178/*
179 We can safely ignore and reset these obsolete mode bits while replicating:
180*/
181#define MODE_IGNORED_MASK \
182 (0x00100 | /* was: MODE_POSTGRESQL */ \
183 0x00200 | /* was: MODE_ORACLE */ \
184 0x00400 | /* was: MODE_MSSQL */ \
185 0x00800 | /* was: MODE_DB2 */ \
186 0x01000 | /* was: MODE_MAXDB */ \
187 0x02000 | /* was: MODE_NO_KEY_OPTIONS */ \
188 0x04000 | /* was: MODE_NO_TABLE_OPTIONS */ \
189 0x08000 | /* was: MODE_NO_FIELD_OPTIONS */ \
190 0x10000 | /* was: MODE_MYSQL323 */ \
191 0x20000 | /* was: MODE_MYSQL40 */ \
192 0x10000000 /* was: MODE_NO_AUTO_CREATE_USER */ \
193 )
194
195/*
196 Replication uses 8 bytes to store SQL_MODE in the binary log. The day you
197 use strictly more than 64 bits by adding one more define above, you should
198 contact the replication team because the replication code should then be
199 updated (to store more bytes on disk).
200
201 NOTE: When adding new SQL_MODE types, make sure to also add them to
202 sql_mode_names[] in sys_vars.cc
203*/
204
206 /*
207 How dynamically allocated system variables are handled:
208
209 The global_system_variables and max_system_variables are "authoritative"
210 They both should have the same 'version' and 'size'.
211 When attempting to access a dynamic variable, if the session version
212 is out of date, then the session version is updated and realloced if
213 necessary and bytes copied from global to make up for missing data.
214 */
217 uint dynamic_variables_head; /* largest valid variable offset */
218 uint dynamic_variables_size; /* how many bytes are in use */
219 LIST *dynamic_variables_allocs; /* memory hunks for PLUGIN_VAR_MEMALLOC */
220
226 /* A bitmap for switching optimizations on/off */
228 ulonglong optimizer_trace; ///< bitmap to tune optimizer tracing
229 ulonglong optimizer_trace_features; ///< bitmap to select features to trace
233 sql_mode_t sql_mode; ///< which non-standard SQL behaviour should be enabled
234 ulonglong option_bits; ///< OPTION_xxx constants, e.g. OPTION_PROFILING
246 ulong max_length_for_sort_data; ///< Unused.
277 ulong binlog_format; ///< binlog format for this thd (see enum_binlog_format)
278 ulong rbr_exec_mode_options; // see enum_rbr_exec_mode
280 ulong binlog_row_image; // see enum_binlog_row_image
282 ulong binlog_trx_compression_type; // see enum_binlog_trx_compression
292 /**
293 Controls what resultset metadata will be sent to the client.
294 @sa enum_resultset_metadata
295 */
297
298 /**
299 In slave thread we need to know in behalf of which
300 thread the query is being run to replicate temp tables properly
301 */
303 /**
304 Default transaction access mode. READ ONLY (true) or READ WRITE (false).
305 */
309
312
317
318 /* Only charset part of these variables is sensible */
322
323 /* Both charset and collation parts of these variables are important */
327
328 /* Error messages */
330 /* Locale Support */
332
334 /*
335 TIMESTAMP fields are by default created with DEFAULT clauses
336 implicitly without users request. This flag when set, disables
337 implicit default values and expect users to provide explicit
338 default clause. i.e., when set columns are defined as NULL,
339 instead of NOT NULL by default.
340 */
342
345
347
349
352 ulong session_track_gtids; // see enum_session_track_gtids
353
355
360
361 /*
362 Time in seconds, after which the statistics in mysql.table/index_stats
363 get invalid
364 */
366
367 /**
368 Used for the verbosity of SHOW CREATE TABLE. Currently used for displaying
369 the row format in the output even if the table uses default row format.
370 */
372
373 // Used for replication delay and lag monitoring
375
376 ulong
377 internal_tmp_mem_storage_engine; // enum_internal_tmp_mem_storage_engine
378
380
381 /** Used for controlling preparation of queries against secondary engine. */
383
384 /** Used to determine if statistics from secondary engine can be used
385 by the hypergraph optimizer. */
387
388 /**
389 Used for controlling which statements to execute in a secondary
390 storage engine. Only queries with an estimated cost higher than
391 this value will be attempted executed in a secondary storage
392 engine.
393 */
395
396 /** Used for controlling Group Replication consistency guarantees */
398
400
401 /**
402 @sa Sys_sql_generate_invisible_primary_key
403 */
405
406 /**
407 @sa Sys_show_gipk_in_create_table_and_information_schema
408 */
410
411 /**
412 Used in replication to determine the server version of the original server
413 where the transaction was executed.
414 */
416
417 /**
418 Used in replication to determine the server version of the immediate server
419 in the replication topology.
420 */
422
423 /**
424 Used to determine if the database or tablespace should be encrypted by
425 default.
426 */
428
429 /**
430 @sa Sys_var_print_identified_with_as_hex
431 */
433
434 /**
435 @sa Sys_var_show_create_table_skip_secondary_engine
436 */
438
439 /**
440 @sa Sys_var_generated_random_password_length
441 */
443
444 /**
445 @sa Sys_var_require_row_format
446 */
448 /**
449 @sa Sys_select_into_buffer_size
450 */
452 /**
453 @sa Sys_select_into_disk_sync
454 */
456 /**
457 @sa Sys_select_disk_sync_delay
458 */
460
461 /**
462 @sa Sys_terminology_use_previous
463 */
465
466 /**
467 @sa Sys_connection_memory_limit
468 */
470 /**
471 @sa Sys_connection_memory_chunk_size
472 */
474 /**
475 @sa Sys_connection_global_memory_tracking
476 */
478
479 /**
480 Switch which controls whether XA transactions are detached
481 (made accessible to other connections for commit/rollback)
482 as part of XA PREPARE (true), or at session disconnect (false, default).
483 An important side effect of setting this to true is that temporary tables
484 are disallowed in XA transactions. This is necessary because temporary
485 tables and their contents (and thus changes to them) is bound to
486 specific connections, so they don't make sense if XA transaction is
487 committed or rolled back from another connection.
488 */
490
491 /**
492 @sa Sys_debug_sensitive_session_string
493 */
495
496 /**
497 Used to specify the format in which the EXPLAIN statement should display
498 information if the FORMAT option is not explicitly specified.
499 @sa Sys_explain_format
500 */
502
503 /**
504 Used to specify the JSON format version used by EXPLAIN FORMAT=JSON with
505 the old (non-hypergraph) join optimizer.
506 @sa Sys_explain_json_format_version
507 */
509
510 /// Max size of set operations hash buffer size.
512#ifndef NDEBUG
514#endif
515
516 /**
517 Restrict foreign keys on non-unique or partial keys.
518 @sa Sys_restrict_fk_on_non_standard_key
519 */
521};
522
526
527/**
528 Per thread status variables.
529 Must be long/ulong up to last_system_status_var so that
530 add_to_status/add_diff_to_status can work.
531*/
532
534 /* IMPORTANT! See first_system_status_var definition below. */
547 /*
548 This number doesn't include calls to the default implementation and
549 calls made by range access. The intent is to count only calls made by
550 BatchedKeyAccess.
551 */
579 /* Prepared statements and binary protocol. */
587
590
594
595 /* Number of statements sent from the client. */
597
598 /// How many queries have been executed on a secondary storage engine.
600
602 ulong com_stat[(uint)SQLCOM_END];
603
604 /*
605 IMPORTANT! See last_system_status_var definition below. Variables after
606 'last_system_status_var' cannot be handled automatically by add_to_status()
607 and add_diff_to_status().
608 */
611};
612
613/*
614 This must reference the LAST ulonglong variable in system_status_var that is
615 used as a global counter. It marks the end of a contiguous block of counters
616 that can be iteratively totaled. See add_to_status().
617*/
618#define LAST_STATUS_VAR secondary_engine_execution_count
619
620/*
621 This must reference the FIRST ulonglong variable in system_status_var that is
622 used as a global counter. It marks the start of a contiguous block of counters
623 that can be iteratively totaled.
624*/
625#define FIRST_STATUS_VAR created_tmp_disk_tables
626
627/* Number of contiguous global status variables. */
631 sizeof(ulonglong)) +
632 1;
633
635 System_status_var *dec_var);
636
637void add_to_status(System_status_var *to_var, System_status_var *from_var);
638
640
641#endif // SYSTEM_VARIABLES_INCLUDED
Definition: sql_locale.h:37
This class represents abstract time zone and provides basic interface for MYSQL_TIME <-> my_time_t co...
Definition: tztime.h:49
uint64_t sql_mode_t
Definition: dd_event.h:39
A better implementation of the UNIX ctype(3) library.
This file includes constants used by all storage engines.
my_off_t ha_rows
Definition: my_base.h:1217
Some integer typedefs for easier portability.
unsigned long long int ulonglong
Definition: my_inttypes.h:56
@ SQLCOM_END
Definition: my_sqlcommand.h:213
uint32 my_thread_id
Definition: my_thread_local.h:34
SHOW_VAR status_vars[]
Definition: mysqld.cc:11655
ValueType value(const std::optional< ValueType > &v)
Definition: gtid.h:83
Definition: m_ctype.h:421
Holds information about a Gtid_set.
Definition: rpl_gtid.h:2540
This struct represents a specification of a GTID for a statement to be executed: either "AUTOMATIC",...
Definition: rpl_gtid.h:3999
Definition: my_list.h:36
Per thread status variables.
Definition: system_variables.h:533
ulonglong com_stmt_reprepare
Definition: system_variables.h:581
ulonglong bytes_sent
Definition: system_variables.h:589
ulonglong ha_read_first_count
Definition: system_variables.h:540
ulonglong long_query_count
Definition: system_variables.h:574
ulonglong table_open_cache_triggers_misses
Definition: system_variables.h:567
ulonglong ha_commit_count
Definition: system_variables.h:538
ulonglong secondary_engine_execution_count
How many queries have been executed on a secondary storage engine.
Definition: system_variables.h:599
ulonglong opened_tables
Definition: system_variables.h:561
ulonglong created_tmp_tables
Definition: system_variables.h:536
ulonglong com_stmt_prepare
Definition: system_variables.h:580
ulonglong max_execution_time_exceeded
Definition: system_variables.h:591
ulonglong table_open_cache_overflows
Definition: system_variables.h:565
ulonglong select_full_range_join_count
Definition: system_variables.h:570
ulonglong select_full_join_count
Definition: system_variables.h:569
ulonglong ha_savepoint_count
Definition: system_variables.h:558
ulonglong table_open_cache_misses
Definition: system_variables.h:564
ulonglong filesort_range_count
Definition: system_variables.h:576
ulonglong last_query_partial_plans
Definition: system_variables.h:610
ulong com_other
Definition: system_variables.h:601
ulonglong max_execution_time_set_failed
Definition: system_variables.h:593
ulonglong filesort_scan_count
Definition: system_variables.h:578
ulonglong com_stmt_execute
Definition: system_variables.h:582
ulong com_stat[(uint) SQLCOM_END]
Definition: system_variables.h:602
ulonglong com_stmt_reset
Definition: system_variables.h:585
ulonglong ha_read_next_count
Definition: system_variables.h:543
ulonglong ha_update_count
Definition: system_variables.h:554
ulonglong ha_read_rnd_count
Definition: system_variables.h:545
ulonglong ha_read_rnd_next_count
Definition: system_variables.h:546
ulonglong com_stmt_fetch
Definition: system_variables.h:584
ulonglong created_tmp_disk_tables
Definition: system_variables.h:535
ulonglong opened_shares
Definition: system_variables.h:562
ulonglong count_hit_tmp_table_size
Definition: system_variables.h:537
ulonglong com_stmt_send_long_data
Definition: system_variables.h:583
ulonglong com_stmt_close
Definition: system_variables.h:586
ulonglong bytes_received
Definition: system_variables.h:588
double last_query_cost
Definition: system_variables.h:609
ulonglong ha_read_prev_count
Definition: system_variables.h:544
ulonglong table_open_cache_triggers_overflows
Definition: system_variables.h:568
ulonglong select_range_check_count
Definition: system_variables.h:572
ulonglong table_open_cache_hits
Definition: system_variables.h:563
ulonglong filesort_merge_passes
Definition: system_variables.h:575
ulonglong ha_read_last_count
Definition: system_variables.h:541
ulonglong ha_delete_count
Definition: system_variables.h:539
ulonglong ha_multi_range_read_init_count
Definition: system_variables.h:552
ulonglong filesort_rows
Definition: system_variables.h:577
ulonglong ha_savepoint_rollback_count
Definition: system_variables.h:559
ulonglong ha_external_lock_count
Definition: system_variables.h:560
ulonglong table_open_cache_triggers_hits
Definition: system_variables.h:566
ulonglong ha_read_key_count
Definition: system_variables.h:542
ulonglong select_range_count
Definition: system_variables.h:571
ulonglong ha_rollback_count
Definition: system_variables.h:553
ulonglong ha_prepare_count
Definition: system_variables.h:556
ulonglong ha_write_count
Definition: system_variables.h:555
ulonglong questions
Definition: system_variables.h:596
ulonglong select_scan_count
Definition: system_variables.h:573
ulonglong max_execution_time_set
Definition: system_variables.h:592
ulonglong ha_discover_count
Definition: system_variables.h:557
Definition: system_variables.h:205
ulong read_rnd_buff_size
Definition: system_variables.h:265
plugin_ref temp_table_plugin
Definition: system_variables.h:314
ulong use_secondary_engine
Used for controlling preparation of queries against secondary engine.
Definition: system_variables.h:382
ulong profiling_history_size
Definition: system_variables.h:263
ulong group_concat_max_len
Definition: system_variables.h:276
long optimizer_trace_offset
Definition: system_variables.h:230
ulong trans_prealloc_size
Definition: system_variables.h:275
bool show_create_table_skip_secondary_engine
Definition: system_variables.h:437
ulong trans_alloc_block_size
Definition: system_variables.h:274
bool print_identified_with_as_hex
Definition: system_variables.h:432
bool transaction_read_only
Default transaction access mode.
Definition: system_variables.h:306
ulonglong parser_max_mem_size
Definition: system_variables.h:260
bool select_into_disk_sync
Definition: system_variables.h:455
ulonglong conn_mem_limit
Definition: system_variables.h:469
uint cte_max_recursion_depth
Definition: system_variables.h:240
ulong range_optimizer_max_mem_size
Definition: system_variables.h:261
ulong min_examined_row_limit
Definition: system_variables.h:250
uint32_t original_server_version
Used in replication to determine the server version of the original server where the transaction was ...
Definition: system_variables.h:415
bool sql_generate_invisible_primary_key
Definition: system_variables.h:404
ulong max_length_for_sort_data
Unused.
Definition: system_variables.h:246
ulong net_retry_count
Definition: system_variables.h:254
ulong resultset_metadata
Controls what resultset metadata will be sent to the client.
Definition: system_variables.h:296
ulong read_buff_size
Definition: system_variables.h:264
bool sysdate_is_now
Definition: system_variables.h:343
bool show_gipk_in_create_table_and_information_schema
Definition: system_variables.h:409
bool session_track_schema
Definition: system_variables.h:357
ulong ssl_fips_mode
Definition: system_variables.h:291
ulong optimizer_search_depth
Definition: system_variables.h:258
double long_query_time_double
Definition: system_variables.h:346
ulong max_sp_recursion_depth
Definition: system_variables.h:268
ulong max_insert_delayed_threads
Definition: system_variables.h:249
double secondary_engine_cost_threshold
Used for controlling which statements to execute in a secondary storage engine.
Definition: system_variables.h:394
char * dynamic_variables_ptr
Definition: system_variables.h:216
long optimizer_trace_limit
Definition: system_variables.h:231
const CHARSET_INFO * character_set_filesystem
Definition: system_variables.h:319
ulong auto_increment_offset
Definition: system_variables.h:237
ulong net_buffer_length
Definition: system_variables.h:251
ulong binlog_trx_compression_type
Definition: system_variables.h:282
MY_LOCALE * lc_messages
Definition: system_variables.h:329
ulong max_points_in_geometry
Definition: system_variables.h:247
ulong lock_wait_timeout
Definition: system_variables.h:243
ulonglong option_bits
OPTION_xxx constants, e.g. OPTION_PROFILING.
Definition: system_variables.h:234
ulong information_schema_stats_expiry
Definition: system_variables.h:365
ulong join_buff_size
Definition: system_variables.h:242
bool windowing_use_high_precision
Definition: system_variables.h:225
uint select_into_disk_sync_delay
Definition: system_variables.h:459
ulong net_read_timeout
Definition: system_variables.h:253
uint32_t generated_random_password_length
Definition: system_variables.h:442
bool enable_secondary_engine_statistics
Used to determine if statistics from secondary engine can be used by the hypergraph optimizer.
Definition: system_variables.h:386
ulong auto_increment_increment
Definition: system_variables.h:237
ulong max_execution_time
Definition: system_variables.h:354
MY_LOCALE * lc_time_names
Definition: system_variables.h:331
ulong session_track_gtids
Definition: system_variables.h:352
ulonglong long_query_time
Definition: system_variables.h:223
ulonglong optimizer_switch
Definition: system_variables.h:227
bool binlog_rows_query_log_events
Definition: system_variables.h:344
ulong net_write_timeout
Definition: system_variables.h:256
ulonglong original_commit_timestamp
Definition: system_variables.h:374
char * debug_sensitive_session_str
Definition: system_variables.h:494
LIST * dynamic_variables_allocs
Definition: system_variables.h:219
ulong max_allowed_packet
Definition: system_variables.h:244
ulonglong optimizer_trace_features
bitmap to select features to trace
Definition: system_variables.h:229
bool explicit_defaults_for_timestamp
Definition: system_variables.h:341
bool end_markers_in_json
Definition: system_variables.h:224
ulong optimizer_prune_level
Definition: system_variables.h:257
bool require_row_format
Definition: system_variables.h:447
Time_zone * time_zone
Definition: system_variables.h:333
Gtid_specification gtid_next
Definition: system_variables.h:350
bool big_tables
Definition: system_variables.h:311
ulong range_alloc_block_size
Definition: system_variables.h:271
ulong conn_mem_chunk_size
Definition: system_variables.h:473
ulong dynamic_variables_version
Definition: system_variables.h:215
bool session_track_state_change
Definition: system_variables.h:358
ulong binlog_row_image
Definition: system_variables.h:280
uint32_t immediate_server_version
Used in replication to determine the server version of the immediate server in the replication topolo...
Definition: system_variables.h:421
bool show_create_table_verbosity
Used for the verbosity of SHOW CREATE TABLE.
Definition: system_variables.h:371
bool sql_log_bin
Definition: system_variables.h:285
ulong updatable_views_with_limit
Definition: system_variables.h:288
ulong transaction_isolation
Definition: system_variables.h:287
uint explain_json_format_version
Used to specify the JSON format version used by EXPLAIN FORMAT=JSON with the old (non-hypergraph) joi...
Definition: system_variables.h:508
sql_mode_t sql_mode
which non-standard SQL behaviour should be enabled
Definition: system_variables.h:233
my_thread_id pseudo_thread_id
In slave thread we need to know in behalf of which thread the query is being run to replicate temp ta...
Definition: system_variables.h:302
Gtid_set_or_null gtid_next_list
Definition: system_variables.h:351
ulonglong tmp_table_size
Definition: system_variables.h:222
ulong query_prealloc_size
Definition: system_variables.h:273
const CHARSET_INFO * collation_server
Definition: system_variables.h:324
bool xa_detach_on_prepare
Switch which controls whether XA transactions are detached (made accessible to other connections for ...
Definition: system_variables.h:489
ulonglong binlog_row_value_options
Definition: system_variables.h:284
ulonglong max_heap_table_size
Definition: system_variables.h:221
ulong rbr_exec_mode_options
Definition: system_variables.h:278
const CHARSET_INFO * character_set_client
Definition: system_variables.h:320
ulong terminology_use_previous
Definition: system_variables.h:464
uint binlog_trx_compression_level_zstd
Definition: system_variables.h:283
bool keep_files_on_create
Definition: system_variables.h:308
const CHARSET_INFO * default_collation_for_utf8mb4
Definition: system_variables.h:379
ulong optimizer_trace_max_mem_size
Definition: system_variables.h:232
bool restrict_fk_on_non_standard_key
Restrict foreign keys on non-unique or partial keys.
Definition: system_variables.h:520
bool conn_global_mem_tracking
Definition: system_variables.h:477
ulong bulk_insert_buff_size
Definition: system_variables.h:238
uint max_user_connections
Definition: system_variables.h:289
ulonglong histogram_generation_max_mem_size
Definition: system_variables.h:241
bool binlog_direct_non_trans_update
Definition: system_variables.h:279
ulong default_week_format
Definition: system_variables.h:269
ulong completion_type
Definition: system_variables.h:286
bool binlog_trx_compression
Definition: system_variables.h:281
uint dynamic_variables_size
Definition: system_variables.h:218
plugin_ref table_plugin
Definition: system_variables.h:313
ulong group_replication_consistency
Used for controlling Group Replication consistency guarantees.
Definition: system_variables.h:397
ha_rows max_join_size
Definition: system_variables.h:236
const CHARSET_INFO * character_set_results
Definition: system_variables.h:321
bool pseudo_replica_mode
Definition: system_variables.h:348
char * track_sysvars_ptr
Definition: system_variables.h:356
ulong div_precincrement
Definition: system_variables.h:266
bool low_priority_updates
Definition: system_variables.h:307
uint dynamic_variables_head
Definition: system_variables.h:217
ulong net_interactive_timeout
Definition: system_variables.h:252
ulonglong set_operations_buffer_size
Max size of set operations hash buffer size.
Definition: system_variables.h:511
char * external_table_secondary_storage_engine
Definition: system_variables.h:316
const CHARSET_INFO * collation_database
Definition: system_variables.h:325
ulong select_into_buffer_size
Definition: system_variables.h:451
ulong preload_buff_size
Definition: system_variables.h:262
ulong binlog_format
binlog format for this thd (see enum_binlog_format)
Definition: system_variables.h:277
ulong max_sort_length
Definition: system_variables.h:248
ulong net_wait_timeout
Definition: system_variables.h:255
bool sql_require_primary_key
Definition: system_variables.h:399
char * debug_set_operations_secondary_overflow_at
Definition: system_variables.h:513
bool default_table_encryption
Used to determine if the database or tablespace should be encrypted by default.
Definition: system_variables.h:427
ulong query_alloc_block_size
Definition: system_variables.h:272
ulong max_seeks_for_key
Definition: system_variables.h:270
ulong my_aes_mode
Definition: system_variables.h:290
ulonglong optimizer_trace
bitmap to tune optimizer tracing
Definition: system_variables.h:228
bool old_alter_table
Definition: system_variables.h:310
uint eq_range_index_dive_limit
Definition: system_variables.h:239
char * external_table_storage_engine
Definition: system_variables.h:315
ha_rows select_limit
Definition: system_variables.h:235
ulong max_error_count
Definition: system_variables.h:245
ulong internal_tmp_mem_storage_engine
Definition: system_variables.h:377
const CHARSET_INFO * collation_connection
Definition: system_variables.h:326
Explain_format_type explain_format
Used to specify the format in which the EXPLAIN statement should display information if the FORMAT op...
Definition: system_variables.h:501
ulong session_track_transaction_info
Definition: system_variables.h:359
ulong sortbuff_size
Definition: system_variables.h:267
ulong optimizer_max_subgraph_pairs
Definition: system_variables.h:259
Definition: my_tree.h:68
Definition: sql_plugin_ref.h:45
constexpr sql_mode_t MODE_NO_ENGINE_SUBSTITUTION
Definition: system_variables.h:154
constexpr sql_mode_t MODE_ALLOWED_MASK
Definition: system_variables.h:167
constexpr sql_mode_t MODE_NOT_USED
Definition: system_variables.h:127
constexpr sql_mode_t MODE_INVALID_DATES
Definition: system_variables.h:148
enum_rbr_exec_mode
Definition: system_variables.h:55
@ RBR_EXEC_MODE_LAST_BIT
Definition: system_variables.h:58
@ RBR_EXEC_MODE_IDEMPOTENT
Definition: system_variables.h:57
@ RBR_EXEC_MODE_STRICT
Definition: system_variables.h:56
constexpr sql_mode_t MODE_NO_BACKSLASH_ESCAPES
Definition: system_variables.h:133
constexpr sql_mode_t MODE_NO_UNSIGNED_SUBTRACTION
Definition: system_variables.h:129
constexpr sql_mode_t MODE_TRADITIONAL
Definition: system_variables.h:151
constexpr sql_mode_t MODE_TIME_TRUNCATE_FRACTIONAL
Definition: system_variables.h:161
void add_to_status(System_status_var *to_var, System_status_var *from_var)
Definition: system_variables.cc:42
use_secondary_engine
Values for use_secondary_engine sysvar.
Definition: system_variables.h:92
@ SECONDARY_ENGINE_OFF
Definition: system_variables.h:93
@ SECONDARY_ENGINE_FORCED
Definition: system_variables.h:95
@ SECONDARY_ENGINE_ON
Definition: system_variables.h:94
enum_binlog_row_metadata
Definition: system_variables.h:79
@ BINLOG_ROW_METADATA_FULL
Definition: system_variables.h:81
@ BINLOG_ROW_METADATA_MINIMAL
Definition: system_variables.h:80
constexpr sql_mode_t MODE_NO_ZERO_IN_DATE
Definition: system_variables.h:146
enum_binlog_row_value_options
Definition: system_variables.h:73
@ PARTIAL_JSON_UPDATES
Store JSON updates in partial form.
Definition: system_variables.h:75
constexpr sql_mode_t MODE_ONLY_FULL_GROUP_BY
Definition: system_variables.h:128
#define LAST_STATUS_VAR
Definition: system_variables.h:618
Explain_format_type
Values for explain_format sysvar.
Definition: system_variables.h:115
constexpr sql_mode_t MODE_ERROR_FOR_DIVISION_BY_ZERO
Definition: system_variables.h:149
const int COUNT_GLOBAL_STATUS_VARS
Definition: system_variables.h:628
constexpr sql_mode_t MODE_STRICT_TRANS_TABLES
Definition: system_variables.h:135
constexpr sql_mode_t MODE_INTERPRET_UTF8_AS_UTF8MB4
Definition: system_variables.h:163
constexpr sql_mode_t MODE_PIPES_AS_CONCAT
Definition: system_variables.h:124
#define FIRST_STATUS_VAR
Definition: system_variables.h:625
constexpr sql_mode_t MODE_NO_AUTO_VALUE_ON_ZERO
Definition: system_variables.h:132
void reset_system_status_vars(System_status_var *status_vars)
Definition: system_variables.cc:95
enum_binlog_row_image
Definition: system_variables.h:62
@ BINLOG_ROW_IMAGE_MINIMAL
PKE in the before image and changed columns in the after image.
Definition: system_variables.h:64
@ BINLOG_ROW_IMAGE_FULL
All columns in both before and after image.
Definition: system_variables.h:69
@ BINLOG_ROW_IMAGE_NOBLOB
Whenever possible, before and after image contain all columns except blobs.
Definition: system_variables.h:67
constexpr sql_mode_t MODE_NO_ZERO_DATE
Definition: system_variables.h:147
constexpr sql_mode_t MODE_LAST
Definition: system_variables.h:165
void add_diff_to_status(System_status_var *to_var, System_status_var *from_var, System_status_var *dec_var)
Definition: system_variables.cc:70
constexpr sql_mode_t MODE_REAL_AS_FLOAT
Definition: system_variables.h:123
constexpr sql_mode_t MODE_NO_DIR_IN_CREATE
Definition: system_variables.h:130
enum_binlog_format
Definition: system_variables.h:46
@ BINLOG_FORMAT_UNSPEC
thd_binlog_format() returns it when binlog is closed
Definition: system_variables.h:50
@ BINLOG_FORMAT_MIXED
statement if safe, otherwise row - autodetected
Definition: system_variables.h:47
@ BINLOG_FORMAT_ROW
row-based
Definition: system_variables.h:49
@ BINLOG_FORMAT_STMT
statement-based
Definition: system_variables.h:48
enum_session_track_gtids
Definition: system_variables.h:85
@ SESSION_TRACK_GTIDS_ALL_GTIDS
Definition: system_variables.h:88
@ SESSION_TRACK_GTIDS_OWN_GTID
Definition: system_variables.h:87
@ SESSION_TRACK_GTIDS_OFF
Definition: system_variables.h:86
constexpr sql_mode_t MODE_STRICT_ALL_TABLES
Definition: system_variables.h:137
constexpr sql_mode_t MODE_PAD_CHAR_TO_FULL_LENGTH
Definition: system_variables.h:156
constexpr sql_mode_t MODE_ANSI
Definition: system_variables.h:131
constexpr sql_mode_t MODE_IGNORE_SPACE
Definition: system_variables.h:126
constexpr sql_mode_t MODE_HIGH_NOT_PRECEDENCE
Definition: system_variables.h:153
constexpr sql_mode_t MODE_ANSI_QUOTES
Definition: system_variables.h:125