System Variable Differences Between MariaDB 10.3 and MySQL 5.7
The following is a comparison of variables that either appear only in MariaDB 10.3 or MySQL 5.7, or have different default settings in MariaDB 10.3, and MySQL 5.7. MariaDB 10.3.10 and MySQL 5.7.13, with only default plugins enabled, were used for the comparison.
The most notable differences are that MariaDB includes, by default, the Aria storage engine (resulting in extra memory allocation), Galera Cluster, and has a different thread pool implementation. For this reason, a default implementation of MariaDB 10.3 will use more memory than MySQL 5.7. MariaDB 10.3 and MySQL 5.7 also have different GTID implementations.
MariaDB's extra memory usage can be handled with the following rules of thumb:
If you are not using MyISAM and don't plan to use Aria:
Set key_buffer_size to something very low (16K) as it's not used.
Set aria_pagecache_buffer_size to what you think you need for handling internal tmp tables that didn't fit in memory.
Normally this is what before you had set for key_buffer_size (at least 1M).
If you are using MyISAM and not planning to use Aria:
Set aria_pagecache_buffer_size to what you think you need for handling internal tmp tables that didn't fit in memory.
If you are planning to use Aria, you should set aria_pagecache_buffer_size to something that fits a big part of your normal data + overflow temporary tables.
Comparison Table
DEFAULT
-
MariaDB 10.3 introduces new ALTER TABLE ALGORITHM clauses to avoid slow copies in certain instances. This variable allows setting this if no ALGORITHM clause is specified. .
avoid_temporal_upgrade
-
OFF
MySQL-only variable for determining whether ALTER TABLE implicitly upgrades temporal columns.
binlog_error_action
ABORT_SERVER
MySQL-only variable for controlling what happens when the server cannot write to the binary log.
binlog_group_commit_sync_delay
0
MySQL-only variable for controlling the wait time before synchronizing the binary log file to disk.
binlog_group_commit_sync_no_delay_count
0
MySQL-only variable for setting the maximum number of transactions to wait for before aborting the current binlog_group_commit_sync_delay delay.
binlog_max_flush_queue_time
-
0
MySQL-only variable specifying a timeout for reading transactions from the flush queue before continuing with group commit and syncing log to disk.
binlog_order_commits
-
ON
MySQL-only variable for determining whether transactions may be committed in parallel.
binlog_rows_query_log_events
-
OFF
MySQL-only variable for logging extra information in row-based logging.
block_encryption_mode
-
aes-128-ecb
MySQL-only variable for controlling the block encryption mode for block-based algorithms.
ON
-
Permits disabling constraint checks, for example when loading a table that violates some constraints that you plan to fix later.
check_proxy_users
OFF
MySQL-only variable for controlling whether the server performs proxy user mapping for authentication plugins.
default_authentication_plugin
mysql_native_password
MySQL's default authentication plugin.
default_password_lifetime
360
MySQL-only variable determining how long passwords are valid for before expiring.
disabled_storage_engines
empty
MySQL-only variable for disabling specific storage engines.
disconnect_on_expired_password
-
ON
MySQL permits passwords to be expired.
end_markers_in_json
-
OFF
MySQL-only variable for adding end markers to JSON output.
0
200
Variable for tuning when the optimizer should switch from using index dives to index statistics for qualifying rows estimation.
MariaDB's version indicates whether YaSSL or openssl was used. MySQL's is a synonym for have_ssl.
have_statement_timeout
-
MySQL's statement execution timeout feature is available.
0
-
Time in seconds that the server waits for idle read-only transactions.
*
*
The list of differences between MariaDB 10.3 and MySQL 5.7 Innodb variables is currently incomplete.
1
1
MariaDB has an extra mode, 3, for skipping the rollback of connected transactions.
ON
-
Whether redo logging should be reduced when natively creating indexes or rebuilding tables
internal_tmp_disk_storage_engine
-
INNODB
MySQL uses this variable to set the storage engine for on-disk internal temporary tables.
134217728
8388608
Size of the buffer for the index blocks used by MyISAM tables and shared for all threads.
256
-
Minimum length of sql statement (in statement mode) or record (in row mode) that can be compressed. See Compressing Events to Reduce Size of the Binary Log.
log_bin_use_v1_row_events
-
OFF
MySQL-only variable showing whether or not MySQL's version 2 binary logging format is being used.
log_builtin_as_identified_by_password
-
OFF
MySQL variable for use with binary logging of user-management statements,
log_error_verbosity
-
3
MySQL variable for setting verbosity of error, warning, and note messages in the error log.
admin, filesort, filesort_on_disk, full_join, full_scan, query_cache, query_cache_miss, tmp_table, tmp_table_on_disk
-
For slow query log filtering.
empty
-
Controls information to be added to the slow query log. See also Slow Query Log Extended Statistics.
log_statements_unsafe_for_binlog
-
ON
MySQL setting for controlling whether binlog warnings are written to the error log.
log_syslog*
platform-dependent
-
MySQL variables with settings for writing to syslog.
log_throttle_queries_not_using_indexes
-
0
MySQL-only variable for limiting the number of statements without indexes written to the slow query log.
log_timestamps
-
UTC
MySQL-only variable controlling the timezone for certain logging conditions.
master_info_repository
-
FILE
MySQL-only variable determining whether the slaves log info to file or table.
max_execution_time
-
0
MySQL renamed the max_statement_time variable.
16777216
-
Maximum size for parameter values sent with mysql_stmt_send_long_data(). Removed in MySQL 5.6.
max_points_in_geometry
-
65536
Maximum points_per_circle for MySQL's ST_Buffer_Strategy() function.
4294967295
4294967295 (32-bit) or 18446744073709547520 (64-bit)
The most key seeks required when searching with an index, regardless of the actual index cardinality. If this value is set lower than its default and maximum, indexes will tend to be preferred over table scans.
9223372036854775807
-
Amount of memory a single user session is allowed to allocate.
0
-
Maximum time in seconds that a query can execute before being aborted. MySQL used to have a variable of this name before renaming it max_execution_time.
4294967295
4294967295 (32-bit) or 18446744073709547520 (64-bit)
Read lock requests will be permitted for processing after this many write locks.
262144
-
Size of buffer to use when using multi-range read with range access. See Multi Range Read optimization.
134216704
8388608
Size in bytes of the buffer allocated when creating or sorting indexes on a MyISAM table.
ON
Causes MariaDB to use the MySQL-5.6 low level formats for TIME, DATETIME and TIMESTAMP instead of the MariaDB 5.3+ version.
mysql_native_password_proxy_users
-
OFF
Whether MySQL's authentication plugin supports proxy users. I
new
-
OFF
Used for backward-compatibility with MySQL 4.1, not present in MariaDB.
ngram_token_size
-
2
Sets the n-gram token size for MySQL's n-gram full-text parser.
offline_mode
-
OFF
MySQL settting for specifying whether the server should run in offline mode.
Empty string
-
Used for getting MariaDB to emulate behavior from an old version of MySQL or MariaDB. See OLD Mode.
100
-
Controls number of record samples to check condition selectivity.
A series of flags for controlling the query optimizer. MariaDB has introduced a number of new settings.
optimizer_trace
-
Off by default
MySQL-only variable for optimizer tracing.
optimizer_trace_features
-
Off by default
MySQL-only variable for optimizer tracing.
optimizer_trace_limit
-
1
MySQL-only variable for optimizer tracing.
optimizer_trace_max_mem_size
-
16384
MySQL-only variable for optimizer tracing.
optimizer_trace_offset
-
-1
MySQL-only variable for optimizer tracing.
1
-
Controls which statistics can be used by the optimizer when looking for the best query execution plan.
parser_max_mem_size
-
4294967295 (32-bit) or 18446744073709547520 (64-bit)
MySQL variable for limiting memory available to the parser.
5
-
Time in seconds between sending progress reports to the client for time-consuming statements.
16384
8192
Size in bytes of the extra blocks allocated during query parsing and execution (after query_prealloc_size is used up).
OFF
-
Whether to strip any comments from the query before searching to see if it exists in the query cache.
24576
8192
Size in bytes of the persistent buffer for query parsing and execution, allocated on connect and freed on disconnect.
range_optimizer_max_mem_size
-
1536000
MySQL-only variable setting a limit on the range optimizer's memory usage.
rbr_exec_mode
-
STRICT
MySQL-only variable for determining the handling of certain key errors.
0
-
Permits restricting the speed at which the slave reads the binlog from the master.
relay_log_info_repository
-
FILE
MySQL-only variable determining whether the slave's position in the relay logs is written to a file or table.
ON
-
Tells the slave to reproduce annotate_rows_events received from the master in its own binary log.
require_secure_transport
-
OFF
MySQL-only variable determining whether client to server connections need to be secure.
rpl_stop_slave_timeout
-
31536000
MySQL-only variable for controlling the time that STOP SLAVE waits before timing out.
NO
-
MariaDB-only option permitting the restricting of direct setting of a session timestamp..
server_id_bits
-
server_id
MySQL-only variable for use in MySQL Cluster.
server_uuid
-
UUID
MySQL-only variable containing the UUID.
session_track_gtids
-
OFF
MySQL-only variables for tracking gtid changes. MariaDB and MySQL's gtid implementation is different.
sha256_password_proxy_users
-
OFF
MySQL-only variable determining whether the sha256_password plugin supports proxy users.
show_compatibility_56
-
OFF
MySQL variable for indicating status of certain compatibility traits between MySQL 5.6 and MySQL 5.7.
show_old_temporals
-
OFF
MySQL-only variable for determining whether SHOW CREATE TABLE output should include comments for old format temporal columns.
slave_allow_batching
-
OFF
MySQL-only replication variable.
slave_checkpoint_group
-
512
MySQL-only replication variable.
slave_checkpoint_period
-
300
MySQL-only replication variable.
slave_parallel_type
-
DATABASE
MySQL-only replication variable.
slave_pending_jobs_size_max
-
16777216
MySQL-only replication variable.
slave_preserve_commit_order
-
OFF
MySQL-only replication variable.
slave_rows_search_algorithms
-
TABLE_SCAN, INDEX_SCAN
MySQL-only replication variable.
NO
See Running triggers on the slave for Row-based events for a description and use-case for this setting.
1213,1205
-
When an error occurs during a transaction on the slave, replication usually halts. By default, transactions that caused a deadlock or elapsed lock wait timeout will be retried. One can add other errors to the the list of errors that should be retried by adding a comma-separated list of error numbers to this variable.
0
-
Interval in seconds for the slave SQL thread to retry a failed transaction due to a deadlock, elapsed lock wait timeout or an error listed in slave_transaction_retry_errors.
STRICT_TRANS_TABLES, ERROR_FOR_DIVISION_BY_ZERO, NO_AUTO_CREATE_USER, NO_ENGINE_SUBSTITUTION
ONLY_FULL_GROUP_BY, STRICT_TRANS_TABLES, NO_ZERO_IN_DATE, NO_ZERO_DATE, ERROR_FOR_DIVISION_BY_ZERO, NO_AUTO_CREATE_USER, NO_ENGINE_SUBSTITUTION
See SQL Mode.
ON
-
In MariaDB, when password validation plugins are enabled, reject passwords that cannot be validated (passwords specified as a hash).
super_read_only
-
OFF
MySQL variable for prohibiting client updates from users with the SUPER privilege.
0
-
Interval, in seconds, between when successive keep-alive packets are sent if no acknowledgement is received.
0
-
Number of unacknowledged probes to send before considering the connection dead and notifying the application layer.
0
-
Timeout, in milliseconds, with no activity until the first TCP keep-alive packet is sent.
Number of processors
16*
See Using the Thread Pool. *Only available in MySQL with a commercial plugin.
tls_version
-
Varies
MySQL-only variable showing the permitted tls protocols.
18446744073709551615
-
Max size for data for an internal temporary on-disk MyISAM or Aria table.
transaction_allow_batching
-
OFF
MySQL-only variable for enabling batching of statements within the same transaction in MySQL Cluster.
transaction_write_set_extraction
-
OFF
Unused MySQL-only variable.
Varies
-
Permits seeing exactly which version of the source was used for a build.
See Also
Last updated
Was this helpful?