Documentation Home
MySQL 8.0 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 34.2Mb
PDF (A4) - 34.2Mb
PDF (RPM) - 32.0Mb
HTML Download (TGZ) - 8.1Mb
HTML Download (Zip) - 8.2Mb
HTML Download (RPM) - 7.0Mb
Man Pages (TGZ) - 146.0Kb
Man Pages (Zip) - 206.9Kb
Info (Gzip) - 3.1Mb
Info (Zip) - 3.1Mb


MySQL 8.0 Reference Manual  /  General Information  /  What Is New in MySQL 8.0

Pre-General Availability Draft: 2017-12-11

1.4 What Is New 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”.

Features Added in MySQL 8.0

The following features have been added to MySQL 8.0:

  • Data dictionary.  These enhancements were added:

    • MySQL Server 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 about this feature, see Chapter 14, MySQL Data Dictionary.

  • Atomic Data Definition Statements (Atomic DDL).  For more information about this feature, see Section 13.1.1, “Atomic Data Definition Statement Support”.

  • Security and account management.  These enhancements were added to improve security and enable greater DBA flexibility in account management:

    • 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.3.4, “Using Roles”.

    • 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. Together with existing password-expiration capabilities to require that passwords be changed periodically, the new password-history capabilities provide DBAs more complete control over password management. For more information, see Section 6.3.8, “Password Management”.

    • A new caching_sha2_password authentication plugin is available. Like the sha256_password plugin, caching_sha2_password implements 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.5.1.3, “SHA-2 Pluggable Authentication”.

  • 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”.

  • InnoDB enhancements.  These InnoDB enhancements were added:

    • The current maximum auto-increment counter value is written to the redo log each time the value changes, and it is 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 = N table 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 ROLLBACK operation no longer results in the reuse of auto-increment values that were allocated to the rolled-back transaction.

      • If you modify an AUTO_INCREMENT column value to a value larger than the current maximum auto-increment value (in an UPDATE operation, for example), the new value is persisted, and subsequent INSERT operations allocate auto-increment values starting from the new, larger value.

      For more information, see Section 15.8.1.5, “AUTO_INCREMENT Handling in InnoDB”, and InnoDB AUTO_INCREMENT Counter Initialization.

    • When encountering index tree corruption, InnoDB writes a corruption flag to the redo log, which makes the corruption flag crash safe. InnoDB also writes in-memory corruption flag data to an engine-private system table on each checkpoint. During recovery, InnoDB reads corruption flags from both locations and merges results before marking in-memory table and index objects as corrupt.

    • The InnoDB memcached plugin supports multiple get operations (fetching multiple key/value pairs in a single memcached query) and range queries. See Section 15.19.4, “InnoDB memcached Multiple get and Range Query Support”.

    • A new dynamic configuration option, innodb_deadlock_detect, is 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 the innodb_lock_wait_timeout setting for transaction rollback when a deadlock occurs.

    • A new INFORMATION_SCHEMA table, INNODB_CACHED_INDEXES, reports the number of index pages cached in the InnoDB buffer pool for each index.

    • All InnoDB temporary tables are created in the shared temporary tablespace, ibtmp1.

    • The InnoDB tablespace encryption feature supports encryption of redo log and undo log data. See Redo Log Data Encryption, and Undo Log Data Encryption.

    • InnoDB supports NOWAIT and SKIP LOCKED options with SELECT ... FOR SHARE and SELECT ... FOR UPDATE locking read statements. NOWAIT causes the statement to return immediately if a requested row is locked by another transaction. SKIP LOCKED removes locked rows from the result set. See Locking Read Concurrency with NOWAIT and SKIP LOCKED.

      SELECT ... FOR SHARE replaces SELECT ... LOCK IN SHARE MODE, but LOCK IN SHARE MODE remains available for backward compatibility. The statements are equivalent. However, FOR UPDATE and FOR SHARE support NOWAIT, SKIP LOCKED, and OF tbl_name options. See Section 13.2.10, “SELECT Syntax”.

      OF tbl_name applies locking queries to named tables.

    • ADD PARTITION, DROP PARTITION, COALESCE PARTITION, REORGANIZE PARTITION, and REBUILD PARTITION ALTER TABLE options are supported by native partitioning in-place APIs and may be used with ALGORITHM={COPY|INPLACE} and LOCK clauses.

      DROP PARTITION with ALGORITHM=INPLACE deletes data stored in the partition and drops the partition. However, DROP PARTITION with ALGORITHM=COPY or old_alter_table=ON rebuilds the partitioned table and attempts to move data from the dropped partition to another partition with a compatible PARTITION ... VALUES definition. Data that cannot be moved to another partition is deleted.

    • The InnoDB storage engine uses the global MySQL data dictionary rather than its own storage engine-specific data dictionary. For information about the data dictionary, see Chapter 14, MySQL Data Dictionary.

    • mysql system tables and data dictionary tables are created in a single InnoDB tablespace file named mysql.ibd in the MySQL data directory. Previously, these tables were created in individual InnoDB tablespace files in the mysql database directory.

    • The following undo tablespace changes are introduced in MySQL 8.0:

      • The number of undo tablespaces may be modified at runtime or when the server is restarted using the existing innodb_undo_tablespaces configuration option. This change permits the addition of undo tablespaces and rollback segments as a database installation grows.

      • innodb_undo_log_truncate is enabled by default. See Section 15.7.8, “Truncating Undo Tablespaces”.

      • The innodb_undo_tablespaces default value was changed from 0 to 2, which means that rollback segments are created in two separate undo tablespaces instead of the InnoDB system tablespace by default. A minimum of two undo tablespaces is required to permit truncation of undo logs.

        The minimum innodb_undo_tablespaces value is 2, and setting innodb_undo_tablespaces to 0 is no longer permitted. A minimum value of 2 ensures that rollback segments are always created in undo tablespaces instead of the system tablespace. For more information, see Section 15.7.7, “Configuring Undo Tablespaces”.

      • The naming convention used for undo tablespace files is changed from undoNNN to undo_NNN, where NNN is the undo space number.

      • The innodb_rollback_segments configuration option defines the number of rollback segments per undo tablespace. Previously, innodb_rollback_segments was a global setting that specified the total number of rollback segments for the MySQL instance. This change increases the number of rollback segments available for concurrent transactions, and more rollback segments increases the likelihood that concurrent transactions use separate rollback segments for undo logs resulting in less resource contention.

      • The innodb_undo_logs configuration option is removed. The innodb_rollback_segments configuration option performs the same function and should be used instead.

      • The Innodb_available_undo_logs status variable is removed. The number of available rollback segments per tablespace may be retrieved using SHOW VARIABLES LIKE 'innodb_rollback_segments';

    • Default values for configuration options that affect buffer pool preflushing and flushing behavior were modified:

      • The innodb_max_dirty_pages_pct_lwm default value is 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_pct default value was increased from 75 to 90. InnoDB attempts 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_mode setting is 2 (interleaved). Interleaved lock mode permits the execution of multi-row inserts in parallel, which improves concurrency and scalability. The new innodb_autoinc_lock_mode default 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_mode default setting may break applications that depend on sequential auto-increment values. To restore the previous default, set innodb_autoinc_lock_mode to 1.

    • Renaming a general tablespace is supported by ALTER TABLESPACE ... RENAME TO syntax.

    • The innodb_dedicated_server configuration option, which is disabled by default, causes InnoDB to automatically 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.6.13, “Enabling Automatic Configuration for a Dedicated MySQL Server”.

    • A new INFORMATION_SCHEMA view, INNODB_TABLESPACES_BRIEF, provides space, name, path, flag, and space type data for InnoDB tablespaces.

    • 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 InnoDB compressed tables, see Section 2.10.1.1, “Changes Affecting Upgrades to MySQL 8.0” for related upgrade implications.

    • Serialized Dictionary Information (SDI) is present in all InnoDB tablespace files except for temporary tablespace and undo tablespace files. SDI is serialized metadata for schema, 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 in JSON format.

      The inclusion of SDI data in tablespace files increases tablespace file size. An SDI record requires a single index page, which is 16k in size by default. However, SDI data is compressed when it is stored to reduce the storage footprint.

    • InnoDB supports atomic DDL, which ensures that DDL operations are either fully committed or rolled back, even if the server halts during the operation.

      DDL logs are written to the mysql.innodb_ddl_log data dictionary table. Enabling the innodb_print_ddl_logs configuration option prints DDL recovery logs to stderr.

      For more information, see Section 13.1.1, “Atomic Data Definition Statement Support”.

  • Character set support.  The default character set has changed from latin1 to utf8mb4. The utf8mb4 character set has several new collations, including utf8mb4_ja_0900_as_cs, the first Japanese language-specific collation available for Unicode in MySQL. For more information, see Section 10.1.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 calling JSON_UNQUOTE() on the result of JSON_EXTRACT().

      This is a refinement of the column path operator -> introduced in MySQL 5.7; col->>"$.path" is equivalent to JSON_UNQUOTE(col->"$.path"). The inline path operator can be used wherever you can use JSON_UNQUOTE(JSON_EXTRACT()), such SELECT column lists, WHERE and HAVING clauses, and ORDER BY and GROUP BY clauses. For more information, see the description of the operator, as well as Section 12.16.7, “JSON Path Syntax”.

    • Added two JSON aggregation functions JSON_ARRAYAGG() and JSON_OBJECTAGG(). JSON_ARRAYAGG() takes a column or expression as its argument, and aggregates the result as a single JSON array. The expression can evaluate to any MySQL data type; this does not have to be a JSON value. JSON_OBJECTAGG() takes two columns or expressions which it interprets as a key and a value; it returns the result as a single JSON object. For more information and examples, see Section 12.18, “Aggregate (GROUP BY) Functions”.

    • Added the JSON utility function JSON_PRETTY(), which outputs an existing JSON value 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.16.6, “JSON Utility Functions”.

    • When sorting JSON values in a query using ORDER 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 scalar INT or even BIGINT value 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 JSON column 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 any JSON column. For this optimization to be applied, the update must be applied using JSON_SET(), JSON_REPLACE(), or JSON_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() and JSON_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 type JSON after it has been partially updated using JSON_SET() or JSON_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, and NULL if the argument is NULL.

      For more information and examples, see Section 12.16.6, “JSON Utility Functions”.

      JSON_STORAGE_SIZE() and JSON_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 the last keyword and relative addressing, such that $[last] always selects the last (highest-numbered) element in the array and $[last-1] the next to last element. last and 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 null literal.

      • Each member having a key that exists in both objects, and whose value in the second object is not the JSON null literal.

      As part of this work, the JSON_MERGE() function has been renamed JSON_MERGE_PRESERVE(). JSON_MERGE() continues to be recognized as an alias for JSON_MERGE_PRESERVE() in MySQL 8.0, but is now deprecated and is subject to being removed in a future version of MySQL.

      For more information and examples, see Section 12.16.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 x is 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 JSON columns 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.

  • 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: DESC in 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”.

  • 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 WITH clause preceding SELECT statements and certain other statements. For more information, see Section 13.2.11.9, “WITH Syntax (Common Table Expressions)”.

  • 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(), and NTILE(). In addition, several existing aggregate functions now can be used as window functions; for example, SUM() and AVG(). For more information, see Section 12.19, “Window Functions”.

  • Internal temporary tables.  The TempTable storage engine replaces the MEMORY storage engine as the default engine for in-memory internal temporary tables. The TempTable storage engine provides efficient storage for VARCHAR and VARBINARY columns. The internal_tmp_mem_storage_engine session variable defines the storage engine for in-memory internal temporary tables. Permitted values are TempTable (the default) and MEMORY. The temptable_max_ram configuration option defines the maximum amount of memory that the TempTable storage 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_services system 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 BACKUP and UNLOCK INSTANCE syntax. The BACKUP_ADMIN privilege 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_options system variable to PARTIAL_JSON. For more information, see Partial Updates of JSON Values, as well as the description of binlog_row_value_options.

Features Deprecated in MySQL 8.0

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.

Features Removed in MySQL 8.0

The following items are obsolete and have been removed in MySQL 8.0. Where alternatives are shown, applications should be updated to use them.

  • The information_schema_stats configuration option, introduced in MySQL 8.0.0, was removed and replaced by information_schema_stats_expiry in MySQL 8.0.3.

    information_schema_stats_expiry defines an expiration setting for cached INFORMATION_SCHEMA table statistics. For more information, see Section 8.2.3, “Optimizing INFORMATION_SCHEMA Queries”.

  • Code related to obsoleted InnoDB system tables was removed in MySQL 8.0.3. INFORMATION_SCHEMA views based on InnoDB system tables were replaced by internal system views on data dictionary tables. Affected InnoDB INFORMATION_SCHEMA views were renamed:

    Table 1.1 Renamed InnoDB Information Schema Views

    Old NameNew Name
    INNODB_SYS_COLUMNSINNODB_COLUMNS
    INNODB_SYS_DATAFILESINNODB_DATAFILES
    INNODB_SYS_FIELDSINNODB_FIELDS
    INNODB_SYS_FOREIGNINNODB_FOREIGN
    INNODB_SYS_FOREIGN_COLSINNODB_FOREIGN_COLS
    INNODB_SYS_INDEXESINNODB_INDEXES
    INNODB_SYS_TABLESINNODB_TABLES
    INNODB_SYS_TABLESPACESINNODB_TABLESPACES
    INNODB_SYS_TABLESTATSINNODB_TABLESTATS
    INNODB_SYS_VIRTUALINNODB_VIRTUAL

    After upgrading to MySQL 8.0.3 or later, update any scripts that reference previous InnoDB INFORMATION_SCHEMA view names.

  • The query cache has been removed. Removal includes these items:

    These deprecated query cache items remain deprecated, but have no effect, and will be removed in a future MySQL release:

    • The SQL_CACHE and SQL_NO_CACHE SELECT modifiers.

    • The ndb_cache_check_time system variable.

    The have_query_cache system variable remains deprecated, always has a value of NO, 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-dir option and ignore_db_dirs system variables are extraneous and have been removed.

  • The tx_isolation and tx_read_only system variables have been removed. Use transaction_isolation and transaction_read_only instead.

  • The sync_frm system variable has been removed because .frm files have become obsolete.

  • The secure_auth system variable and --secure-auth client option have been removed. The MYSQL_SECURE_AUTH option for the mysql_options() C API function was removed.

  • The multi_range_count system variable has been removed.

  • The log_warnings system variable and --log-warnings server option have been removed. Use the log_error_verbosity system variable instead.

  • The global scope for the sql_log_bin system variable has been removed. sql_log_bin has session scope only, and applications that rely on accessing @@global.sql_log_bin should be adjusted.

  • The unused date_format, datetime_format, time_format, and max_tmp_tables system variables have been removed.

  • The EXTENDED and PARTITIONS keywords for the EXPLAIN statement have been removed. These keywords are unnecessary because their effect is always enabled.

  • These encryption-related items have been removed:

    In place of the removed encryption functions: For ENCRYPT(), consider using SHA2() instead for one-way hashing. For the others, consider using AES_ENCRYPT() and AES_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 with MBR if it performs an operation based on minimum bounding rectangles. In MySQL 8.0, the deprecated functions are removed to leave only the corresponding ST_ and MBR functions:

    • These functions are removed in favor of the MBR names: 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 of ST_Length().

  • The functions described in Section 12.15.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 \N as a synonym for NULL in SQL statements. Use NULL instead.

    This change does not affect text file import or export operations performed with LOAD DATA INFILE or SELECT ... INTO OUTFILE, for which NULL continues to be represented by \N. See Section 13.2.7, “LOAD DATA INFILE Syntax”.

  • PROCEDURE ANALYSE() syntax is removed.

  • The client-side --ssl and --ssl-verify-server-cert options have been removed. Use --ssl-mode=REQUIRED instead of --ssl=1 or --enable-ssl. Use --ssl-mode=DISABLED instead of --ssl=0, --skip-ssl, or --disable-ssl. Use --ssl-mode=VERIFY_IDENTITY instead of --ssl-verify-server-cert options. (The server-side --ssl option remains unchanged.)

    For the C API, MYSQL_OPT_SSL_ENFORCE and MYSQL_OPT_SSL_VERIFY_SERVER_CERT options for mysql_options() correspond to the client-side --ssl and --ssl-verify-server-cert options and have been removed. Use MYSQL_OPT_SSL_MODE with an option value of SSL_MODE_REQUIRED or SSL_MODE_VERIFY_IDENTITY instead.

  • The --temp-pool server option has been removed.

  • The --ignore-builtin-innodb server option and ignore_builtin_innodb system variable have been 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-names and --fix-table-names options for mysqlcheck, the UPGRADE DATA DIRECTORY NAME clause for the ALTER DATABASE statement, and the Com_alter_db_upgrade status variable have been 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 --initialize or --initialize-insecure option instead. In addition, the --bootstrap option for mysqld that was used by mysql_install_db has been removed, and the INSTALL_SCRIPTDIR CMake option that controlled the installation location for mysql_install_db has been removed.

  • The generic partitioning handler has been 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 --partition and --skip-partition options have been removed from the MySQL Server, and partitioning-related entries are no longer shown in the output of SHOW PLUGINS or in the INFORMATION_SCHEMA.PLUGINS table.

    Two MySQL storage engines currently provide native partitioning support—InnoDB and NDB; of these, only InnoDB is 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 as MyISAM) from MySQL 5.7 (or earlier) to MySQL 8.0 is not supported. There are two options for handling such a table:

    At least one of the two operations just listed must be performed for each partitioned non-InnoDB table 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 MyISAM that has no native partitioning handler. You can do this by performing either of the following:

    • Remove any references to partitioning from CREATE TABLE statements that use a value for the STORAGE ENGINE option other than InnoDB.

    • Specifying the storage engine as InnoDB, or allow InnoDB to 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 have been removed: GLOBAL_VARIABLES, SESSION_VARIABLES, GLOBAL_STATUS, SESSION_STATUS. Use the corresponding Performance Schema tables instead. See Section 26.11.13, “Performance Schema System Variable Tables”, and Section 26.11.14, “Performance Schema Status Variable Tables”. In addition, the show_compatibility_56 system variable has been removed. It was used in the transition period during which system and status variable information in INFORMATION_SCHEMA tables was moved to Performance Schema tables, and is no longer needed. These status variables have been 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_timers table has been removed, as has the TICK row in the performance_timers table.

  • The libmysqld embedded server library has been removed, along with:

    • The mysql_options() MYSQL_OPT_GUESS_CONNECTION, MYSQL_OPT_USE_EMBEDDED_CONNECTION, MYSQL_OPT_USE_REMOTE_CONNECTION, and MYSQL_SET_CLIENT_IP options

    • The mysql_config --libmysqld-libs, --embedded-libs, and --embedded options

    • The CMake WITH_EMBEDDED_SERVER, WITH_EMBEDDED_SHARED_LIBRARY, and INSTALL_SECURE_FILE_PRIV_EMBEDDEDDIR options

    • The (undocumented) mysql --server-arg option

    • The mysqltest --embedded-server, --server-arg, and --server-file options

    • The mysqltest_embedded and mysql_client_test_embedded test programs

  • The mysql_plugin utility has been removed. Alternatives include loading plugins at server startup using the --plugin-load or --plugin-load-add option, or at runtime using the INSTALL PLUGIN statement.

  • 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_SCHEMA INNODB_LOCKS and INNODB_LOCK_WAITS tables have been removed. Use the Performance Schema data_locks and data_lock_waits tables instead.

    Note

    In MySQL 5.7, the LOCK_TABLE column in the INNODB_LOCKS table and the locked_table column in the sys schema innodb_lock_waits and x$innodb_lock_waits views contain combined schema/table name values. In MySQL 8.0, the data_locks table and the sys schema 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”.

  • InnoDB no longer supports compressed temporary tables. When innodb_strict_mode is enabled (the default), CREATE TEMPORARY TABLE returns an error if ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE is specified. If innodb_strict_mode is disabled, warnings are issued and the temporary table is created using a non-compressed row format.

  • InnoDB no longer creates .isl files (InnoDB Symbolic Link files) when creating tablespace data files outside of the MySQL data directory. Redo log records are now used to locate remote tablespaces.

    With this change, moving a remote tablespace while the server is offline by manually modifying an .isl file is no longer supported.

  • The following InnoDB file format configuration parameters were removed:

    • innodb_file_format

    • innodb_file_format_check

    • innodb_file_format_max

    • innodb_large_prefix

    File format configuration parameters were necessary for creating tables compatible with earlier versions of InnoDB in MySQL 5.1. Now that MySQL 5.1 has reached the end of its product lifecycle, the parameters are no longer required.

    The FILE_FORMAT column was removed from the INNODB_TABLES and INNODB_TABLESPACES Information Schema tables.

  • The innodb_support_xa system variable, which enables support for two-phase commit in XA transactions, was removed. InnoDB support for two-phase commit in XA transactions is always enabled.

  • Support for DTrace has been removed.

  • The JSON_APPEND() function has been removed. Use JSON_ARRAY_APPEND() instead.


User Comments
Sign Up Login You must be logged in to post a comment.