Mysql:8.0.19:新特性、过期、已经删除的
- 1.4 What Is New in MySQL 8.0
- 1.5 Server and Status Variables and Options Added, Deprecated, or Removed in MySQL 8.0
This section summarizes what has been added to, deprecated in, and removed from MySQL 8.0. A companion section lists MySQL server options and variables that have been added, deprecated, or removed in MySQL 8.0. See Section 1.5, “Server and Status Variables and Options Added, Deprecated, or Removed in MySQL 8.0”.
The following features have been added to MySQL 8.0:
-
Data dictionary. MySQL now incorporates a transactional data dictionary that stores information about database objects. In previous MySQL releases, dictionary data was stored in metadata files and nontransactional tables. For more information, see Chapter 14, MySQL Data Dictionary.
-
Atomic data definition statements (Atomic DDL). An atomic DDL statement combines the data dictionary updates, storage engine operations, and binary log writes associated with a DDL operation into a single, atomic transaction. For more information, see Section 13.1.1, “Atomic Data Definition Statement Support”.
-
Upgrade procedure. Previously, after installation of a new version of MySQL, the MySQL server automatically upgrades the data dictionary tables at the next startup, after which the DBA is expected to invoke mysql_upgrade manually to upgrade the system tables in the
mysqlschema, as well as objects in other schemas such as thesysschema and user schemas.As of MySQL 8.0.16, the server performs the tasks previously handled by mysql_upgrade. After installation of a new MySQL version, the server now automatically performs all necessary upgrade tasks at the next startup and is not dependent on the DBA invoking mysql_upgrade. In addition, the server updates the contents of the help tables (something mysql_upgrade did not do). A new
--upgradeserver option provides control over how the server performs automatic data dictionary and server upgrade operations. For more information, see Section 2.11.3, “What the MySQL Upgrade Process Upgrades”. -
Security and account management. These enhancements were added to improve security and enable greater DBA flexibility in account management:
-
The grant tables in the
mysqlsystem database are nowInnoDB(transactional) tables. Previously, these wereMyISAM(nontransactional) tables. The change of grant table storage engine underlies an accompanying change to the behavior of account-management statements. Previously, an account-management statement (such asCREATE USERorDROP USER) that named multiple users could succeed for some users and fail for others. Now, each statement is transactional and either succeeds for all named users or rolls back and has no effect if any error occurs. The statement is written to the binary log if it succeeds, but not if it fails; in that case, rollback occurs and no changes are made. For more information, see Section 13.1.1, “Atomic Data Definition Statement Support”. -
A new
caching_sha2_passwordauthentication plugin is available. Like thesha256_passwordplugin,caching_sha2_passwordimplements SHA-256 password hashing, but uses caching to address latency issues at connect time. It also supports more connection protocols and does not require linking against OpenSSL for RSA key pair-based password-exchange capabilities. See Section 6.4.1.2, “Caching SHA-2 Pluggable Authentication”.The
caching_sha2_passwordandsha256_passwordauthentication plugins provide more secure password encryption than themysql_native_passwordplugin, andcaching_sha2_passwordprovides better performance thansha256_password. Due to these superior security and performance characteristics ofcaching_sha2_password, it is now the preferred authentication plugin, and is also the default authentication plugin rather thanmysql_native_password. For information about the implications of this change of default plugin for server operation and compatibility of the server with clients and connectors, see caching_sha2_password as the Preferred Authentication Plugin. -
MySQL now supports roles, which are named collections of privileges. Roles can be created and dropped. Roles can have privileges granted to and revoked from them. Roles can be granted to and revoked from user accounts. The active applicable roles for an account can be selected from among those granted to the account, and can be changed during sessions for that account. For more information, see Section 6.2.10, “Using Roles”.
-
MySQL now incorporates the concept of user account categories, with system and regular users distinguished according to whether they have the
SYSTEM_USERprivilege. See Section 6.2.11, “Account Categories”. -
Previously, it was not possible to grant privileges that apply globally except for certain schemas. This is now possible if the
partial_revokessystem variable is enabled. See Section 6.2.12, “Privilege Restriction Using Partial Revokes”. -
The
GRANTstatement has anASclause that specifies additional information about the privilege context to use for statement execution. This syntax is visible at the SQL level, although its primary purpose is to enable uniform replication across all nodes of grantor privilege restrictions imposed by partial revokes, by causing those restrictions to appear in the binary log. See Section 13.7.1.6, “GRANT Statement”.user[WITH ROLE] -
MySQL now maintains information about password history, enabling restrictions on reuse of previous passwords. DBAs can require that new passwords not be selected from previous passwords for some number of password changes or period of time. It is possible to establish password-reuse policy globally as well as on a per-account basis.
It is now possible to require that attempts to change account passwords be verified by specifying the current password to be replaced. This enables DBAs to prevent users from changing password without proving that they know the current password. It is possible to establish password-verification policy globally as well as on a per-account basis.
Accounts are now permitted to have dual passwords, which enables phased password changes to be performed seamlessly in complex multiple-server systems, without downtime.
MySQL now enables administrators to configure user accounts such that too many consecutive login failures due to incorrect passwords cause temporary account locking. The required number of failures and the lock time are configurable per account.
These new capabilities provide DBAs more complete control over password management. For more information, see Section 6.2.15, “Password Management”.
-
MySQL now supports FIPS mode, if compiled using OpenSSL, and an OpenSSL library and FIPS Object Module are available at runtime. FIPS mode imposes conditions on cryptographic operations such as restrictions on acceptable encryption algorithms or requirements for longer key lengths. See Section 6.5, “FIPS Support”.
-
The SSL context the server uses for new connections now is reconfigurable at runtime. This capability may be useful, for example, to avoid restarting a MySQL server that has been running so long that its SSL certificate has expired. See Server-Side Runtime Configuration for Encrypted Connections.
-
OpenSSL 1.1.1 supports the TLS v1.3 protocol for encrypted connections, and MySQL 8.0.16 and higher supports TLS v1.3 as well, if both the server and client are compiled using OpenSSL 1.1.1 or higher. See Section 6.3.2, “Encrypted Connection TLS Protocols and Ciphers”.
-
MySQL now sets the access control granted to clients on the named pipe to the minimum necessary for successful communication on Windows. Newer MySQL client software can open named pipe connections without any additional configuration. If older client software cannot be upgraded immediately, the new
named_pipe_full_access_groupsystem variable can be used to give a Windows group the necessary permissions to open a named pipe connection. Membership in the full-access group should be restricted and temporary.
-
-
Resource management. MySQL now supports creation and management of resource groups, and permits assigning threads running within the server to particular groups so that threads execute according to the resources available to the group. Group attributes enable control over its resources, to enable or restrict resource consumption by threads in the group. DBAs can modify these attributes as appropriate for different workloads. Currently, CPU time is a manageable resource, represented by the concept of “virtual CPU” as a term that includes CPU cores, hyperthreads, hardware threads, and so forth. The server determines at startup how many virtual CPUs are available, and database administrators with appropriate privileges can associate these CPUs with resource groups and assign threads to groups. For more information, see Section 8.12.5, “Resource Groups”.
-
Table encryption management. Table encryption can now be managed globally by defining and enforcing encryption defaults. The
default_table_encryptionvariable defines an encryption default for newly created schemas and general tablespace. The encryption default for a schema can also be defined using theDEFAULT ENCRYPTIONclause when creating a schema. By default, a table inherits the encryption of the schema or general tablespace it is created in. Encryption defaults are enforced by enabling thetable_encryption_privilege_checkvariable. The privilege check occurs when creating or altering a schema or general tablespace with an encryption setting that differs from thedefault_table_encryptionsetting, or when creating or altering a table with an encryption setting that differs from the default schema encryption. TheTABLE_ENCRYPTION_ADMINprivilege permits overriding default encryption settings whentable_encryption_privilege_checkis enabled. For more information, see Defining an Encryption Default for Schemas and General Tablespaces. -
InnoDB enhancements. These
InnoDBenhancements were added:-
The current maximum auto-increment counter value is written to the redo log each time the value changes, and saved to an engine-private system table on each checkpoint. These changes make the current maximum auto-increment counter value persistent across server restarts. Additionally:
-
A server restart no longer cancels the effect of the
AUTO_INCREMENT = Ntable option. If you initialize the auto-increment counter to a specific value, or if you alter the auto-increment counter value to a larger value, the new value is persisted across server restarts. -
A server restart immediately following a
ROLLBACKoperation no longer results in the reuse of auto-increment values that were allocated to the rolled-back transaction. -
If you modify an
AUTO_INCREMENTcolumn value to a value larger than the current maximum auto-increment value (in anUPDATEoperation, for example), the new value is persisted, and subsequentINSERToperations allocate auto-increment values starting from the new, larger value.
For more information, see Section 15.6.1.6, “AUTO_INCREMENT Handling in InnoDB”, and InnoDB AUTO_INCREMENT Counter Initialization.
-
-
When encountering index tree corruption,
InnoDBwrites a corruption flag to the redo log, which makes the corruption flag crash safe.InnoDBalso writes in-memory corruption flag data to an engine-private system table on each checkpoint. During recovery,InnoDBreads corruption flags from both locations and merges results before marking in-memory table and index objects as corrupt. -
The
InnoDBmemcached plugin supports multiplegetoperations (fetching multiple key-value pairs in a single memcached query) and range queries. See Section 15.20.4, “InnoDB memcached Multiple get and Range Query Support”. -
A new dynamic variable,
innodb_deadlock_detect, may be used to disable deadlock detection. On high concurrency systems, deadlock detection can cause a slowdown when numerous threads wait for the same lock. At times, it may be more efficient to disable deadlock detection and rely on theinnodb_lock_wait_timeoutsetting for transaction rollback when a deadlock occurs. -
The new
INFORMATION_SCHEMA.INNODB_CACHED_INDEXEStable reports the number of index pages cached in theInnoDBbuffer pool for each index. -
InnoDBtemporary tables are now created in the shared temporary tablespace,ibtmp1. -
The
InnoDBtablespace encryption feature supports encryption of redo log and undo log data. See Redo Log Encryption, and Undo Log Encryption. -
InnoDBsupportsNOWAITandSKIP LOCKEDoptions withSELECT ... FOR SHAREandSELECT ... FOR UPDATElocking read statements.NOWAITcauses the statement to return immediately if a requested row is locked by another transaction.SKIP LOCKEDremoves locked rows from the result set. See Locking Read Concurrency with NOWAIT and SKIP LOCKED.SELECT ... FOR SHAREreplacesSELECT ... LOCK IN SHARE MODE, butLOCK IN SHARE MODEremains available for backward compatibility. The statements are equivalent. However,FOR UPDATEandFOR SHAREsupportNOWAIT,SKIP LOCKED, andOFoptions. See Section 13.2.10, “SELECT Statement”.tbl_nameOFapplies locking queries to named tables.tbl_name -
ADD PARTITION,DROP PARTITION,COALESCE PARTITION,REORGANIZE PARTITION, andREBUILD PARTITIONALTER TABLEoptions are supported by native partitioning in-place APIs and may be used withALGORITHM={COPY|INPLACE}andLOCKclauses.DROP PARTITIONwithALGORITHM=INPLACEdeletes data stored in the partition and drops the partition. However,DROP PARTITIONwithALGORITHM=COPYorold_alter_table=ONrebuilds the partitioned table and attempts to move data from the dropped partition to another partition with a compatiblePARTITION ... VALUESdefinition. Data that cannot be moved to another partition is deleted. -
The
InnoDBstorage engine now uses the MySQL data dictionary rather than its own storage engine-specific data dictionary. For information about the data dictionary, see Chapter 14, MySQL Data Dictionary. -
mysqlsystem tables and data dictionary tables are now created in a singleInnoDBtablespace file namedmysql.ibdin the MySQL data directory. Previously, these tables were created in individualInnoDBtablespace files in themysqldatabase directory. -
The following undo tablespace changes are introduced in MySQL 8.0:
-
By default, undo logs now reside in two undo tablespaces that are created when the MySQL instance is initialized. Undo logs are no longer created in the system tablespace.
-
As of MySQL 8.0.14, additional undo tablespaces can be created in a chosen location at runtime using
CREATE UNDO TABLESPACEsyntax.CREATE UNDO TABLESPACE
tablespace_nameADD DATAFILE 'file_name.ibu';Undo tablespaces created using
CREATE UNDO TABLESPACEsyntax can be dropped at runtime usingDROP UNDO TABLESPACEsyntax.DROP UNDO TABLESPACE
tablespace_name;ALTER UNDO TABLESPACEsyntax can be used to mark an undo tablespace as active or inactive.ALTER UNDO TABLESPACE
tablespace_nameSET {ACTIVE|INACTIVE};A
STATEcolumn that shows the state of a tablespace was added to theINFORMATION_SCHEMA.INNODB_TABLESPACEStable. An undo tablespace must be in anemptystate before it can be dropped. -
The
innodb_undo_log_truncatevariable is enabled by default. -
The
innodb_rollback_segmentsvariable defines the number of rollback segments per undo tablespace. Previously,innodb_rollback_segmentsspecified the total number of rollback segments for the MySQL instance. This change increases the number of rollback segments available for concurrent transactions. More rollback segments increases the likelihood that concurrent transactions use separate rollback segments for undo logs, resulting in less resource contention.
-
-
Default values for variables that affect buffer pool preflushing and flushing behavior were modified:
-
The
innodb_max_dirty_pages_pct_lwmdefault value is now 10. The previous default value of 0 disables buffer pool preflushing. A value of 10 enables preflushing when the percentage of dirty pages in the buffer pool exceeds 10%. Enabling preflushing improves performance consistency. -
The
innodb_max_dirty_pages_pctdefault value was increased from 75 to 90.InnoDBattempts to flush data from the buffer pool so that the percentage of dirty pages does not exceed this value. The increased default value permits a greater percentage of dirty pages in the buffer pool.
-
-
The default
innodb_autoinc_lock_modesetting is now 2 (interleaved). Interleaved lock mode permits the execution of multi-row inserts in parallel, which improves concurrency and scalability. The newinnodb_autoinc_lock_modedefault setting reflects the change from statement-based replication to row based replication as the default replication type in MySQL 5.7. Statement-based replication requires the consecutive auto-increment lock mode (the previous default) to ensure that auto-increment values are assigned in a predictable and repeatable order for a given sequence of SQL statements, whereas row-based replication is not sensitive to the execution order of SQL statements. For more information, see InnoDB AUTO_INCREMENT Lock Modes.For systems that use statement-based replication, the new
innodb_autoinc_lock_modedefault setting may break applications that depend on sequential auto-increment values. To restore the previous default, setinnodb_autoinc_lock_modeto 1. -
Renaming a general tablespace is supported by
ALTER TABLESPACE ... RENAME TOsyntax. -
The new
innodb_dedicated_servervariable, which is disabled by default, can be used to haveInnoDBautomatically configure the following options according to the amount of memory detected on the server:This option is intended for MySQL server instances that run on a dedicated server. For more information, see Section 15.8.12, “Enabling Automatic Configuration for a Dedicated MySQL Server”.
-
The new
INFORMATION_SCHEMA.INNODB_TABLESPACES_BRIEFview provides space, name, path, flag, and space type data forInnoDBtablespaces. -
The zlib library version bundled with MySQL was raised from version 1.2.3 to version 1.2.11. MySQL implements compression with the help of the zlib library.
If you use
InnoDBcompressed tables, see Section 2.11.4, “Changes in MySQL 8.0” for related upgrade implications. -
Serialized dictionary information (SDI) is present in all
InnoDBtablespace files except for global temporary tablespace and undo tablespace files. SDI is serialized metadata for table and tablespace objects. The presence of SDI data provides metadata redundancy. For example, dictionary object metadata may be extracted from tablespace files if the data dictionary becomes unavailable. SDI extraction is performed using the ibd2sdi tool. SDI data is stored inJSONformat.The inclusion of SDI data in tablespace files increases tablespace file size. An SDI record requires a single index page, which is 16KB in size by default. However, SDI data is compressed when it is stored to reduce the storage footprint.
-
The
InnoDBstorage engine now supports atomic DDL, which ensures that DDL operations are either fully committed or rolled back, even if the server halts during the operation. For more information, see Section 13.1.1, “Atomic Data Definition Statement Support”. -
Tablespace files can be moved or restored to a new location while the server is offline using the
innodb_directoriesoption. For more information, see Section 15.6.3.6, “Moving Tablespace Files While the Server is Offline”. -
The following redo logging optimizations were implemented:
-
User threads can now write concurrently to the log buffer without synchronizing writes.
-
User threads can now add dirty pages to the flush list in a relaxed order.
-
A dedicated log thread is now responsible for writing the log buffer to the system buffers, flushing system buffers to disk, notifying user threads about written and flushed redo, maintaining the lag required for the relaxed flush list order, and write checkpoints.
-
System variables were added for configuring the use of spin delay by user threads waiting for flushed redo:
-
innodb_log_wait_for_flush_spin_hwm: Defines the maximum average log flush time beyond which user threads no longer spin while waiting for flushed redo. -
innodb_log_spin_cpu_abs_lwm: Defines the minimum amount of CPU usage below which user threads no longer spin while waiting for flushed redo. -
innodb_log_spin_cpu_pct_hwm: Defines the maximum amount of CPU usage above which user threads no longer spin while waiting for flushed redo.
-
-
The
innodb_log_buffer_sizevariable is now dynamic, which permits resizing of the log buffer while the server is running.
For more information, see Section 8.5.4, “Optimizing InnoDB Redo Logging”.
-
-
As of MySQL 8.0.12, undo logging is supported for small updates to large object (LOB) data, which improves performance of LOB updates that are 100 bytes in size or less. Previously, LOB updates were a minimum of one LOB page in size, which is less than optimal for updates that might only modify a few bytes. This enhancement builds upon support added in MySQL 8.0.4 for partial update of LOB data.
-
As of MySQL 8.0.12,
ALGORITHM=INSTANTis supported for the followingALTER TABLEoperations:-
Adding a column. This feature is also referred to as “Instant
ADD COLUMN”. Limitations apply. See Section 15.12.1, “Online DDL Operations”. -
Adding or dropping a virtual column.
-
Adding or dropping a column default value.
-
Changing the index type.
-
Renaming a table.
Operations that support
ALGORITHM=INSTANTonly modify metadata in the data dictionary. No metadata locks are taken on the table, and table data is unaffected, making the operations instantaneous. If not specified explicitly,ALGORITHM=INSTANTis used by default by operations that support it. IfALGORITHM=INSTANTis specified but not supported, the operation fails immediately with an error.For more information about operations that support
ALGORITHM=INSTANT, see Section 15.12.1, “Online DDL Operations”. -
-
As of MySQL 8.0.13, the
TempTablestorage engine supports storage of binary large object (BLOB) type columns. This enhancement improves performance for queries that use temporary tables containing BLOB data. Previously, temporary tables that contained BLOB data were stored in the on-disk storage engine defined byinternal_tmp_disk_storage_engine. For more information, see Section 8.4.4, “Internal Temporary Table Use in MySQL”. -
As of MySQL 8.0.13, the
InnoDBdata-at-rest encryption feature supports general tablespaces. Previously, only file-per-table tablespaces could be encrypted. To support encryption of general tablespaces,CREATE TABLESPACEandALTER TABLESPACEsyntax was extended to include anENCRYPTIONclause.The
INFORMATION_SCHEMA.INNODB_TABLESPACEStable now includes anENCRYPTIONcolumn that indicates whether or not a tablespace is encrypted.The
stage/innodb/alter tablespace (encryption)Performance Schema stage instrument was added to permit monitoring of general tablespace encryption operations. -
Disabling the
innodb_buffer_pool_in_core_filevariable reduces the size of core files by excludingInnoDBbuffer pool pages. To use this variable, thecore_filevariable must be enabled and the operating system must support theMADV_DONTDUMPnon-POSIX extension tomadvise(), which is supported in Linux 3.4 and later. For more information, see Section 15.8.3.7, “Excluding Buffer Pool Pages from Core Files”. -
As of MySQL 8.0.13, user-created temporary tables and internal temporary tables created by the optimizer are stored in session temporary tablespaces that are allocated to a session from a pool of temporary tablespaces. When a session disconnects, its temporary tablespaces are truncated and released back to the pool. In previous releases, temporary tables were created in the global temporary tablespace (
ibtmp1), which did not return disk space to the operating system after temporary tables were dropped.The
innodb_temp_tablespaces_dirvariable defines the location where session temporary tablespaces are created. The default location is the#innodb_tempdirectory in the data directory.The
INNODB_SESSION_TEMP_TABLESPACEStable provides metadata about session temporary tablespaces.The global temporary tablespace (
ibtmp1) now stores rollback segments for changes made to user-created temporary tables. -
As of MySQL 8.0.14,
InnoDBsupports parallel clustered index reads, which can improveCHECK TABLEperformance. This feature does not apply to secondary index scans. Theinnodb_parallel_read_threadssession variable must be set to a value greater than 1 for parallel clustered index reads to occur. The default value is 4. The actual number of threads used to perform a parallel clustered index read is determined by theinnodb_parallel_read_threadssetting or the number of index subtrees to scan, whichever is smaller. -
As of 8.0.14, when the
innodb_dedicated_servervariable is enabled, the size and number of log files are configured according to the automatically configured buffer pool size. Previously, log file size was configured according to the amount of memory detected on the server, and the number of log files was not configured automatically. -
As of 8.0.14, the
ADD DATAFILEclause of theCREATE TABLESPACEstatement is optional, which permits users without theFILEprivilege to create tablespaces. ACREATE TABLESPACEstatement executed without anADD DATAFILEclause implicitly creates a tablespace data file with a unique file name. -
By default, when the amount of memory occupied by the TempTable storage engine exceeds the memory limit defined by the
temptable_max_ramvariable, the TempTable storage engine begins allocating memory-mapped temporary files from disk. As of MySQL 8.0.16, this behavior is controlled by thetemptable_use_mmapvariable. Disablingtemptable_use_mmapcauses the TempTable storage engine to useInnoDBon-disk internal temporary tables instead of memory-mapped files as its overflow mechanism. For more information, see Internal Temporary Table Storage Engine. -
As of MySQL 8.0.16, the
InnoDBdata-at-rest encryption feature supports encryption of themysqlsystem tablespace. Themysqlsystem tablespace contains themysqlsystem database and the MySQL data dictionary tables. For more information, see Section 15.13, “InnoDB Data-at-Rest Encryption”. -
The
innodb_spin_wait_pause_multipliervariable, introduced in MySQL 8.0.16, provides greater control over the duration of spin-lock polling delays that occur when a thread waits to acquire a mutex or rw-lock. Delays can be tuned more finely to account for differences in PAUSE instruction duration on different processor architectures. For more information, see Section 15.8.8, “Configuring Spin Lock Polling”. -
InnoDBparallel read thread performance for large data sets was improved in MySQL 8.0.17 through better utilization of read threads, through a reduction in read thread I/O for prefetch activity that occurs during parallel scans, and through support for parallel scanning of partitions.The parallel read thread feature is controlled by the
innodb_parallel_read_threadsvariable. The maximum setting is now 256, which is the total number of threads for all client connections. If the thread limit is reached, connections fall back to using a single thread. -
The
innodb_idle_flush_pctvariable, introduced in MySQL 8.0.18, permits placing a limit on page flushing during idle periods, which can help extend the life of solid state storage devices. See Limiting Buffer Flushing During Idle Periods. -
Support was added for efficient sampling of
InnoDBdata for the purpose of generating histogram statistics. See Histogram Statistics Analysis.
-
-
Character set support. The default character set has changed from
latin1toutf8mb4. Theutf8mb4character set has several new collations, includingutf8mb4_ja_0900_as_cs, the first Japanese language-specific collation available for Unicode in MySQL. For more information, see Section 10.10.1, “Unicode Character Sets”. -
JSON enhancements. The following enhancements or additions were made to MySQL's JSON functionality:
-
Added the
->>(inline path) operator, which is equivalent to callingJSON_UNQUOTE()on the result ofJSON_EXTRACT().This is a refinement of the column path operator
->introduced in MySQL 5.7;col->>"$.path"is equivalent toJSON_UNQUOTE(col->"$.path"). The inline path operator can be used wherever you can useJSON_UNQUOTE(JSON_EXTRACT()), suchSELECTcolumn lists,WHEREandHAVINGclauses, andORDER BYandGROUP BYclauses. For more information, see the description of the operator, as well as JSON Path Syntax. -
Added two JSON aggregation functions
JSON_ARRAYAGG()andJSON_OBJECTAGG().JSON_ARRAYAGG()takes a column or expression as its argument, and aggregates the result as a singleJSONarray. The expression can evaluate to any MySQL data type; this does not have to be aJSONvalue.JSON_OBJECTAGG()takes two columns or expressions which it interprets as a key and a value; it returns the result as a singleJSONobject. For more information and examples, see Section 12.20, “Aggregate (GROUP BY) Functions”. -
Added the JSON utility function
JSON_PRETTY(), which outputs an existingJSONvalue in an easy-to-read format; each JSON object member or array value is printed on a separate line, and a child object or array is intended 2 spaces with respect to its parent.This function also works with a string that can be parsed as a JSON value.
For more detailed information and examples, see Section 12.17.8, “JSON Utility Functions”.
-
When sorting
JSONvalues in a query usingORDER BY, each value is now represented by a variable-length part of the sort key, rather than a part of a fixed 1K in size. In many cases this can reduce excessive usage. For example, a scalarINTor evenBIGINTvalue actually requires very few bytes, so that the remainder of this space (up to 90% or more) was taken up by padding. This change has the following benefits for performance:-
Sort buffer space is now used more effectively, so that filesorts need not flush to disk as early or often as with fixed-length sort keys. This means that more data can be sorted in memory, avoiding unnecessary disk access.
-
Shorter keys can be compared more quickly than longer ones, providing a noticeable improvement in performance. This is true for sorts performed entirely in memory as well as for sorts that require writing to and reading from disk.
-
-
Added support in MySQL 8.0.2 for partial, in-place updates of
JSONcolumn values, which is more efficient than completely removing an existing JSON value and writing a new one in its place, as was done previously when updating anyJSONcolumn. For this optimization to be applied, the update must be applied usingJSON_SET(),JSON_REPLACE(), orJSON_REMOVE(). New elements cannot be added to the JSON document being updated; values within the document cannot take more space than they did before the update. See Partial Updates of JSON Values, for a detailed discussion of the requirements.Partial updates of JSON documents can be written to the binary log, taking up less space than logging complete JSON documents. Partial updates are always logged as such when statement-based replication is in use. For this to work with row-based replication, you must first set
binlog_row_value_options=PARTIAL_JSON; see this variable's description for more information. -
Added the JSON utility functions
JSON_STORAGE_SIZE()andJSON_STORAGE_FREE().JSON_STORAGE_SIZE()returns the storage space in bytes used for the binary representation of a JSON document prior to any partial update (see previous item).JSON_STORAGE_FREE()shows the amount of space remaining in a table column of typeJSONafter it has been partially updated usingJSON_SET()orJSON_REPLACE(); this is greater than zero if the binary representation of the new value is less than that of the previous value.Each of these functions also accepts a valid string representation of a JSON document. For such a value,
JSON_STORAGE_SIZE()returns the space used by its binary representation following its conversion to a JSON document. For a variable containing the string representation of a JSON document,JSON_STORAGE_FREE()returns zero. Either function produces an error if its (non-null) argument cannot be parsed as a valid JSON document, andNULLif the argument isNULL.For more information and examples, see Section 12.17.8, “JSON Utility Functions”.
JSON_STORAGE_SIZE()andJSON_STORAGE_FREE()were implemented in MySQL 8.0.2. -
Added support in MySQL 8.0.2 for ranges such as
$[1 to 5]in XPath expressions. Also added support in this version for thelastkeyword and relative addressing, such that$[last]always selects the last (highest-numbered) element in the array and$[last-1]the next to last element.lastand expressions using it can also be included in range definitions. For example,$[last-2 to last-1]returns the last two elements but one from an array. See Searching and Modifying JSON Values, for additional information and examples. -
Added a JSON merge function intended to conform to RFC 7396.
JSON_MERGE_PATCH(), when used on 2 JSON objects, merges them into a single JSON object that has as members a union of the following sets:-
Each member of the first object for which there is no member with the same key in the second object.
-
Each member of the second object for which there is no member having the same key in the first object, and whose value is not the JSON
nullliteral. -
Each member having a key that exists in both objects, and whose value in the second object is not the JSON
nullliteral.
As part of this work, the
JSON_MERGE()function has been renamedJSON_MERGE_PRESERVE().JSON_MERGE()continues to be recognized as an alias forJSON_MERGE_PRESERVE()in MySQL 8.0, but is now deprecated and is subject to removal in a future version of MySQL.For more information and examples, see Section 12.17.4, “Functions That Modify JSON Values”.
-
-
Implemented “last duplicate key wins” normalization of duplicate keys, consistent with RFC 7159 and most JavaScript parsers. An example of this behavior is shown here, where only the rightmost member having the key
xis preserved:mysql> SELECT
JSON_OBJECT('x', '32', 'y', '[true, false]',>'x', '"abc"', 'x', '100') AS Result;+------------------------------------+ | Result | +------------------------------------+ | {"x": "100", "y": "[true, false]"} | +------------------------------------+ 1 row in set (0.00 sec)Values inserted into MySQL
JSONcolumns are also normalized in this way, as shown in this example:mysql>
CREATE TABLE t1 (c1 JSON);mysql>INSERT INTO t1 VALUES ('{"x": 17, "x": "red", "x": [3, 5, 7]}');mysql>SELECT c1 FROM t1;+------------------+ | c1 | +------------------+ | {"x": [3, 5, 7]} | +------------------+This is an incompatible change from previous versions of MySQL, where a “first duplicate key wins” algorithm was used in such cases.
See Normalization, Merging, and Autowrapping of JSON Values, for more information and examples.
-
Added the
JSON_TABLE()function in MySQL 8.0.4. This function accepts JSON data and returns it as a relational table having the specified columns.This function has the syntax
JSON_TABLE(, whereexpr,pathCOLUMNScolumn_list) [AS]alias)expris an expression that returns JSON data,pathis a JSON path applied to the source, andcolumn_listis a list of column definitions. An example is shown here:mysql>
SELECT *->FROM->JSON_TABLE(->'[{"a":3,"b":"0"},{"a":"3","b":"1"},{"a":2,"b":1},{"a":0},{"b":[1,2]}]',->"$[*]" COLUMNS(->rowid FOR ORDINALITY,-> ->xa INT EXISTS PATH "$.a",->xb INT EXISTS PATH "$.b",-> ->sa VARCHAR(100) PATH "$.a",->sb VARCHAR(100) PATH "$.b",-> ->ja JSON PATH "$.a",->jb JSON PATH "$.b"->)->) AS jt1;+-------+------+------+------+------+------+--------+ | rowid | xa | xb | sa | sb | ja | jb | +-------+------+------+------+------+------+--------+ | 1 | 1 | 1 | 3 | 0 | 3 | "0" | | 2 | 1 | 1 | 3 | 1 | "3" | "1" | | 3 | 1 | 1 | 2 | 1 | 2 | 1 | | 4 | 1 | 0 | 0 | NULL | 0 | NULL | | 5 | 0 | 1 | NULL | NULL | NULL | [1, 2] | +-------+------+------+------+------+------+--------+The JSON source expression can be any expression that yields a valid JSON document, including a JSON literal, a table column, or a function call that returns JSON such as
JSON_EXTRACT(t1, data, '$.post.comments'). For more information, see Section 12.17.6, “JSON Table Functions”.
-
-
Data type support. MySQL now supports use of expressions as default values in data type specifications. This includes the use of expressions as default values for the
BLOB,TEXT,GEOMETRY, andJSONdata types, which previously could not be assigned default values at all. For details, see Section 11.6, “Data Type Default Values”. -
Optimizer. These optimizer enhancements were added:
-
MySQL now supports invisible indexes. An invisible index is not used by the optimizer at all, but is otherwise maintained normally. Indexes are visible by default. Invisible indexes make it possible to test the effect of removing an index on query performance, without making a destructive change that must be undone should the index turn out to be required. See Section 8.3.12, “Invisible Indexes”.
-
MySQL now supports descending indexes:
DESCin an index definition is no longer ignored but causes storage of key values in descending order. Previously, indexes could be scanned in reverse order but at a performance penalty. A descending index can be scanned in forward order, which is more efficient. Descending indexes also make it possible for the optimizer to use multiple-column indexes when the most efficient scan order mixes ascending order for some columns and descending order for others. See Section 8.3.13, “Descending Indexes”. -
MySQL now supports creation of functional index key parts that index expression values rather than column values. Functional key parts enable indexing of values that cannot be indexed otherwise, such as
JSONvalues. For details, see Section 13.1.15, “CREATE INDEX Statement”. -
In MySQL 8.0.14 and later, trivial
WHEREconditions arising from constant literal expressions are removed during preparation, rather than later on during optimization. Removal of the condition earlier in the process makes it possible to simplify joins for queries with outer joins having trivial conditions, such as this one:SELECT * FROM t1 LEFT JOIN t2 ON
condition_1WHEREcondition_2OR 0 = 1The optimizer now sees during preparation that 0 = 1 is always false, making
OR 0 = 1redundant, and removes it, leaving this:SELECT * FROM t1 LEFT JOIN t2 ON
condition_1wherecondition_2Now the optimizer can rewrite the query as an inner join, like this:
SELECT * FROM t1 LEFT JOIN t2 WHERE
condition_1ANDcondition_2For more information, see Section 8.2.1.9, “Outer Join Optimization”.
-
In MySQL 8.0.16 and later, MySQL can use constant folding at optimization time to handle comparisons between a column and a constant value where the constant is out of range or on a range boundary with respect to the type of the column, rather than doing so for each row at execution time. For example, given a table
twith aTINYINT UNSIGNEDcolumnc, the optimizer can rewrite a condition such asWHERE c < 256toWHERE 1(and optimize the condition away altogether), orWHERE c >= 255toWHERE c = 255.See Section 8.2.1.14, “Constant-Folding Optimization”, for more information.
-
Beginning with MySQL 8.0.16, the semijoin optimizations used with
INsubqueries can now be applied toEXISTSsubqueries as well. In addition, the optimizer now decorrelates trivially-correlated equality predicates in theWHEREcondition attached to the subquery, so that they can be treated similarly to expressions inINsubqueries; this applies to bothEXISTSandINsubqueries.For more information, see Section 8.2.2.1, “Optimizing IN and EXISTS Subquery Predicates with Semijoin Transformations”.
-
In MySQL 8.0.17 and later a
WHEREcondition havingNOT IN (orsubquery)NOT EXISTS (is transformed internally into an antijoin. (An antijoin returns all rows from the table for which there is no row in the table to which it is joined matching the join condition.) This removes the subquery which can result in faster query execution since the subquery's tables are now handled on the top level.subquery)This is similar to, and reuses, the existing
IS NULL(Not exists) optimization for outer joins; see EXPLAIN Extra Information.
-
-
Common table expressions. MySQL now supports common table expressions, both nonrecursive and recursive. Common table expressions enable use of named temporary result sets, implemented by permitting a
WITHclause precedingSELECTstatements and certain other statements. For more information, see Section 13.2.15, “WITH (Common Table Expressions)”.As of MySQL 8.0.19, the recursive
SELECTpart of a recursive common table expression (CTE) supports aLIMITclause.LIMITwithOFFSETis also supported. See Recursive Common Table Expressions, for more information. -
Window functions. MySQL now supports window functions that, for each row from a query, perform a calculation using rows related to that row. These include functions such as
RANK(),LAG(), andNTILE(). In addition, several existing aggregate functions now can be used as window functions (for example,SUM()andAVG()). For more information, see Section 12.21, “Window Functions”. -
Lateral derived tables. A derived table now may be preceded by the
LATERALkeyword to specify that it is permitted to refer to (depend on) columns of preceding tables in the sameFROMclause. Lateral derived tables make possible certain SQL operations that cannot be done with nonlateral derived tables or that require less-efficient workarounds. See Section 13.2.11.9, “Lateral Derived Tables”. -
Aliases in single-table DELETE statements. In MySQL 8.0.16 and later, single-table
DELETEstatements support the use of table aliases. -
Regular expression support. Previously, MySQL used the Henry Spencer regular expression library to support regular expression operators (
REGEXP,RLIKE). Regular expression support has been reimplemented using International Components for Unicode (ICU), which provides full Unicode support and is multibyte safe. TheREGEXP_LIKE()function performs regular expression matching in the manner of theREGEXPandRLIKEoperators, which now are synonyms for that function. In addition, theREGEXP_INSTR(),REGEXP_REPLACE(), andREGEXP_SUBSTR()functions are available to find match positions and perform substring substitution and extraction, respectively. Theregexp_stack_limitandregexp_time_limitsystem variables provide control over resource consumption by the match engine. For more information, see Section 12.7.2, “Regular Expressions”. For information about ways in which applications that use regular expressions may be affected by the implementation change, see Regular Expression Compatibility Considerations. -
Internal temporary tables. The
TempTablestorage engine replaces theMEMORYstorage engine as the default engine for in-memory internal temporary tables. TheTempTablestorage engine provides efficient storage forVARCHARandVARBINARYcolumns. Theinternal_tmp_mem_storage_enginesession variable defines the storage engine for in-memory internal temporary tables. Permitted values areTempTable(the default) andMEMORY. Thetemptable_max_ramvariable defines the maximum amount of memory that theTempTablestorage engine can use before data is stored to disk. -
Logging. Error logging was rewritten to use the MySQL component architecture. Traditional error logging is implemented using built-in components, and logging using the system log is implemented as a loadable component. In addition, a loadable JSON log writer is available. To control which log components to enable, use the
log_error_servicessystem variable. For more information, see Section 5.4.2, “The Error Log”. -
Backup lock. A new type of backup lock permits DML during an online backup while preventing operations that could result in an inconsistent snapshot. The new backup lock is supported by
LOCK INSTANCE FOR BACKUPandUNLOCK INSTANCEsyntax. TheBACKUP_ADMINprivilege is required to use these statements. -
Replication. The following enhancements have been made to MySQL Replication:
-
MySQL Replication now supports binary logging of partial updates to JSON documents using a compact binary format, saving space in the log over logging complete JSON documents. Such compact logging is done automatically when statement-based logging is in use, and can be enabled by setting the new
binlog_row_value_optionssystem variable toPARTIAL_JSON. For more information, see Partial Updates of JSON Values, as well as the description ofbinlog_row_value_options.
-
-
Connection management. MySQL Server now permits a TCP/IP port to be configured specifically for administrative connections. This provides an alternative to the single administrative connection that is permitted on the network interfaces used for ordinary connections even when
max_connectionsconnections are already established. See Section 8.12.4.1, “How MySQL Handles Client Connections”.MySQL now provides more control over the use of compression to minimize the number of bytes sent over connections to the server. Previously, a given connection was either uncompressed or used the
zlibcompression algorithm. Now, it is also possible to use thezstdalgorithm, and to select a compression level forzstdconnections. The permitted compression algorithms can be configured on the server side, as well as on the connection-origination side for connections by client programs and by servers participating in master/slave replication or Group Replication. For more information, see Section 4.2.6, “Connection Compression Control”. -
Configuration. The maximum permitted length of host names throughout MySQL has been raised to 255 ASCII characters, up from the previous limit of 60 characters. This applies to, for example, host name-related columns in the data dictionary,
mysqlsystem schema, Performance Schema,INFORMATION_SCHEMA, andsysschema; theMASTER_HOSTvalue for theCHANGE MASTER TOstatement; theHostcolumn inSHOW PROCESSLISTstatement output; host names in account names (such as used in account-management statements and inDEFINERattributes); and host name-related command options and system variables.Caveats:
-
The increase in permitted host name length can affect tables with indexes on host name columns. For example, tables in the
mysqlsystem schema that index host names now have an explicitROW_FORMATattribute ofDYNAMICto accommodate longer index values. -
Some file name-valued configuration settings might be constructed based on the server host name. The permitted values are constrained by the underlying operating system, which may not permit file names long enough to include 255-character host names. This affects the
general_log_file,log_error,pid_file,relay_log, andslow_query_log_filesystem variables and corresponding options. If host name-based values are too long for the OS, explicit shorter values must be provided. -
Although the server now supports 255-character host names, connections to the server established using the
--ssl-mode=VERIFY_IDENTITYoption are constrained by maximum host name length supported by OpenSSL. Host name matches pertain to two fields of SSL certificates, which have maximum lengths as follows: Common Name: maximum length 64; Subject Alternative Name: maximum length as per RFC#1034.
-
-
Plugins. Previously, MySQL plugins could be written in C or C++. MySQL header files used by plugins now contain C++ code, which means that plugins must be written in C++, not C.
-
C API. The MySQL C API now supports asynchronous functions for nonblocking communication with the MySQL server. Each function is the asynchronous counterpart to an existing synchronous function. The synchronous functions block if reads from or writes to the server connection must wait. The asynchronous functions enable an application to check whether work on the server connection is ready to proceed. If not, the application can perform other work before checking again later. See Section 28.7.11, “C API Asynchronous Interface”.
-
Additional target types for casts. The functions
CAST()andCONVERT()now support conversions to typesDOUBLE,FLOAT, andREAL. Added in MySQL 8.0.17. See Section 12.10, “Cast Functions and Operators”. -
JSON schema validation. MySQL 8.0.17 adds two functions
JSON_SCHEMA_VALID()andJSON_SCHEMA_VALIDATION_REPORT()for validating JSON documents again JSON schemas.JSON_SCHEMA_VALID()returns TRUE (1) if the document validates against the schema and FALSE (0) if it does not.JSON_SCHEMA_VALIDATION_REPORT()returns a JSON document containing detailed information about the results of the validation. The following statements apply to both of these functions:-
The schema must conform to Draft 4 of the JSON Schema specification.
-
requiredattributes are supported. -
External resources and the
$refkeyword are not supported. -
Regular expression patterns are supported; invalid patterns are silently ignored.
See Section 12.17.7, “JSON Schema Validation Functions”, for more information and examples.
-
-
Multi-valued indexes. Beginning with MySQL 8.0.17,
InnoDBsupports the creation of a multi-valued index, which is a secondary index defined on aJSONcolumn that stores an array of values and which can have multiple index records for a single data record. Such an index uses a key part definition such asCAST(data->'$.zipcode' AS UNSIGNED ARRAY). A multi-valued index is used automatically by the MySQL optimizer for suitable queries, as can be viewed in the output ofEXPLAIN.As part of this work, MySQL adds a new function
JSON_OVERLAPS()and a newMEMBER OF()operator for working withJSONdocuments, additionally extending theCAST()function with a newARRAYkeyword, as described in the following list:-
JSON_OVERLAPS()compares twoJSONdocuments. If they contain any key-value pairs or array elements in common, the function returns TRUE (1); otherwise it returns FALSE (0). If both values are scalars, the function performs a simple test for equality. If one argument is a JSON array and the other is a scalar, the scalar is treated as an array element. Thus,JSON_OVERLAPS()acts as a complement toJSON_CONTAINS(). -
MEMBER OF()tests whether the first operand (a scalar or JSON document) is a member of the JSON array passed as the second operand, returning TRUE (1) if it is, and FALSE (0) if it is not. No type conversion of the operand is performed. -
CAST(permits creation of a functional index by casting the JSON array found in a JSON document atexpressionAStypeARRAY)json_pathto an SQL array. Type specifiers are limited to those already supported byCAST(), with the exception ofBINARY(not supported). This usage ofCAST()(and theARRAYkeyword) is supported only byInnoDB, and only for the creation of a multi-valued index.
For detailed information about multi-valued indexes, including examples, see Multi-Valued Indexes. Section 12.17.3, “Functions That Search JSON Values”, provides information about
JSON_OVERLAPS()andMEMBER OF(), along with examples of use. -
-
Hintable time_zone. As of MySQL 8.0.17, the
time_zonesession variable is hintable usingSET_VAR. -
Redo Log Archiving. As of MySQL 8.0.17,
InnoDBsupports redo log archiving. Backup utilities that copy redo log records may sometimes fail to keep pace with redo log generation while a backup operation is in progress, resulting in lost redo log records due to those records being overwritten. The redo log archiving feature addresses this issue by sequentially writing redo log records to an archive file. Backup utilities can copy redo log records from the archive file as necessary, thereby avoiding the potential loss of data. For more information, see Redo Log Archiving. -
The Clone Plugin. As of MySQL 8.0.17, MySQL provides a clone plugin that permits cloning
InnoDBdata locally or from a remote MySQL server instance. A local cloning operation stores cloned data on the same server or node where the MySQL instance runs. A remote cloning operation transfers cloned data over the network from a donor MySQL server instance to the recipient server or node where the cloning operation was initiated.The clone plugin supports replication. In addition to cloning data, a cloning operation extracts and transfers replication coordinates from the donor and applies them on the recipient, which enables using the clone plugin for provisioning Group Replication members and replication slaves. Using the clone plugin for provisioning is considerably faster and more efficient than replicating a large number of transactions. Group Replication members can also be configured to use the clone plugin as an alternative method of recovery, so that members automatically choose the most efficient way to retrieve group data from seed members.
For more information, see Section 5.6.7, “The Clone Plugin”, and Section 18.4.3.1, “Cloning for Distributed Recovery”.
-
Hash Join Optimization. Beginning with MySQL 8.0.18, a hash join is used whenever each pair of tables in a join includes at least one equi-join condition. A hash join does not require indexes, and is more efficient in most cases than the block-nested loop algorithm. Joins such as those shown here can be optimized in this manner:
SELECT * FROM t1 JOIN t2 ON t1.c1=t2.c1; SELECT * FROM t1 JOIN t2 ON (t1.c1 = t2.c1 AND t1.c2 < t2.c2) JOIN t3 ON (t2.c1 = t3.c1)Hash joins can also be used for Cartesian products—that is, when no join condition is specified.
You can see when the hash join optimization is being used for a particular query using
EXPLAIN FORMAT=TREEorEXPLAIN ANALYZE.Use of hash joins can be controlled using the
optimizer_switchsystem variable'hash_joinflag (onby default) as well as theHASH_JOINandNO_HASH_JOINoptimizer hints.The amount of memory available to a hash join is limited by the value of
join_buffer_size. A hash join that requires more than this much memory is executed on disk; the number of disk files that can be used by an on-disk hash join is limited byopen_files_limit.For more information and examples, see Section 8.2.1.4, “Hash Join Optimization”.
As of MySQL 8.0.19, the
hash_joinoptimizer switch introduced in MySQL 8.0.18 no longer has any effect. This also applies to theHASH_JOINandNO_HASH_JOINoptimizer hints. The switch and the hint are both now deprecated and will be removed in a future MySQL release. -
EXPLAIN ANALYZE Statement. A new form of the
EXPLAINstatement,EXPLAIN ANALYZE, is implemented in MySQL 8.0.18, providing expanded information about the execution ofSELECTstatements inTREEformat for each iterator used in processing the query, and making it possible to compare estimated cost with the actual cost of the query. This information includes startup cost, total cost, number of rows returned by this iterator, and the number of loops executed.In MySQL 8.0.20 and later, this statement also supports a
FORMAT=TREEspecifier.TREEis the only supported format.See Obtaining Information with EXPLAIN ANALYZE, for more information.
-
Query cast injection. In version 8.0.18 and later, MySQL now injects cast operations into the query item tree inside expressions and conditions in which the data type of the argument and the expected data type do not match. This has no effect on query results or speed of execution, but makes the query as executed equivalent to one which is compliant with the SQL standard while maintaining backwards compatibility with previous releases of MySQL.
Such implicit casts are now performed between temporal types (
DATE,DATETIME,TIMESTAMP,TIME) and numeric types (SMALLINT,TINYINT,MEDIUMINT,INT/INTEGER,BIGINT;DECIMAL/NUMERIC;FLOAT,DOUBLE,REAL;BIT) whenever they are compared using any of the standard numeric comparison operators (=,>=,>,<,<=,<>/!=, or<=>). In this case, any value that is not already aDOUBLEis cast as one. Cast injection is also now performed for comparisons betweenDATEorTIMEvalues andDATETIMEvalues, where the arguments are cast whenever necessary asDATETIME.It is possible to see when casts are injected into a given query by viewing the output of
EXPLAIN ANALYZE,EXPLAIN FORMAT=JSON, or, as shown here,EXPLAIN FORMAT=TREE:mysql>
CREATE TABLE d (dt DATETIME, d DATE, t TIME);Query OK, 0 rows affected (0.62 sec) mysql>CREATE TABLE n (i INT, d DECIMAL, f FLOAT, dc DECIMAL);Query OK, 0 rows affected (0.51 sec) mysql>EXPLAIN FORMAT=TREE SELECT * from d JOIN n ON d.dt = n.i\G*************************** 1. row *************************** EXPLAIN: -> Inner hash join (cast(d.dt as double) = cast(n.i as double)) (cost=0.70 rows=1) -> Table scan on n (cost=0.35 rows=1) -> Hash -> Table scan on d (cost=0.35 rows=1)Such casts can also be seen by executing
EXPLAIN [FORMAT=TRADITIONAL], in which case it is also necessary to issueSHOW WARNINGSafterwards. -
Time zone support for TIMESTAMP and DATETIME. As of MySQL 8.0.19, the server accepts a time zone offset with inserted datetime (
TIMESTAMPandDATETIME) values. This offset uses the same format as that employed when setting thetime_zonesystem variable, except that a leading zero is required when the hours portion of the offset is less than 10, and'-00:00'is not allowed. Examples of datetime literals that include time zone offsets are'2019-12-11 10:40:30-05:00','2003-04-14 03:30:00+10:00', and'2020-01-01 15:35:45+05:30'.Time zone offsets are not displayed when selecting datetime values.
Datetime literals incorporating time zone offsets can be used as prepared statement parameter values.
As part of this work, the value used to set the
time_zonesystem variable is now also restricted to the range-14:00to+14:00, inclusive. (It remains possible to assign name values totime_zonesuch as'EST','Posix/Australia/Brisbane', and'Europe/Stockholm'to this variable, provided that the MySQL time zone tables are loaded; see Populating the Time Zone Tables).For more information and examples, see Section 5.1.13, “MySQL Server Time Zone Support”, as well as Section 11.2.2, “The DATE, DATETIME, and TIMESTAMP Types”.
-
Precise information for JSON schema CHECK constraint failures. When using
JSON_SCHEMA_VALID()to specify aCHECKconstraint, MySQL 8.0.19 and later provides precise information about the reasons for failures of such constraints.For examples and more information, see JSON_SCHEMA_VALID() and CHECK constraints. See also Section 13.1.20.7, “CHECK Constraints”.
-
Row and column aliases with ON DUPLICATE KEY UPDATE. Beginning with MySQL 8.0.19, it is possible to reference the row to be inserted, and, optionally, its columns, using aliases. Consider the following
INSERTstatement on a tablethaving columnsaandb:INSERT INTO t SET a=9,b=5 ON DUPLICATE KEY UPDATE a=VALUES(a)+VALUES(b);Using the alias
newfor the new row, and, in some cases, the aliasesmandnfor this row's columns, theINSERTstatement can be rewritten in many different ways, some examples of which are shown here:INSERT INTO t SET a=9,b=5 AS new ON DUPLICATE KEY UPDATE a=new.a+new.b; INSERT INTO t VALUES(9,5) AS new ON DUPLICATE KEY UPDATE a=new.a+new.b; INSERT INTO t SET a=9,b=5 AS new(m,n) ON DUPLICATE KEY UPDATE a=m+n; INSERT INTO t VALUES(9,5) AS new(m,n) ON DUPLICATE KEY UPDATE a=m+n;For more information and examples, see Section 13.2.6.2, “INSERT ... ON DUPLICATE KEY UPDATE Statement”.
-
SQL standard explicit table clause and table value constructor. Added table value constructors and explicit table clauses according to the SQL standard. These are implemented in MySQL 8.0.19, respectively, as the
TABLEstatement and theVALUESstatement.The
TABLEstatement has the formatTABLE, and is equivalent totable_nameSELECT * FROM. It supportstable_nameORDER BYandLIMITclauses ( the latter with optionalOFFSET), but does not allow for the selection of individual table columns.TABLEcan be used anywhere that you would employ the equivalentSELECTstatement; this includes joins, unions,INSERT ... SELECT,REPLACE,CREATE TABLE ... SELECTstatements, and subqueries. For example:-
TABLE t1 UNION TABLE t2is equivalent toSELECT * FROM t1 UNION SELECT * FROM t2 -
CREATE TABLE t2 TABLE t1is equivalent toCREATE TABLE t2 SELECT * FROM t1 -
SELECT a FROM t1 WHERE b > ANY (TABLE t2)is equivalent toSELECT a FROM t1 WHERE b > ANY (SELECT * FROM t2).
VALUEScan be used to supply a table value to anINSERT,REPLACE, orSELECTstatement, and consists of theVALUESkeyword followed by a series of row constructors (ROW()) separated by commas. For example, the statementINSERT INTO t1 VALUES ROW(1,2,3), ROW(4,5,6), ROW(7,8,9)provides an SQL-compliant equivalent to the MySQL-specificINSERT INTO t1 VALUES (1,2,3), (4,5,6), (7,8,9). You can also select from aVALUEStable value constructor just as you would a table, bearing in mind that you must supply a table alias when doing so, and use thisSELECTjust as you would any other; this includes joins, unions, and subqueries.For more information about
TABLEandVALUES, and for examples of their use, see the following sections of this documentation: -
-
Optimizer hints for FORCE INDEX, IGNORE INDEX. MySQL 8.0 introduces index-level optimizer hints which serve as analogs to the traditional index hints as described in Section 8.9.4, “Index Hints”. The new hints are listed here, along with their
FORCE INDEXorIGNORE INDEXequivalents:-
GROUP_INDEX: Equivalent toFORCE INDEX FOR GROUP BYNO_GROUP_INDEX: Equivalent toIGNORE INDEX FOR GROUP BY -
JOIN_INDEX: Equivalent toFORCE INDEX FOR JOINNO_JOIN_INDEX: Equivalent toIGNORE INDEX FOR JOIN -
ORDER_INDEX: Equivalent toFORCE INDEX FOR ORDER BYNO_ORDER_INDEX: Equivalent toIGNORE INDEX FOR ORDER BY -
INDEX: Same asGROUP_INDEXplusJOIN_INDEXplusORDER_INDEX; equivalent toFORCE INDEXwith no modifierNO_INDEX: Same asNO_GROUP_INDEXplusNO_JOIN_INDEXplusNO_ORDER_INDEX; equivalent toIGNORE INDEXwith no modifier
For example, the following two queries are equivalent:
SELECT a FROM t1 FORCE INDEX (i_a) FOR JOIN WHERE a=1 AND b=2; SELECT /*+ JOIN_INDEX(t1 i_a) */ a FROM t1 WHERE a=1 AND b=2;
The optimizer hints listed previously follow the same basic rules for syntax and usage as existing index-level optimizer hints.
These optimizer hints are intended to replace
FORCE INDEXandIGNORE INDEX, which we plan to deprecate in a future MySQL release, and subsequently to remove from MySQL. They do not implement a single exact equivalent forUSE INDEX; instead, you can employ one or more ofNO_INDEX,NO_JOIN_INDEX,NO_GROUP_INDEX, orNO_ORDER_INDEXto achieve the same effect.For further information and examples of use, see Index-Level Optimizer Hints.
-
The following features are deprecated in MySQL 8.0 and may be or will be removed in a future series. Where alternatives are shown, applications should be updated to use them.
For applications that use features deprecated in MySQL 8.0 that have been removed in a higher MySQL series, statements may fail when replicated from a MySQL 8.0 master to a higher-series slave, or may have different effects on master and slave. To avoid such problems, applications that use features deprecated in 8.0 should be revised to avoid them and use alternatives when possible.
-
The
utf8mb3character set is deprecated. Please useutf8mb4instead. -
Because
caching_sha2_passwordis the default authentication plugin in MySQL 8.0 and provides a superset of the capabilities of thesha256_passwordauthentication plugin,sha256_passwordis deprecated and will be removed in a future MySQL version. MySQL accounts that authenticate usingsha256_passwordshould be migrated to usecaching_sha2_passwordinstead. -
The
validate_passwordplugin has been reimplemented to use the server component infrastructure. The plugin form ofvalidate_passwordis still available but is deprecated and will be removed in a future version of MySQL. MySQL installations that use the plugin should make the transition to using the component instead. See Section 6.4.3.3, “Transitioning to the Password Validation Component”. -
The
ENGINEclause for theALTER TABLESPACEandDROP TABLESPACEstatements is deprecated. -
The
PAD_CHAR_TO_FULL_LENGTHSQL mode is deprecated. -
AUTO_INCREMENTsupport is deprecated for columns of typeFLOATandDOUBLE(and any synonyms). Consider removing theAUTO_INCREMENTattribute from such columns, or convert them to an integer type. -
The
UNSIGNEDattribute is deprecated for columns of typeFLOAT,DOUBLE, andDECIMAL(and any synonyms). Consider using a simpleCHECKconstraint instead for such columns. -
FLOAT(andM,D)DOUBLE(syntax to specify the number of digits for columns of typeM,D)FLOATandDOUBLE(and any synonyms) is a nonstandard MySQL extension. This syntax is deprecated. -
The
ZEROFILLattribute is deprecated for numeric data types, as is the display width attribute for integer data types. Consider using an alternative means of producing the effect of these attributes. For example, applications could use theLPAD()function to zero-pad numbers up to the desired width, or they could store the formatted numbers inCHARcolumns. -
For string data types, the
BINARYattribute is a nonstandard MySQL extension that is shorthand for specifying the binary (_bin) collation of the column character set (or of the table default character set if no column character set is specified). In MySQL 8.0, this nonstandard use ofBINARYis ambiguous because theutf8mb4character set has multiple_bincollations, so theBINARYattribute is deprecated and support for it will be removed in a future MySQL version. Applications should be adjusted to use an explicit_bincollation instead.The use of
BINARYto specify a data type or character set remains unchanged. -
The nonstandard C-style
&&,||, and!operators that are synonyms for the standard SQLAND,OR, andNOToperators, respectively, are deprecated. Applications that use the nonstandard operators should be adjusted to use the standard operators.NoteUse of
||is deprecated unless thePIPES_AS_CONCATSQL mode is enabled. In that case,||signifies the SQL-standard string concatenation operator). -
The
JSON_MERGE()function is deprecated. UseJSON_MERGE_PRESERVE()instead. -
The
SQL_CALC_FOUND_ROWSquery modifier and accompanyingFOUND_ROWS()function are deprecated. See theFOUND_ROWS()description for information about an alternative strategy. -
Support for
TABLESPACE = innodb_file_per_tableandTABLESPACE = innodb_temporaryclauses withCREATE TEMPORARY TABLEis deprecated as of MySQL 8.0.13. -
For
SELECTstatements, use of anINTOclause afterFROMbut not at the end of theSELECTis deprecated as of MySQL 8.0.20. It is preferred to place theINTOat the end of the statement.For
UNIONstatements, these two variants containingINTOare deprecated as of MySQL 8.0.20:-
In the trailing query block of a query expression, use of
INTObeforeFROM. -
In a parenthesized trailing block of a query expression, use of
INTO, regardless of its position relative toFROM.
See Section 13.2.10.1, “SELECT ... INTO Statement”, and Section 13.2.10.3, “UNION Clause”.
-
-
The mysql_upgrade client is deprecated because its capabilities for upgrading the system tables in the
mysqlsystem schema and objects in other schemas have been moved into the MySQL server. See Section 2.11.3, “What the MySQL Upgrade Process Upgrades”. -
The
--no-dd-upgradeserver option is deprecated. It is superseded by the--upgradeoption, which provides finer control over data dictionary and server upgrade behavior. -
The
mysql_upgrade_infofile, which is created data directory and used to store the MySQL version number, is deprecated and will be removed in a future MySQL version. -
The
relay_log_info_filesystem variable and--master-info-fileoption are deprecated. Previously, these were used to specify the name of the relay log info log and master info log whenrelay_log_info_repository=FILEandmaster_info_repository=FILEwere set, but those settings have been deprecated. The use of files for the relay log info log and master info log has been superseded by crash-safe slave tables, which are the default in MySQL 8.0. -
The
max_length_for_sort_datasystem variable is now deprecated due to optimizer changes that make it obsolete and of no effect. -
These legacy parameters for compression of connections to the server are deprecated: The
--compressclient command-line option; theMYSQL_OPT_COMPRESSoption for themysql_options()C API function; theslave_compressed_protocolsystem variable. For information about parameters to use instead, see Section 4.2.6, “Connection Compression Control”. -
Use of the
MYSQL_PWDenvironment variable to specify a MySQL password is deprecated. -
Use of
VALUES()to access new row values inINSERT ... ON DUPLICATE KEY UPDATEis deprecated as of MySQL 8.0.20. Use aliases for the new row and columns, instead. -
Because specifying
ON ERRORbeforeON EMPTYwhen invokingJSON_TABLE()is counter to the SQL standard, this syntax is now deprecated in MySQL. Beginning with MySQL 8.0.20, the server prints a warning whenever you attempt to do so. When specifying both of these clauses in a singleJSON_TABLE()invocation, make sure thatON EMPTYis used first.
The following items are obsolete and have been removed in MySQL 8.0. Where alternatives are shown, applications should be updated to use them.
For MySQL 5.7 applications that use features removed in MySQL 8.0, statements may fail when replicated from a MySQL 5.7 master to a MySQL 8.0 slave, or may have different effects on master and slave. To avoid such problems, applications that use features removed in MySQL 8.0 should be revised to avoid them and use alternatives when possible.
-
The
innodb_locks_unsafe_for_binlogsystem variable was removed. TheREAD COMMITTEDisolation level provides similar functionality. -
The
information_schema_statsvariable, introduced in MySQL 8.0.0, was removed and replaced byinformation_schema_stats_expiryin MySQL 8.0.3.information_schema_stats_expirydefines an expiration setting for cachedINFORMATION_SCHEMAtable statistics. For more information, see Section 8.2.3, “Optimizing INFORMATION_SCHEMA Queries”. -
Code related to obsoleted
InnoDBsystem tables was removed in MySQL 8.0.3.INFORMATION_SCHEMAviews based onInnoDBsystem tables were replaced by internal system views on data dictionary tables. AffectedInnoDBINFORMATION_SCHEMAviews were renamed:Table 1.1 Renamed InnoDB Information Schema Views
Old Name New Name INNODB_SYS_COLUMNSINNODB_COLUMNSINNODB_SYS_DATAFILESINNODB_DATAFILESINNODB_SYS_FIELDSINNODB_FIELDSINNODB_SYS_FOREIGNINNODB_FOREIGNINNODB_SYS_FOREIGN_COLSINNODB_FOREIGN_COLSINNODB_SYS_INDEXESINNODB_INDEXESINNODB_SYS_TABLESINNODB_TABLESINNODB_SYS_TABLESPACESINNODB_TABLESPACESINNODB_SYS_TABLESTATSINNODB_TABLESTATSINNODB_SYS_VIRTUALINNODB_VIRTUAL
After upgrading to MySQL 8.0.3 or later, update any scripts that reference previous
InnoDBINFORMATION_SCHEMAview names. -
The following features related to account management are removed:
-
Using
GRANTto create users. Instead, useCREATE USER. Following this practice makes theNO_AUTO_CREATE_USERSQL mode immaterial forGRANTstatements, so it too is removed, and an error now is written to the server log when the presence of this value for thesql_modeoption in the options file prevents mysqld from starting. -
Using
GRANTto modify account properties other than privilege assignments. This includes authentication, SSL, and resource-limit properties. Instead, establish such properties at account-creation time withCREATE USERor modify them afterward withALTER USER. -
IDENTIFIED BY PASSWORD 'syntax forauth_string'CREATE USERandGRANT. Instead, useIDENTIFIED WITHforauth_pluginAS 'auth_string'CREATE USERandALTER USER, where the'value is in a format compatible with the named plugin.auth_string'Additionally, because
IDENTIFIED BY PASSWORDsyntax was removed, thelog_builtin_as_identified_by_passwordsystem variable is superfluous and was removed. -
The
PASSWORD()function. Additionally,PASSWORD()removal means thatSET PASSWORD ... = PASSWORD('syntax is no longer available.auth_string') -
The
old_passwordssystem variable.
-
-
The query cache was removed. Removal includes these items:
-
The
FLUSH QUERY CACHEandRESET QUERY CACHEstatements. -
These system variables:
query_cache_limit,query_cache_min_res_unit,query_cache_size,query_cache_type,query_cache_wlock_invalidate. -
These status variables:
Qcache_free_blocks,Qcache_free_memory,Qcache_hits,Qcache_inserts,Qcache_lowmem_prunes,Qcache_not_cached,Qcache_queries_in_cache,Qcache_total_blocks. -
These thread states:
checking privileges on cached query,checking query cache for query,invalidating query cache entries,sending cached result to client,storing result in query cache,Waiting for query cache lock. -
The
SQL_CACHESELECTmodifier.
These deprecated query cache items remain deprecated, but have no effect, and will be removed in a future MySQL release:
-
SQL_NO_CACHESELECTmodifier. -
The
ndb_cache_check_timesystem variable.
The
have_query_cachesystem variable remains deprecated, always has a value ofNO, and will be removed in a future MySQL release. -
-
The data dictionary provides information about database objects, so the server no longer checks directory names in the data directory to find databases. Consequently, the
--ignore-db-diroption andignore_db_dirssystem variables are extraneous and are removed. -
The
tx_isolationandtx_read_onlysystem variables have been removed. Usetransaction_isolationandtransaction_read_onlyinstead. -
The
sync_frmsystem variable has been removed because.frmfiles have become obsolete. -
The
secure_authsystem variable and--secure-authclient option have been removed. TheMYSQL_SECURE_AUTHoption for themysql_options()C API function was removed. -
The
multi_range_countsystem variable is removed. -
The
log_warningssystem variable and--log-warningsserver option have been removed. Use thelog_error_verbositysystem variable instead. -
The global scope for the
sql_log_binsystem variable was removed.sql_log_binhas session scope only, and applications that rely on accessing@@GLOBAL.sql_log_binshould be adjusted. -
The
metadata_locks_cache_sizeandmetadata_locks_hash_instancessystem variables are removed. -
The unused
date_format,datetime_format,time_format, andmax_tmp_tablessystem variables are removed. -
These deprecated compatibility SQL modes are removed:
DB2,MAXDB,MSSQL,MYSQL323,MYSQL40,ORACLE,POSTGRESQL,NO_FIELD_OPTIONS,NO_KEY_OPTIONS,NO_TABLE_OPTIONS. They can no longer be assigned to thesql_modesystem variable or used as permitted values for the mysqldump--compatibleoption.Removal of
MAXDBmeans that theTIMESTAMPdata type forCREATE TABLEorALTER TABLEis treated asTIMESTAMP, and is no longer treated asDATETIME. -
The deprecated
ASCorDESCqualifiers forGROUP BYclauses are removed. Queries that previously relied onGROUP BYsorting may produce results that differ from previous MySQL versions. To produce a given sort order, provide anORDER BYclause. -
The
EXTENDEDandPARTITIONSkeywords for theEXPLAINstatement have been removed. These keywords are unnecessary because their effect is always enabled. -
These encryption-related items are removed:
-
The
ENCODE()andDECODE()functions. -
The
ENCRYPT()function. -
The
DES_ENCRYPT(), andDES_DECRYPT()functions, the--des-key-fileoption, thehave_cryptsystem variable, theDES_KEY_FILEoption for theFLUSHstatement, and theHAVE_CRYPTCMake option.
In place of the removed encryption functions: For
ENCRYPT(), consider usingSHA2()instead for one-way hashing. For the others, consider usingAES_ENCRYPT()andAES_DECRYPT()instead. -
-
In MySQL 5.7, several spatial functions available under multiple names were deprecated to move in the direction of making the spatial function namespace more consistent, the goal being that each spatial function name begin with
ST_if it performs an exact operation, or withMBRif it performs an operation based on minimum bounding rectangles. In MySQL 8.0, the deprecated functions are removed to leave only the correspondingST_andMBRfunctions:-
These functions are removed in favor of the
MBRnames:Contains(),Disjoint(),Equals(),Intersects(),Overlaps(),Within(). -
These functions are removed in favor of the
ST_names:Area(),AsBinary(),AsText(),AsWKB(),AsWKT(),Buffer(),Centroid(),ConvexHull(),Crosses(),Dimension(),Distance(),EndPoint(),Envelope(),ExteriorRing(),GeomCollFromText(),GeomCollFromWKB(),GeomFromText(),GeomFromWKB(),GeometryCollectionFromText(),GeometryCollectionFromWKB(),GeometryFromText(),GeometryFromWKB(),GeometryN(),GeometryType(),InteriorRingN(),IsClosed(),IsEmpty(),IsSimple(),LineFromText(),LineFromWKB(),LineStringFromText(),LineStringFromWKB(),MLineFromText(),MLineFromWKB(),MPointFromText(),MPointFromWKB(),MPolyFromText(),MPolyFromWKB(),MultiLineStringFromText(),MultiLineStringFromWKB(),MultiPointFromText(),MultiPointFromWKB(),MultiPolygonFromText(),MultiPolygonFromWKB(),NumGeometries(),NumInteriorRings(),NumPoints(),PointFromText(),PointFromWKB(),PointN(),PolyFromText(),PolyFromWKB(),PolygonFromText(),PolygonFromWKB(),SRID(),StartPoint(),Touches(),X(),Y(). -
GLength()is removed in favor ofST_Length().
-
-
The functions described in Section 12.16.4, “Functions That Create Geometry Values from WKB Values” previously accepted either WKB strings or geometry arguments. Geometry arguments are no longer permitted and produce an error. See that section for guidelines for migrating queries away from using geometry arguments.
-
The parser no longer treats
\Nas a synonym forNULLin SQL statements. UseNULLinstead.This change does not affect text file import or export operations performed with
LOAD DATAorSELECT ... INTO OUTFILE, for whichNULLcontinues to be represented by\N. See Section 13.2.7, “LOAD DATA Statement”. -
PROCEDURE ANALYSE()syntax is removed. -
The client-side
--ssland--ssl-verify-server-certoptions have been removed. Use--ssl-mode=REQUIREDinstead of--ssl=1or--enable-ssl. Use--ssl-mode=DISABLEDinstead of--ssl=0,--skip-ssl, or--disable-ssl. Use--ssl-mode=VERIFY_IDENTITYinstead of--ssl-verify-server-certoptions. (The server-side--ssloption remains unchanged.)For the C API,
MYSQL_OPT_SSL_ENFORCEandMYSQL_OPT_SSL_VERIFY_SERVER_CERToptions formysql_options()correspond to the client-side--ssland--ssl-verify-server-certoptions and are removed. UseMYSQL_OPT_SSL_MODEwith an option value ofSSL_MODE_REQUIREDorSSL_MODE_VERIFY_IDENTITYinstead. -
The
--temp-poolserver option was removed. -
The
ignore_builtin_innodbsystem variable is removed. -
The server no longer performs conversion of pre-MySQL 5.1 database names containing special characters to 5.1 format with the addition of a
#mysql50#prefix. Because these conversions are no longer performed, the--fix-db-namesand--fix-table-namesoptions for mysqlcheck, theUPGRADE DATA DIRECTORY NAMEclause for theALTER DATABASEstatement, and theCom_alter_db_upgradestatus variable are removed.Upgrades are supported only from one major version to another (for example, 5.0 to 5.1, or 5.1 to 5.5), so there should be little remaining need for conversion of older 5.0 database names to current versions of MySQL. As a workaround, upgrade a MySQL 5.0 installation to MySQL 5.1 before upgrading to a more recent release.
-
The mysql_install_db program has been removed from MySQL distributions. Data directory initialization should be performed by invoking mysqld with the
--initializeor--initialize-insecureoption instead. In addition, the--bootstrapoption for mysqld that was used by mysql_install_db was removed, and theINSTALL_SCRIPTDIRCMakeoption that controlled the installation location for mysql_install_db was removed. -
The generic partitioning handler was removed from the MySQL server. In order to support partitioning of a given table, the storage engine used for the table must now provide its own (“native”) partitioning handler. The
--partitionand--skip-partitionoptions are removed from the MySQL Server, and partitioning-related entries are no longer shown in the output ofSHOW PLUGINSor in theINFORMATION_SCHEMA.PLUGINStable.Two MySQL storage engines currently provide native partitioning support:
InnoDBandNDB. Of these, onlyInnoDBis supported in MySQL 8.0. Any attempt to create partitioned tables in MySQL 8.0 using any other storage engine fails.Ramifications for upgrades. The direct upgrade of a partitioned table using a storage engine other than
InnoDB(such asMyISAM) from MySQL 5.7 (or earlier) to MySQL 8.0 is not supported. There are two options for handling such a table:-
Remove the table's partitioning, using
ALTER TABLE ... REMOVE PARTITIONING. -
Change the storage engine used for the table to
InnoDB, withALTER TABLE ... ENGINE=INNODB.
At least one of the two operations just listed must be performed for each partitioned non-
InnoDBtable prior to upgrading the server to MySQL 8.0. Otherwise, such a table cannot be used following the upgrade.Due to the fact that table creation statements that would result in a partitioned table using a storage engine without partitioning support now fail with an error (ER_CHECK_NOT_IMPLEMENTED), you must make sure that any statements in a dump file (such as that written by mysqldump) from an older version of MySQL that you wish to import into a MySQL 8.0 server that create partitioned tables do not also specify a storage engine such as
MyISAMthat has no native partitioning handler. You can do this by performing either of the following:-
Remove any references to partitioning from
CREATE TABLEstatements that use a value for theSTORAGE ENGINEoption other thanInnoDB. -
Specifying the storage engine as
InnoDB, or allowInnoDBto be used as the table's storage engine by default.
For more information, see Section 23.6.2, “Partitioning Limitations Relating to Storage Engines”.
-
-
System and status variable information is no longer maintained in the
INFORMATION_SCHEMA. These tables are removed:GLOBAL_VARIABLES,SESSION_VARIABLES,GLOBAL_STATUS,SESSION_STATUS. Use the corresponding Performance Schema tables instead. See Section 26.12.13, “Performance Schema System Variable Tables”, and Section 26.12.14, “Performance Schema Status Variable Tables”. In addition, theshow_compatibility_56system variable was removed. It was used in the transition period during which system and status variable information inINFORMATION_SCHEMAtables was moved to Performance Schema tables, and is no longer needed. These status variables are removed:Slave_heartbeat_period,Slave_last_heartbeat,Slave_received_heartbeats,Slave_retried_transactions,Slave_running. The information they provided is available in Performance Schema tables; see Migrating to Performance Schema System and Status Variable Tables. -
The Performance Schema
setup_timerstable was removed, as was theTICKrow in theperformance_timerstable. -
The
libmysqldembedded server library is removed, along with:-
The
mysql_options()MYSQL_OPT_GUESS_CONNECTION,MYSQL_OPT_USE_EMBEDDED_CONNECTION,MYSQL_OPT_USE_REMOTE_CONNECTION, andMYSQL_SET_CLIENT_IPoptions -
The mysql_config
--libmysqld-libs,--embedded-libs, and--embeddedoptions -
The CMake
WITH_EMBEDDED_SERVER,WITH_EMBEDDED_SHARED_LIBRARY, andINSTALL_SECURE_FILE_PRIV_EMBEDDEDDIRoptions -
The (undocumented) mysql
--server-argoption -
The mysqltest
--embedded-server,--server-arg, and--server-fileoptions -
The mysqltest_embedded and mysql_client_test_embedded test programs
-
-
The mysql_plugin utility was removed. Alternatives include loading plugins at server startup using the
--plugin-loador--plugin-load-addoption, or at runtime using theINSTALL PLUGINstatement. -
The resolveip utility is removed. nslookup, host, or dig can be used instead.
-
The resolve_stack_dump utility is removed. Stack traces from official MySQL builds are always symbolized, so there is no need to use resolve_stack_dump.
-
The following server error codes are not used and have been removed. Applications that test specifically for any of these errors should be updated.
ER_BINLOG_READ_EVENT_CHECKSUM_FAILURE ER_BINLOG_ROW_RBR_TO_SBR ER_BINLOG_ROW_WRONG_TABLE_DEF ER_CANT_ACTIVATE_LOG ER_CANT_CHANGE_GTID_NEXT_IN_TRANSACTION ER_CANT_CREATE_FEDERATED_TABLE ER_CANT_CREATE_SROUTINE ER_CANT_DELETE_FILE ER_CANT_GET_WD ER_CANT_SET_GTID_PURGED_WHEN_GTID_MODE_IS_OFF ER_CANT_SET_WD ER_CANT_WRITE_LOCK_LOG_TABLE ER_CREATE_DB_WITH_READ_LOCK ER_CYCLIC_REFERENCE ER_DB_DROP_DELETE ER_DELAYED_NOT_SUPPORTED ER_DIFF_GROUPS_PROC ER_DISK_FULL ER_DROP_DB_WITH_READ_LOCK ER_DROP_USER ER_DUMP_NOT_IMPLEMENTED ER_ERROR_DURING_CHECKPOINT ER_ERROR_ON_CLOSE ER_EVENTS_DB_ERROR ER_EVENT_CANNOT_DELETE ER_EVENT_CANT_ALTER ER_EVENT_COMPILE_ERROR ER_EVENT_DATA_TOO_LONG ER_EVENT_DROP_FAILED ER_EVENT_MODIFY_QUEUE_ERROR ER_EVENT_NEITHER_M_EXPR_NOR_M_AT ER_EVENT_OPEN_TABLE_FAILED ER_EVENT_STORE_FAILED ER_EXEC_STMT_WITH_OPEN_CURSOR ER_FAILED_ROUTINE_BREAK_BINLOG ER_FLUSH_MASTER_BINLOG_CLOSED ER_FORM_NOT_FOUND ER_FOUND_GTID_EVENT_WHEN_GTID_MODE_IS_OFF__UNUSED ER_FRM_UNKNOWN_TYPE ER_GOT_SIGNAL ER_GRANT_PLUGIN_USER_EXISTS ER_GTID_MODE_REQUIRES_BINLOG ER_GTID_NEXT_IS_NOT_IN_GTID_NEXT_LIST ER_HASHCHK ER_INDEX_REBUILD ER_INNODB_NO_FT_USES_PARSER ER_LIST_OF_FIELDS_ONLY_IN_HASH_ERROR ER_LOAD_DATA_INVALID_COLUMN_UNUSED ER_LOGGING_PROHIBIT_CHANGING_OF ER_MALFORMED_DEFINER ER_MASTER_KEY_ROTATION_ERROR_BY_SE ER_NDB_CANT_SWITCH_BINLOG_FORMAT ER_NEVER_USED ER_NISAMCHK ER_NO_CONST_EXPR_IN_RANGE_OR_LIST_ERROR ER_NO_FILE_MAPPING ER_NO_GROUP_FOR_PROC ER_NO_RAID_COMPILED ER_NO_SUCH_KEY_VALUE ER_NO_SUCH_PARTITION__UNUSED ER_OBSOLETE_CANNOT_LOAD_FROM_TABLE ER_OBSOLETE_COL_COUNT_DOESNT_MATCH_CORRUPTED ER_ORDER_WITH_PROC ER_PARTITION_SUBPARTITION_ERROR ER_PARTITION_SUBPART_MIX_ERROR ER_PART_STATE_ERROR ER_PASSWD_LENGTH ER_QUERY_ON_MASTER ER_RBR_NOT_AVAILABLE ER_SKIPPING_LOGGED_TRANSACTION ER_SLAVE_CHANNEL_DELETE ER_SLAVE_MULTIPLE_CHANNELS_HOST_PORT ER_SLAVE_MUST_STOP ER_SLAVE_WAS_NOT_RUNNING ER_SLAVE_WAS_RUNNING ER_SP_GOTO_IN_HNDLR ER_SP_PROC_TABLE_CORRUPT ER_SQL_MODE_NO_EFFECT ER_SR_INVALID_CREATION_CTX ER_TABLE_NEEDS_UPG_PART ER_TOO_MUCH_AUTO_TIMESTAMP_COLS ER_UNEXPECTED_EOF ER_UNION_TABLES_IN_DIFFERENT_DIR ER_UNSUPPORTED_BY_REPLICATION_THREAD ER_UNUSED1 ER_UNUSED2 ER_UNUSED3 ER_UNUSED4 ER_UNUSED5 ER_UNUSED6 ER_VIEW_SELECT_DERIVED_UNUSED ER_WRONG_MAGIC ER_WSAS_FAILED
-
The deprecated
INFORMATION_SCHEMAINNODB_LOCKSandINNODB_LOCK_WAITStables are removed. Use the Performance Schemadata_locksanddata_lock_waitstables instead.NoteIn MySQL 5.7, the
LOCK_TABLEcolumn in theINNODB_LOCKStable and thelocked_tablecolumn in thesysschemainnodb_lock_waitsandx$innodb_lock_waitsviews contain combined schema/table name values. In MySQL 8.0, thedata_lockstable and thesysschema views contain separate schema name and table name columns. See Section 27.4.3.9, “The innodb_lock_waits and x$innodb_lock_waits Views”. -
InnoDBno longer supports compressed temporary tables. Wheninnodb_strict_modeis enabled (the default),CREATE TEMPORARY TABLEreturns an error ifROW_FORMAT=COMPRESSEDorKEY_BLOCK_SIZEis specified. Ifinnodb_strict_modeis disabled, warnings are issued and the temporary table is created using a non-compressed row format. -
InnoDBno longer creates.islfiles (InnoDBSymbolic Link files) when creating tablespace data files outside of the MySQL data directory. Theinnodb_directoriesoption now supports locating tablespace files created outside of the data directory.With this change, moving a remote tablespace while the server is offline by manually modifying an
.islfile is no longer supported. Moving remote tablespace files is now supported by theinnodb_directoriesoption. See Section 15.6.3.6, “Moving Tablespace Files While the Server is Offline”. -
The following
InnoDBfile format variables were removed:File format variables were necessary for creating tables compatible with earlier versions of
InnoDBin MySQL 5.1. Now that MySQL 5.1 has reached the end of its product lifecycle, these options are no longer required.The
FILE_FORMATcolumn was removed from theINNODB_TABLESandINNODB_TABLESPACESInformation Schema tables. -
The
innodb_support_xasystem variable, which enables support for two-phase commit in XA transactions, was removed.InnoDBsupport for two-phase commit in XA transactions is always enabled. -
Support for DTrace was removed.
-
The
JSON_APPEND()function was removed. UseJSON_ARRAY_APPEND()instead. -
Support for placing table partitions in shared
InnoDBtablespaces was removed in MySQL 8.0.13. Shared tablespaces include theInnoDBsystem tablespace and general tablespaces. For information about identifying partitions in shared tablespaces and moving them to file-per-table tablespaces, see Section 2.11.5, “Preparing Your Installation for Upgrade”. -
Support for setting user variables in statements other than
SETwas deprecated in MySQL 8.0.13. This functionality is subject to removal in MySQL 9.0. -
The
--ndbperror option was removed. Use the ndb_perror utility instead. -
The
innodb_undo_logsvariable was removed. Theinnodb_rollback_segmentsvariables performs the same function and should be used instead. -
The
Innodb_available_undo_logsstatus variable was removed. The number of available rollback segments per tablespace may be retrieved usingSHOW VARIABLES LIKE 'innodb_rollback_segments'; -
As of MySQL 8.0.14, the previously deprecated
innodb_undo_tablespacesvariable is no longer configurable. For more information, see Section 15.6.3.4, “Undo Tablespaces”. -
Support for the
ALTER TABLE ... UPGRADE PARTITIONINGstatement has been removed. -
As of MySQL 8.0.16, support for the
internal_tmp_disk_storage_enginesystem variable has been removed; internal temporary tables on disk now always use theInnoDBstorage engine. See Storage Engine for On-Disk Internal Temporary Tables,for more information. -
The
DISABLE_SHAREDCMake option was unused and has been removed.
This section lists server variables, status variables, and options that were added for the first time, have been deprecated, or have been removed in MySQL 8.0.
The following system variables, status variables, and options are new in MySQL 8.0, and have not been included in any previous release series.
-
Acl_cache_items_count: Number of cached privilege objects. Added in MySQL 8.0.0. -
Audit_log_current_size: Audit log file current size. Added in MySQL 8.0.11. -
Audit_log_event_max_drop_size: Size of largest dropped audited event. Added in MySQL 8.0.11. -
Audit_log_events: Number of handled audited events. Added in MySQL 8.0.11. -
Audit_log_events_filtered: Number of filtered audited events. Added in MySQL 8.0.11. -
Audit_log_events_lost: Number of dropped audited events. Added in MySQL 8.0.11. -
Audit_log_events_written: Number of written audited events. Added in MySQL 8.0.11. -
Audit_log_total_size: Combined size of written audited events. Added in MySQL 8.0.11. -
Audit_log_write_waits: Number of write-delayed audited events. Added in MySQL 8.0.11. -
Caching_sha2_password_rsa_public_key: caching_sha2_password authentication plugin RSA public key value. Added in MySQL 8.0.4. -
Com_alter_resource_group: Count of ALTER RESOURCE GROUP statements. Added in MySQL 8.0.3. -
Com_alter_user_default_role: Count of ALTER USER ... DEFAULT ROLE statements. Added in MySQL 8.0.0. -
Com_clone: Count of CLONE statements. Added in MySQL 8.0.2. -
Com_create_resource_group: Count of CREATE RESOURCE GROUP statements. Added in MySQL 8.0.3. -
Com_create_role: Count of CREATE ROLE statements. Added in MySQL 8.0.0. -
Com_drop_resource_group: Count of DROP RESOURCE GROUP statements. Added in MySQL 8.0.3. -
Com_drop_role: Count of DROP ROLE statements. Added in MySQL 8.0.0. -
Com_grant_roles: Count of GRANT ROLE statements. Added in MySQL 8.0.0. -
Com_install_component: Count of INSTALL COMPONENT statements. Added in MySQL 8.0.0. -
Com_restart: Count of RESTART statements. Added in MySQL 8.0.4. -
Com_revoke_roles: Count of REVOKE ROLES statements. Added in MySQL 8.0.0. -
Com_set_resource_group: Count of SET RESOURCE GROUP statements. Added in MySQL 8.0.3. -
Com_set_role: Count of SET ROLE statements. Added in MySQL 8.0.0. -
Com_uninstall_component: Count of UINSTALL COMPONENT statements. Added in MySQL 8.0.0. -
Compression_algorithm: Compression algorithm for current connection. Added in MySQL 8.0.18. -
Compression_level: Compression level for current connection. Added in MySQL 8.0.18. -
Connection_control_delay_generated: How many times the server delayed a connection request. Added in MySQL 8.0.1. -
Current_tls_ca: Current value of ssl_ca system variable. Added in MySQL 8.0.16. -
Current_tls_capath: Current value of ssl_capath system variable. Added in MySQL 8.0.16. -
Current_tls_cert: Current value of ssl_cert system variable. Added in MySQL 8.0.16. -
Current_tls_cipher: Current value of ssl_cipher system variable. Added in MySQL 8.0.16. -
Current_tls_ciphersuites: Current value of tsl_ciphersuites system variable. Added in MySQL 8.0.16. -
Current_tls_crl: Current value of ssl_crl system variable. Added in MySQL 8.0.16. -
Current_tls_crlpath: Current value of ssl_crlpath system variable. Added in MySQL 8.0.16. -
Current_tls_key: Current value of ssl_key system variable. Added in MySQL 8.0.16. -
Current_tls_version: Current value of tls_version system variable. Added in MySQL 8.0.16. -
Firewall_access_denied: Number of statements rejected by MySQL Enterprise Firewall. Added in MySQL 8.0.11. -
Firewall_access_granted: Number of statements accepted by MySQL Enterprise Firewall. Added in MySQL 8.0.11. -
Firewall_cached_entries: Number of statements recorded by MySQL Enterprise Firewall. Added in MySQL 8.0.11. -
Innodb_system_rows_deleted: Number of rows deleted from system schema tables. Added in MySQL 8.0.19. -
Innodb_system_rows_inserted: Number of rows inserted into system schema tables. Added in MySQL 8.0.19. -
Innodb_system_rows_read: Number of rows read from system schema tables. Added in MySQL 8.0.19. -
Innodb_undo_tablespaces_active: The number of active undo tablespaces. Added in MySQL 8.0.14. -
Innodb_undo_tablespaces_explicit: The number of user-created undo tablespaces. Added in MySQL 8.0.14. -
Innodb_undo_tablespaces_implicit: The number of undo tablespaces created by InnoDB. Added in MySQL 8.0.14. -
Innodb_undo_tablespaces_total: The total number of undo tablespaces. Added in MySQL 8.0.14. -
Mysqlx_bytes_received_compressed_payload: Number of bytes received as compressed message payloads, measured before decompression. Added in MySQL 8.0.19. -
Mysqlx_bytes_received_uncompressed_frame: Number of bytes received as compressed message payloads, measured after decompression. Added in MySQL 8.0.19. -
Mysqlx_bytes_sent_compressed_payload: Number of bytes sent as compressed message payloads, measured after compression. Added in MySQL 8.0.19. -
Mysqlx_bytes_sent_uncompressed_frame: Number of bytes sent as compressed message payloads, measured before compression. Added in MySQL 8.0.19. -
Secondary_engine_execution_count: For future use. Added in MySQL 8.0.13. -
activate_all_roles_on_login: Whether to activate all user roles at connect time. Added in MySQL 8.0.2. -
admin_address: IP address to bind to for connections on administrative interface. Added in MySQL 8.0.14. -
admin_port: TCP/IP number to use for connections on administrative interface. Added in MySQL 8.0.14. -
audit-log: Whether to activate the audit log plugin. Added in MySQL 8.0.11. -
audit_log_buffer_size: The size of the audit log buffer. Added in MySQL 8.0.11. -
audit_log_compression: Audit log file compression method. Added in MySQL 8.0.11. -
audit_log_connection_policy: Audit logging policy for connection-related events. Added in MySQL 8.0.11. -
audit_log_current_session: Whether to audit current session. Added in MySQL 8.0.11. -
audit_log_encryption: Audit log file encryption method. Added in MySQL 8.0.11. -
audit_log_exclude_accounts: Accounts not to audit. Added in MySQL 8.0.11. -
audit_log_file: The name of the audit log file. Added in MySQL 8.0.11. -
audit_log_filter_id: ID of current audit log filter. Added in MySQL 8.0.11. -
audit_log_flush: Close and reopen the audit log file. Added in MySQL 8.0.11. -
audit_log_format: The audit log file format. Added in MySQL 8.0.11. -
audit_log_include_accounts: Accounts to audit. Added in MySQL 8.0.11. -
audit_log_password_history_keep_days: Number of days to keep archived audit log encryption passwords. Added in MySQL 8.0.17. -
audit_log_policy: Audit logging policy. Added in MySQL 8.0.11. -
audit_log_read_buffer_size: Audit log file read buffer size. Added in MySQL 8.0.11. -
audit_log_rotate_on_size: Close and reopen the audit log file at a certain size. Added in MySQL 8.0.11. -
audit_log_statement_policy: Audit logging policy for statement-related events. Added in MySQL 8.0.11. -
audit_log_strategy: The audit logging strategy. Added in MySQL 8.0.11. -
authentication_ldap_sasl_auth_method_name: Authentication method name. Added in MySQL 8.0.11. -
authentication_ldap_sasl_bind_base_dn: LDAP server base distinguished name. Added in MySQL 8.0.11. -
authentication_ldap_sasl_bind_root_dn: LDAP server root distinguished name. Added in MySQL 8.0.11. -
authentication_ldap_sasl_bind_root_pwd: LDAP server root bind password. Added in MySQL 8.0.11. -
authentication_ldap_sasl_ca_path: LDAP server certificate authority file name. Added in MySQL 8.0.11. -
authentication_ldap_sasl_group_search_attr: LDAP server group search attribute. Added in MySQL 8.0.11. -
authentication_ldap_sasl_group_search_filter: LDAP custom group search filter. Added in MySQL 8.0.11. -
authentication_ldap_sasl_init_pool_size: LDAP server initial connection pool size. Added in MySQL 8.0.11. -
authentication_ldap_sasl_log_status: LDAP server log level. Added in MySQL 8.0.11. -
authentication_ldap_sasl_max_pool_size: LDAP server maximum connection pool size. Added in MySQL 8.0.11. -
authentication_ldap_sasl_server_host: LDAP server host name or IP address. Added in MySQL 8.0.11. -
authentication_ldap_sasl_server_port: LDAP server port number. Added in MySQL 8.0.11. -
authentication_ldap_sasl_tls: Whether to use encrypted connections to LDAP server. Added in MySQL 8.0.11. -
authentication_ldap_sasl_user_search_attr: LDAP server user search attribute. Added in MySQL 8.0.11. -
authentication_ldap_simple_auth_method_name: Authentication method name. Added in MySQL 8.0.11. -
authentication_ldap_simple_bind_base_dn: LDAP server base distinguished name. Added in MySQL 8.0.11. -
authentication_ldap_simple_bind_root_dn: LDAP server root distinguished name. Added in MySQL 8.0.11. -
authentication_ldap_simple_bind_root_pwd: LDAP server root bind password. Added in MySQL 8.0.11. -
authentication_ldap_simple_ca_path: LDAP server certificate authority file name. Added in MySQL 8.0.11. -
authentication_ldap_simple_group_search_attr: LDAP server group search attribute. Added in MySQL 8.0.11. -
authentication_ldap_simple_group_search_filter: LDAP custom group search filter. Added in MySQL 8.0.11. -
authentication_ldap_simple_init_pool_size: LDAP server initial connection pool size. Added in MySQL 8.0.11. -
authentication_ldap_simple_log_status: LDAP server log level. Added in MySQL 8.0.11. -
authentication_ldap_simple_max_pool_size: LDAP server maximum connection pool size. Added in MySQL 8.0.11. -
authentication_ldap_simple_server_host: LDAP server host name or IP address. Added in MySQL 8.0.11. -
authentication_ldap_simple_server_port: LDAP server port number. Added in MySQL 8.0.11. -
authentication_ldap_simple_tls: Whether to use encrypted connections to LDAP server. Added in MySQL 8.0.11. -
authentication_ldap_simple_user_search_attr: LDAP server user search attribute. Added in MySQL 8.0.11. -
authentication_windows_log_level: Windows authentication plugin logging level. Added in MySQL 8.0.11. -
authentication_windows_use_principal_name: Whether to use Windows authentication plugin principal name. Added in MySQL 8.0.11. -
binlog_encryption: Enable encryption for binary log files and relay log files on this server. Added in MySQL 8.0.14. -
binlog_expire_logs_seconds: Purge binary logs after this many seconds. Added in MySQL 8.0.1. -
binlog_rotate_encryption_master_key_at_startup: Rotate the binary log master key at server startup. Added in MySQL 8.0.14. -
binlog_row_metadata: Configures the amount of table related metadata binary logged when using row-based logging. Added in MySQL 8.0.1. -
binlog_row_value_options: Enables binary logging of partial JSON updates for row-based replication. Added in MySQL 8.0.3. -
binlog_transaction_dependency_history_size: Number of row hashes kept for looking up transaction that last updated some row. Added in MySQL 8.0.1. -
binlog_transaction_dependency_tracking: Source of dependency information (commit timestamps or transaction write sets) from which to assess which transactions can be executed in parallel by slave's multithreaded applier. Added in MySQL 8.0.1. -
caching_sha2_password_auto_generate_rsa_keys: Whether to autogenerate RSA key-pair files. Added in MySQL 8.0.4. -
caching_sha2_password_private_key_path: SHA2 authentication plugin private key path name. Added in MySQL 8.0.3. -
caching_sha2_password_public_key_path: SHA2 authentication plugin public key path name. Added in MySQL 8.0.3. -
clone_autotune_concurrency: Enables dynamic spawning of threads for remote cloning operations. Added in MySQL 8.0.17. -
clone_buffer_size: Defines the size of the intermediate buffer on the donor MySQL server instance. Added in MySQL 8.0.17. -
clone_ddl_timeout: The number of seconds that a cloning operation waits for backup lock. Added in MySQL 8.0.17. -
clone_enable_compression: Enables compression of data at the network layer during cloning. Added in MySQL 8.0.17. -
clone_max_concurrency: The maximum number of concurrent threads used to perform cloning operation. Added in MySQL 8.0.17. -
clone_max_data_bandwidth: The maximum data transfer rate in MiB per second for a remote cloning operation. Added in MySQL 8.0.17. -
clone_max_network_bandwidth: The maximum network transfer rate in MiB per second for a remote cloning operation. Added in MySQL 8.0.17. -
clone_ssl_ca: Specifies the path to the certificate authority (CA) file. Added in MySQL 8.0.14. -
clone_ssl_cert: Specifies the path to the public key certificate file. Added in MySQL 8.0.14. -
clone_ssl_key: Specifies the path to the private key file. Added in MySQL 8.0.14. -
clone_valid_donor_list: Defines donor host addresses for remote cloning operations. Added in MySQL 8.0.17. -
connection_control_failed_connections_threshold: Consecutive failed connection attempts before delays occur. Added in MySQL 8.0.1. -
connection_control_max_connection_delay: Maximum delay (milliseconds) for server response to failed connection attempts. Added in MySQL 8.0.1. -
connection_control_min_connection_delay: Minimum delay (milliseconds) for server response to failed connection attempts. Added in MySQL 8.0.1. -
create_admin_listener_thread: Whether to use dedicated listening thread for connections on administrative interface. Added in MySQL 8.0.14. -
cte_max_recursion_depth: Common table expression maximum recursion depth. Added in MySQL 8.0.3. -
ddl-rewriter: Whether to activate the ddl_rewriter plugin. Added in MySQL 8.0.16. -
default_collation_for_utf8mb4: Default collation for utf8mb4 character set. Added in MySQL 8.0.11. -
default_table_encryption: The default schema and tablespace encryption setting. Added in MySQL 8.0.16. -
dragnet.Status: Result of most recent assignment to dragnet.log_error_filter_rules. Added in MySQL 8.0.12. -
dragnet.log_error_filter_rules: Filter rules for error logging. Added in MySQL 8.0.4. -
early-plugin-load: Specify plugins to load before loading mandatory built-in plugins and before storage engine initialization. Added in MySQL 8.0.0. -
generated_random_password_length: Maximum length of generated passwords. Added in MySQL 8.0.18. -
group_replication_autorejoin_tries: Number of tries that a member makes to automatically rejoin the group. Added in MySQL 8.0.16. -
group_replication_clone_threshold: The transaction number gap between the donor and recipient above which a remote cloning operation is used for state transfer. Added in MySQL 8.0.17. -
group_replication_communication_debug_options: The level of debugging messages for Group Replication components. Added in MySQL 8.0.3. -
group_replication_communication_max_message_size: Maximum message size for Group Replication communications, larger messages are fragmented. Added in MySQL 8.0.16. -
group_replication_consistency: The type of transaction consistency guarantee which the group provides. Added in MySQL 8.0.14. -
group_replication_exit_state_action: How the instance behaves when it leaves the group involuntarily. Added in MySQL 8.0.12. -
group_replication_flow_control_hold_percent: Defines what percentage of the group quota remains unused. Added in MySQL 8.0.2. -
group_replication_flow_control_max_commit_quota: Defines the maximum flow control quota of the group. Added in MySQL 8.0.2. -
group_replication_flow_control_member_quota_percent: Defines the percentage of the quota that a member should assume is available for itself when calculating the quotas. Added in MySQL 8.0.2. -
group_replication_flow_control_min_quota: Controls the lowest flow control quota that can be assigned to a member. Added in MySQL 8.0.2. -
group_replication_flow_control_min_recovery_quota: Controls the lowest quota that can be assigned to a member because of another recovering member in the group. Added in MySQL 8.0.2. -
group_replication_flow_control_period: Defines how many seconds to wait between flow control iterations. Added in MySQL 8.0.2. -
group_replication_flow_control_release_percent: Defines how the group quota should be released when flow control no longer needs to throttle the writer members. Added in MySQL 8.0.2. -
group_replication_member_expel_timeout: The time between a suspected failure of a group member and it being expelled from the group, causing a group membership reconfiguration. Added in MySQL 8.0.13. -
group_replication_member_weight: Chance of this member being elected as primary. Added in MySQL 8.0.2. -
group_replication_message_cache_size: Maximum memory for the message cache in the group communication engine (XCom). Added in MySQL 8.0.16. -
group_replication_recovery_compression_algorithm: Permitted compression algorithms for outgoing recovery connections. Added in MySQL 8.0.18. -
group_replication_recovery_get_public_key: Whether to accept preference about fetching public key from master. Added in MySQL 8.0.4. -
group_replication_recovery_public_key_path: To accept public key information. Added in MySQL 8.0.4. -
group_replication_recovery_tls_ciphersuites: Permitted ciphersuites when TLSv1.3 is used for connection encryption with this instance as the client (joining member). Added in MySQL 8.0.19. -
group_replication_recovery_tls_version: Permitted TLS protocols for connection encryption as the client (joining member). Added in MySQL 8.0.19. -
group_replication_recovery_zstd_compression_level: Compression level for recovery connections that use zstd compression. Added in MySQL 8.0.18. -
group_replication_unreachable_majority_timeout: How long to wait for network partitions that result in a minority to leave the group. Added in MySQL 8.0.2. -
histogram_generation_max_mem_size: Maximum memory for creating histogram statistics. Added in MySQL 8.0.2. -
immediate_server_version: The MySQL Server release number of the server that is the immediate master in a replication topology. Added in MySQL 8.0.14. -
information_schema_stats_expiry: Expiration setting for cached table statistics. Added in MySQL 8.0.3. -
innodb_buffer_pool_debug: Permits multiple buffer pool instances when the buffer pool is less than 1GB in size. Added in MySQL 8.0.0. -
innodb_buffer_pool_in_core_file: Controls writing of buffer pool pages to core files. Added in MySQL 8.0.14. -
innodb_checkpoint_disabled: Disables checkpoints so that a deliberate server exit always initiates recovery. Added in MySQL 8.0.2. -
innodb_ddl_log_crash_reset_debug: A debug option that resets DDL log crash injection counters. Added in MySQL 8.0.3. -
innodb_deadlock_detect: Enables or disables deadlock detection. Added in MySQL 8.0.0. -
innodb_dedicated_server: Enables automatic configuration of buffer pool size, log file size, and flush method. Added in MySQL 8.0.3. -
innodb_directories: Defines directories to scan at startup for tablespace data files. Added in MySQL 8.0.4. -
innodb_fsync_threshold: Controls how often InnoDB calls fsync when creating a new file. Added in MySQL 8.0.13. -
innodb_idle_flush_pct: Limits I/0 operations when InnoDB is idle. Added in MySQL 8.0.18. -
innodb_log_checkpoint_fuzzy_now: A debug option that forces InnoDB to write a fuzzy checkpoint. Added in MySQL 8.0.13. -
innodb_log_spin_cpu_abs_lwm: Minimum amount of CPU usage below which user threads no longer spin while waiting for flushed redo. Added in MySQL 8.0.11. -
innodb_log_spin_cpu_pct_hwm: Maximum amount of CPU usage above which user threads no longer spin while waiting for flushed redo. Added in MySQL 8.0.11. -
innodb_log_wait_for_flush_spin_hwm: The maximum average log flush time beyond which user threads no longer spin while waiting for flushed redo. Added in MySQL 8.0.11. -
innodb_parallel_read_threads: Defines the number of threads for parallel index reads. Added in MySQL 8.0.14. -
innodb_print_ddl_logs: Whether or not to print DDL logs to the error log. Added in MySQL 8.0.3. -
innodb_redo_log_archive_dirs: Labeled redo log archive directories. Added in MySQL 8.0.17. -
innodb_redo_log_encrypt: Controls encryption of redo log data for encrypted tablespaces. Added in MySQL 8.0.1. -
innodb_scan_directories: Defines directories to scan for tablespace files during InnoDB recovery. Added in MySQL 8.0.2. -
innodb_spin_wait_pause_multiplier: Defines a multiplier value used to determine the number of PAUSE instructions in spin-wait loops. Added in MySQL 8.0.16. -
innodb_stats_include_delete_marked: Include delete-marked records when calculating persistent InnoDB statistics. Added in MySQL 8.0.1. -
innodb_temp_tablespaces_dir: Session temporary tablespaces path. Added in MySQL 8.0.13. -
innodb_tmpdir: The directory location for the temporary table files created during online ALTER TABLE operations. Added in MySQL 8.0.0. -
innodb_undo_log_encrypt: Controls encryption of undo log data for encrypted tablespaces. Added in MySQL 8.0.1. -
internal_tmp_mem_storage_engine: Defines the storage to use for internal in-memory temporary tables. Added in MySQL 8.0.2. -
keyring-migration-destination: Key migration destination keyring plugin. Added in MySQL 8.0.4. -
keyring-migration-host: Host name for connecting to running server for key migration. Added in MySQL 8.0.4. -
keyring-migration-password: Password for connecting to running server for key migration. Added in MySQL 8.0.4. -
keyring-migration-port: TCP/IP port number for connecting to running server for key migration. Added in MySQL 8.0.4. -
keyring-migration-socket: Unix socket file or Windows named pipe for connecting to running server for key migration. Added in MySQL 8.0.4. -
keyring-migration-source: Key migration source keyring plugin. Added in MySQL 8.0.4. -
keyring-migration-user: User name for connecting to running server for key migration. Added in MySQL 8.0.4. -
keyring_aws_cmk_id: AWS keyring plugin customer master key ID value. Added in MySQL 8.0.11. -
keyring_aws_conf_file: AWS keyring plugin configuration file location. Added in MySQL 8.0.11. -
keyring_aws_data_file: AWS keyring plugin storage file location. Added in MySQL 8.0.11. -
keyring_aws_region: AWS keyring plugin region. Added in MySQL 8.0.11. -
keyring_encrypted_file_data: keyring_encrypted_file plugin data file. Added in MySQL 8.0.11. -
keyring_encrypted_file_password: keyring_encrypted_file plugin password. Added in MySQL 8.0.11. -
keyring_hashicorp_auth_path: The HashiCorp Vault AppRole authentication path. Added in MySQL 8.0.18. -
keyring_hashicorp_ca_path: Path to the keyring_hashicorp CA file. Added in MySQL 8.0.18. -
keyring_hashicorp_caching: Whether to enable keyring_hashicorp caching. Added in MySQL 8.0.18. -
keyring_hashicorp_commit_auth_path: The actual keyring_hashicorp_auth_path value in use. Added in MySQL 8.0.18. -
keyring_hashicorp_commit_ca_path: The actual keyring_hashicorp_ca_path value in use. Added in MySQL 8.0.18. -
keyring_hashicorp_commit_caching: The actual keyring_hashicorp_caching value in use. Added in MySQL 8.0.18. -
keyring_hashicorp_commit_role_id: The actual keyring_hashicorp_role_id value in use. Added in MySQL 8.0.18. -
keyring_hashicorp_commit_server_url: The actual keyring_hashicorp_server_url value in use. Added in MySQL 8.0.18. -
keyring_hashicorp_commit_store_path: The actual keyring_hashicorp_store_path value in use. Added in MySQL 8.0.18. -
keyring_hashicorp_role_id: The HashiCorp Vault AppRole authentication role ID. Added in MySQL 8.0.18. -
keyring_hashicorp_secret_id: The HashiCorp Vault AppRole authentication secret ID. Added in MySQL 8.0.18. -
keyring_hashicorp_server_url: The HashiCorp Vault server URL. Added in MySQL 8.0.18. -
keyring_hashicorp_store_path: The HashiCorp Vault store path. Added in MySQL 8.0.18. -
keyring_okv_conf_dir: Oracle Key Vault keyring plugin configuration directory. Added in MySQL 8.0.11. -
keyring_operations: Whether keyring operations are enabled. Added in MySQL 8.0.4. -
lock_order: Whether to enable LOCK_ORDER tool at runtime. Added in MySQL 8.0.17. -
lock_order_debug_loop: Whether to cause debug assert when LOCK_ORDER tool encounters dependency flagged as a loop. Added in MySQL 8.0.17. -
lock_order_debug_missing_arc: Whether to cause debug assert when LOCK_ORDER tool encounters undeclared dependency. Added in MySQL 8.0.17. -
lock_order_debug_missing_key: Whether to cause debug assert when LOCK_ORDER tool encounters object not properly instrumented with the Performance Schema. Added in MySQL 8.0.17. -
lock_order_debug_missing_unlock: Whether to cause debug assert when LOCK_ORDER tool encounters lock that is destroyed while still held. Added in MySQL 8.0.17. -
lock_order_dependencies: Path to the lock_order_dependencies.txt file. Added in MySQL 8.0.17. -
lock_order_extra_dependencies: Path to a second dependency file. Added in MySQL 8.0.17. -
lock_order_output_directory: Directory where LOCK_ORDER tool writes logs. Added in MySQL 8.0.17. -
lock_order_print_txt: Whether to perform lock-order graph analysis and print textual report. Added in MySQL 8.0.17. -
lock_order_trace_loop: Whether to print log file trace when LOCK_ORDER tool encounters dependency flagged as a loop. Added in MySQL 8.0.17. -
lock_order_trace_missing_arc: Whether to print log file trace when LOCK_ORDER tool encounters undeclared dependency. Added in MySQL 8.0.17. -
lock_order_trace_missing_key: Whether to print log file trace when LOCK_ORDER tool encounters object not properly instrumented with the Performance Schema. Added in MySQL 8.0.17. -
lock_order_trace_missing_unlock: Whether to print log file trace when LOCK_ORDER tool encounters lock that is destroyed while still held. Added in MySQL 8.0.17. -
log_error_filter_rules: Filter rules for error logging. Added in MySQL 8.0.2. -
log_error_services: Components to use for error logging. Added in MySQL 8.0.2. -
log_error_suppression_list: Warning/information error log messages to suppress. Added in MySQL 8.0.13. -
log_slow_extra: Whether to write extra information to the slow query log file. Added in MySQL 8.0.14. -
mandatory_roles: Automatically granted roles for all users. Added in MySQL 8.0.2. -
mysql_firewall_mode: Whether MySQL Enterprise Firewall is operational. Added in MySQL 8.0.11. -
mysql_firewall_trace: Whether to enable firewall trace. Added in MySQL 8.0.11. -
mysqlx: Whether X Plugin is initialized. Added in MySQL 8.0.11. -
mysqlx_compression_algorithms: Compression algorithms permitted for X Protocol connections. Added in MySQL 8.0.19. -
mysqlx_interactive_timeout: Number of seconds to wait for interactive clients to timeout. Added in MySQL 8.0.4. -
mysqlx_read_timeout: Number of seconds to wait for blocking read operations to complete. Added in MySQL 8.0.4. -
mysqlx_wait_timeout: Number of seconds to wait for activity on a connection. Added in MySQL 8.0.4. -
mysqlx_write_timeout: Number of seconds to wait for blocking write operations to complete. Added in MySQL 8.0.4. -
named_pipe_full_access_group: Name of Windows group granted full access to the named pipe. Added in MySQL 8.0.14. -
no-dd-upgrade: Prevent automatic upgrade of data dictionary tables at startup. Added in MySQL 8.0.4. -
no-monitor: Do not fork monitor process required for RESTART. Added in MySQL 8.0.12. -
original_commit_timestamp: The time when a transaction was committed on the original master. Added in MySQL 8.0.1. -
original_server_version: The MySQL Server release number of the server where a transaction was originally committed. Added in MySQL 8.0.14. -
partial_revokes: Whether partial revocation is enabled. Added in MySQL 8.0.16. -
password_history: Number of password changes required before password reuse. Added in MySQL 8.0.3. -
password_require_current: Whether password changes require current password verification. Added in MySQL 8.0.13. -
password_reuse_interval: Number of days elapsed required before password reuse. Added in MySQL 8.0.3. -
performance_schema_max_digest_sample_age: The query resample age in seconds. Added in MySQL 8.0.3. -
persist_only_admin_x509_subject: SSL certificate X.509 Subject that enables persisting persist-restricted system variables. Added in MySQL 8.0.14. -
persisted_globals_load: Whether to load persisted configuration settings. Added in MySQL 8.0.0. -
print_identified_with_as_hex: For SHOW CREATE USER, print hash values containing unprintable characters in hex. Added in MySQL 8.0.17. -
protocol_compression_algorithms: Permitted compression algorithms for incoming connections. Added in MySQL 8.0.18. -
regexp_stack_limit: Regular expression match stack size limit. Added in MySQL 8.0.4. -
regexp_time_limit: Regular expression match timeout. Added in MySQL 8.0.4. -
require_row_format: For internal server use. Added in MySQL 8.0.19. -
resultset_metadata: Whether the server returns result set metadata. Added in MySQL 8.0.3. -
rpl_read_size: Set the minimum amount of data in bytes that is read from the binary log files and relay log files. Added in MySQL 8.0.11. -
secondary_engine_cost_threshold: For future use. Added in MySQL 8.0.16. -
show_create_table_skip_secondary_engine: Whether to exclude the SECONDARY ENGINE clause from SHOW CREATE TABLE output. Added in MySQL 8.0.18. -
show_create_table_verbosity: Whether to display ROW_FORMAT in SHOW CREATE TABLE even if it has the default value. Added in MySQL 8.0.11. -
sql_require_primary_key: Whether tables must have a primary key. Added in MySQL 8.0.13. -
ssl_fips_mode: Whether to enable FIPS mode on server side. Added in MySQL 8.0.11. -
syseventlog.facility: Facility for syslog messages. Added in MySQL 8.0.13. -
syseventlog.include_pid: Whether to include server PID in syslog messages. Added in MySQL 8.0.13. -
syseventlog.tag: Tag for server identifier in syslog messages. Added in MySQL 8.0.13. -
table_encryption_privilege_check: Enables the TABLE_ENCRYPTION_ADMIN privilege check. Added in MySQL 8.0.16. -
temptable_max_ram: Defines the maximum amount of memory that can occupied by the TempTable storage engine before data is stored on disk. Added in MySQL 8.0.2. -
temptable_use_mmap: Defines whether the TempTable storage engine allocates memory-mapped files when the temptable_max_ram threshold is reached. Added in MySQL 8.0.16. -
thread_pool_algorithm: The thread pool algorithm. Added in MySQL 8.0.11. -
thread_pool_high_priority_connection: Whether the current session is high priority. Added in MySQL 8.0.11. -
thread_pool_max_active_query_threads: Maximum permissible number of active query threads per group. Added in MySQL 8.0.19. -
thread_pool_max_unused_threads: Maximum permissible number of unused threads. Added in MySQL 8.0.11. -
thread_pool_prio_kickup_timer: How long before a statement is moved to high-priority execution. Added in MySQL 8.0.11. -
thread_pool_size: Number of thread groups in the thread pool. Added in MySQL 8.0.11. -
thread_pool_stall_limit: How long before a statement is defined as stalled. Added in MySQL 8.0.11. -
tls_ciphersuites: Permissible TLSv1.3 ciphersuites for encrypted connections. Added in MySQL 8.0.16. -
upgrade: Control automatic upgrade at startup. Added in MySQL 8.0.16. -
use_secondary_engine: For future use. Added in MySQL 8.0.13. -
validate-config: Validate server configuration. Added in MySQL 8.0.16. -
validate_password.check_user_name: Whether to check passwords against user name. Added in MySQL 8.0.4. -
validate_password.dictionary_file: validate_password dictionary file. Added in MySQL 8.0.4. -
validate_password.dictionary_file_last_parsed: When the dictionary file was last parsed. Added in MySQL 8.0.4. -
validate_password.dictionary_file_words_count: Number of words in dictionary file. Added in MySQL 8.0.4. -
validate_password.length: validate_password required password length. Added in MySQL 8.0.4. -
validate_password.mixed_case_count: validate_password required number of uppercase/lowercase characters. Added in MySQL 8.0.4. -
validate_password.number_count: validate_password required number of digit characters. Added in MySQL 8.0.4. -
validate_password.policy: validate_password password policy. Added in MySQL 8.0.4. -
validate_password.special_char_count: validate_password required number of special characters. Added in MySQL 8.0.4. -
version_compile_zlib: Version of compiled-in zlib library. Added in MySQL 8.0.11. -
windowing_use_high_precision: Whether to compute window functions to high precision. Added in MySQL 8.0.2.
The following system variables, status variables, and options have been deprecated in MySQL 8.0.
-
Compression: Whether the client connection uses compression in the client/server protocol. Deprecated as of MySQL 8.0.18. -
expire_logs_days: Purge binary logs after this many days. Deprecated as of MySQL 8.0.3. -
innodb_undo_tablespaces: Number of tablespace files that rollback segments are divided between. Deprecated as of MySQL 8.0.4. -
log_bin_use_v1_row_events: Whether server is using version 1 binary log row events. Deprecated as of MySQL 8.0.18. -
log_syslog: Whether to write error log to syslog. Deprecated as of MySQL 8.0.2. -
master-info-file: The location and name of the file that remembers the master and where the I/O replication thread is in the master's binary logs. Deprecated as of MySQL 8.0.18. -
max_length_for_sort_data: Max number of bytes in sorted records. Deprecated as of MySQL 8.0.20. -
no-dd-upgrade: Prevent automatic upgrade of data dictionary tables at startup. Deprecated as of MySQL 8.0.16. -
relay_log_info_file: File in which the slave records information about the relay logs. Deprecated as of MySQL 8.0.18. -
slave_compressed_protocol: Use compression of master/slave protocol. Deprecated as of MySQL 8.0.18. -
slave_rows_search_algorithms: Determines search algorithms used for slave update batching. Any 2 or 3 from the list INDEX_SEARCH, TABLE_SCAN, HASH_SCAN. Deprecated as of MySQL 8.0.18. -
symbolic-links: Permit symbolic links for MyISAM tables. Deprecated as of MySQL 8.0.2.
The following system variables, status variables, and options have been removed in MySQL 8.0.
-
Com_alter_db_upgrade: Count of ALTER DATABASE ... UPGRADE DATA DIRECTORY NAME statements. Removed in MySQL 8.0.0. -
Innodb_available_undo_logs: Display the total number of InnoDB rollback segments; different from innodb_rollback_segments, which displays the number of active rollback segments. Removed in MySQL 8.0.2. -
Qcache_free_blocks: Number of free memory blocks in the query cache. Removed in MySQL 8.0.3. -
Qcache_free_memory: The amount of free memory for the query cache. Removed in MySQL 8.0.3. -
Qcache_hits: Number of query cache hits. Removed in MySQL 8.0.3. -
Qcache_inserts: Number of query cache inserts. Removed in MySQL 8.0.3. -
Qcache_lowmem_prunes: Number of queries that were deleted from the query cache due to lack of free memory in the cache. Removed in MySQL 8.0.3. -
Qcache_not_cached: Number of noncached queries (not cacheable, or not cached due to the query_cache_type setting). Removed in MySQL 8.0.3. -
Qcache_queries_in_cache: Number of queries registered in the query cache. Removed in MySQL 8.0.3. -
Qcache_total_blocks: The total number of blocks in the query cache. Removed in MySQL 8.0.3. -
Slave_heartbeat_period: The slave's replication heartbeat interval, in seconds. Removed in MySQL 8.0.1. -
Slave_last_heartbeat: Shows when the latest heartbeat signal was received, in TIMESTAMP format. Removed in MySQL 8.0.1. -
Slave_received_heartbeats: Number of heartbeats received by a replication slave since previous reset. Removed in MySQL 8.0.1. -
Slave_retried_transactions: The total number of times since startup that the replication slave SQL thread has retried transactions. Removed in MySQL 8.0.1. -
Slave_running: The state of this server as a replication slave (slave I/O thread status). Removed in MySQL 8.0.1. -
bootstrap: Used by mysql installation scripts. Removed in MySQL 8.0.0. -
date_format: The DATE format (unused). Removed in MySQL 8.0.3. -
datetime_format: The DATETIME/TIMESTAMP format (unused). Removed in MySQL 8.0.3. -
des-key-file: Load keys for des_encrypt() and des_encrypt from given file. Removed in MySQL 8.0.3. -
group_replication_allow_local_disjoint_gtids_join: Allow the current server to join the group even if it has transactions not present in the group. Removed in MySQL 8.0.4. -
have_crypt: Availability of the crypt() system call. Removed in MySQL 8.0.3. -
ignore-db-dir: Treat directory as nondatabase directory. Removed in MySQL 8.0.0. -
ignore_builtin_innodb: Ignore the built-in InnoDB. Removed in MySQL 8.0.3. -
ignore_db_dirs: Directories treated as nondatabase directories. Removed in MySQL 8.0.0. -
innodb_checksums: Enable InnoDB checksums validation. Removed in MySQL 8.0.0. -
innodb_disable_resize_buffer_pool_debug: Disables resizing of the InnoDB buffer pool. Removed in MySQL 8.0.0. -
innodb_file_format: The format for new InnoDB tables. Removed in MySQL 8.0.0. -
innodb_file_format_check: Whether InnoDB performs file format compatibility checking. Removed in MySQL 8.0.0. -
innodb_file_format_max: The file format tag in the shared tablespace. Removed in MySQL 8.0.0. -
innodb_large_prefix: Enables longer keys for column prefix indexes. Removed in MySQL 8.0.0. -
innodb_locks_unsafe_for_binlog: Force InnoDB not to use next-key locking. Instead use only row-level locking. Removed in MySQL 8.0.0. -
innodb_scan_directories: Defines directories to scan for tablespace files during InnoDB recovery. Removed in MySQL 8.0.4. -
innodb_stats_sample_pages: Number of index pages to sample for index distribution statistics. Removed in MySQL 8.0.0. -
innodb_support_xa: Enable InnoDB support for the XA two-phase commit. Removed in MySQL 8.0.0. -
innodb_undo_logs: Defines the number of undo logs (rollback segments) used by InnoDB; an alias for innodb_rollback_segments. Removed in MySQL 8.0.2. -
internal_tmp_disk_storage_engine: Storage engine for internal temporary tables. Removed in MySQL 8.0.16. -
log-warnings: Log some noncritical warnings to the log file. Removed in MySQL 8.0.3. -
log_builtin_as_identified_by_password: Whether to log CREATE/ALTER USER, GRANT in backward-compatible fashion. Removed in MySQL 8.0.11. -
log_error_filter_rules: Filter rules for error logging. Removed in MySQL 8.0.4. -
log_syslog: Whether to write error log to syslog. Removed in MySQL 8.0.13. -
log_syslog_facility: Facility for syslog messages. Removed in MySQL 8.0.13. -
log_syslog_include_pid: Whether to include server PID in syslog messages. Removed in MySQL 8.0.13. -
log_syslog_tag: Tag for server identifier in syslog messages. Removed in MySQL 8.0.13. -
max_tmp_tables: Unused. Removed in MySQL 8.0.3. -
metadata_locks_cache_size: Size of the metadata locks cache. Removed in MySQL 8.0.13. -
metadata_locks_hash_instances: Number of metadata lock hashes. Removed in MySQL 8.0.13. -
multi_range_count: The maximum number of ranges to send to a table handler at once during range selects. Removed in MySQL 8.0.3. -
old_passwords: Selects password hashing method for PASSWORD(). Removed in MySQL 8.0.11. -
partition: Enable (or disable) partitioning support. Removed in MySQL 8.0.0. -
query_cache_limit: Do not cache results that are bigger than this. Removed in MySQL 8.0.3. -
query_cache_min_res_unit: Minimal size of unit in which space for results is allocated (last unit will be trimmed after writing all result data). Removed in MySQL 8.0.3. -
query_cache_size: The memory allocated to store results from old queries. Removed in MySQL 8.0.3. -
query_cache_type: Query cache type. Removed in MySQL 8.0.3. -
query_cache_wlock_invalidate: Invalidate queries in query cache on LOCK for write. Removed in MySQL 8.0.3. -
secure_auth: Disallow authentication for accounts that have old (pre-4.1) passwords. Removed in MySQL 8.0.3. -
show_compatibility_56: Compatibility for SHOW STATUS/VARIABLES. Removed in MySQL 8.0.1. -
skip-partition: Do not enable user-defined partitioning. Removed in MySQL 8.0.0. -
sync_frm: Sync .frm to disk on create. Enabled by default. Removed in MySQL 8.0.0. -
temp-pool: Using this option will cause most temporary files created to use a small set of names, rather than a unique name for each new file. Removed in MySQL 8.0.1. -
time_format: The TIME format (unused). Removed in MySQL 8.0.3. -
tx_isolation: The default transaction isolation level. Removed in MySQL 8.0.3. -
tx_read_only: Default transaction access mode. Removed in MySQL 8.0.3.
浙公网安备 33010602011771号