赞
踩
文档:MySQL 8.0版本日志.note
链接:http://note.youdao.com/noteshare?id=a8b71e5c978fabb4f204773562908f63&sub=45B9DC453C3C4E9EA23522F33D8C4462
参考MySQL :: MySQL 8.0 Release Notes :: Changes in MySQL 8.0.0 (2016-09-12, Development Milestone)
账户管理
授权表存储引擎变化时账户管理语句行为变化的基础。之前,管理多个用户的账户管理语句可能对一些用户生效,对一些用户无效。现在,每个语句都是事务型的,要么对所有用户都生效,要么一旦有任何报错都无效回滚。如果语句执行成功则写入二进制日志,否则不写入日志,回滚而不产生任何影响。上述行为适用于如下语句: ALTER USER, CREATE ROLE, CREATE USER, DROP ROLE, DROP USER, GRANT, RENAME USER, REVOKE.(SET PASSWORD没有被列出,是因为它应用于至多一个用户而且实际上已经是事务性的) 这种行为变化的一个副作用是,当在MySQL 8.0从属服务器上复制时,MySQL 5.7主服务器上部分完成的帐户管理语句会失败。
C API
libmysqlclient 共享库主版本号从 20 (被 MySQL 5.7使用) 增长为 21(被MySQL 8.0使用).
Character Set Support
编译
组件
MySQL服务器现在包含一个基于组件的基础架构来提升服务器的扩展性:
配置
为了提供显示每个系统变量最近的配置信息,Performance Schema现在有一个variables_info表,其中列出了每个系统变量及其值的来源。参见Performance Schema variables_info Table.。
如果从早期版本升级到这个MySQL版本,则必须运行mysql_upgrade(并重新启动服务器),以便将此更改合并到 Performance Schema中。
版本1测试套件代码以前位于MySQL源发行版的mysql-test/lib/v1目录中。这段代码使用了mysql_install_db并已被删除。不再支持MYSQL_INSTALL_DB环境变量和MTR_VERSION环境变量的值1。
数据字典
不兼容的更改
数据字典的主要变更是
1)整合了元数据文件(事务性)和非事务性系统表,利用缓存将其缓存在内存,通过LRU算法维护
2)INFORMATION_SCHEMA不再是表,而是基于底层数据字典表的视图
3)底层数据字典缓存到内存而不是临时表空间,且其上的索引可以利用优化器高效查询计划提高查询效率。
MySQL服务器现在合并了一个全局数据字典,其中包含事务表中关于数据库对象的信息。在以前的MySQL版本中,字典数据存储在元数据文件和非事务性系统表中。
下面的列表简要描述了此更改的主要影响:
类似地,以前存储在. trg和. trn文件中的触发器元数据存储在数据字典表中,这些文件不再存在。
新的内部数据字典api使服务器、内部存储引擎和插件能够访问和存储MySQL数据字典中的数据。引入内 部数据字典api来处理模式、表空间、表空间文件、表、分区表、表分区数据、触发器、存储例程、事件、表对 象、视图、字符集和排序。
通过此更改,用于CREATE TRIGGER 和 DROP TRIGGER 操作的数据字典更新和二进制日志写入将组合到单个原子事务中。
一些INFORMATION_SCHEMA表被完全重新实现为数据字典表的视图:
CHARACTER_SETS COLLATIONS COLLATION_CHARACTER_SET_APPLICABILITY COLUMNS KEY_COLUMN_USAGE SCHEMATA STATISTICS TABLES TABLE_CONSTRAINTS VIEWS
这些表上的查询现在更有效,因为它们从数据字典表获得信息,而不是通过其他更慢的方法。特别是,对于每个作为数据字典表视图的INFORMATION_SCHEMA表:
前面的改进还适用于显示相应的作为数据字典表上的视图的INFORMATION_SCHEMA表信息的SHOW语句。例如,SHOW DATABASES显示与SCHEMATA表相同的信息。
对于检索表统计信息的INFORMATION_SCHEMA查询,服务器现在可以使用INFORMATION_SCHEMA表中缓存的统计信息,或者直接从存储引擎获取最新的统计信息。information_schema_stats系统变量控制服务器使用的统计信息源。
受影响的INFORMATION_SCHEMA表统计列包括:
STATISTICS.CARDINALITY TABLES.AUTO_INCREMENT TABLES.AVG_ROW_LENGTH TABLES.CHECKSUM TABLES.CHECK_TIME TABLES.CREATE_TIME TABLES.DATA_FREE TABLES.DATA_LENGTH TABLES.INDEX_LENGTH TABLES.MAX_DATA_LENGTH TABLES.TABLE_ROWS TABLES.UPDATE_TIME
有关更多信息,请参见Optimizing INFORMATION_SCHEMA Queries.
foreign_keys和foreign_key_column_usage现在存储外键信息。获取外键信息的标准SQL方法是使用REFERENTIAL_CONSTRAINTS 和KEY_COLUMN_USAGE表;这些表现在通过作为foreign_keys、foreign_key_column_usage和其他数据字典表的视图实现。
对于某些外键错误,服务器现在会生成更合适、更有用的错误消息。
注意:
不兼容性:以前,MySQL支持长度超过64个字符的外键名。按照SQL标准,存储在foreign_keys和foreign_key_column_usage表中的外键名最多为64个字符,因此不再允许使用更长的外键名。
以前,创建包含非法字符的stored routines会产生警告,现在是一个错误。
(Bug #80481, Bug #22811659)
Data Type Notes
位函数支持大于64位的参数和返回值。
Permitting binary string arguments for bit functions and operators makes it easier not only to manipulate larger values, but to perform bit operations not easily done previously on certain types of data, such as UUID and IPv6 values. For examples, see Bit Functions and Operators.
An implication of this change in behavior is that bit operations on binary string arguments might produce a different result in MySQL 8.0 than in 5.7. For information about how to prepare in MySQL 5.7 for potential incompatibilities between MySQL 5.7 and 8.0, see Bit Functions and Operators, in MySQL 5.7 Reference Manual.
Doxygen Notes
源码的内部文档已经更新位采用Doxygen归档。
It is also possible to generate the Doxygen content locally from a MySQL source distribution using the instructions atGenerating MySQL Doxygen Documentation Content.
Optimizer Notes
SELECT /*+ MERGE(dt) */ * FROM (SELECT * FROM t1) AS dt; SELECT /*+ NO_MERGE(dt) */ * FROM (SELECT * FROM t1) AS dt;
For more information, see Optimizer Hints. (Bug #79554, Bug #22328100)
To control whether an index is invisible explicitly for a new index, use a VISIBLE or INVISIBLE keyword as part of the index definition for CREATE TABLE, CREATE INDEX, or ALTER TABLE. To alter the invisibility of an existing index, use aVISIBLE or INVISIBLE keyword with the ALTER TABLE ... ALTER INDEX operation. For more information, see Invisible Indexes.
Packaging Notes(略)
Parser Notes
(SELECT 1 UNION SELECT 1) UNION SELECT 1;
(Bug #11746363, Bug #25734)
Performance Schema Notes
For more information, see Error Summary Tables
In consequence of the preceding changes, two server error symbols were renamed:ER_CANT_SET_ENFORCE_GTID_CONSISTENCY_ON_WITH_ONGOING_GTID_VIOLATING_TRANSACTIONS is nowER_CANT_ENFORCE_GTID_CONSISTENCY_WITH_ONGOING_GTID_VIOLATING_TX andER_SET_ENFORCE_GTID_CONSISTENCY_WARN_WITH_ONGOING_GTID_VIOLATING_TRANSACTIONS is nowER_ENFORCE_GTID_CONSISTENCY_WARN_WITH_ONGOING_GTID_VIOLATING_TX.
Security Notes
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.
Spatial Data Support(略)
Test Suite Notes(略)
X Plugin Notes(略)
Functionality Added or Changed
In order to support partitioning of a given table, the storage engine used for the table must now provide its own (“native”) partitioning handler. InnoDB is the only storage engine supported in MySQL 8.0 which includes a native partitioning handler. An attempt to create partitioned tables in MySQL 8.0 using any other storage engine fails. (The NDB storage engine used by MySQL NDB Cluster also provides its own partitioning handler, but is currently not supported by MySQL 8.0.)
Effects on 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 upgrading such a table to be compatible with MySQL 8.0, listed here:
For information about converting MyISAM tables to InnoDB, see Converting Tables from MyISAM to InnoDB.
An analogous situation is met when importing databases from a dump file that was created in MySQL 5.7 or earlier usingmysqldump into a MySQL 8.0 server, due to the fact that table creation statements that would result in a partitioned table using a storage engine without such support fail with an error in MySQL 8.0. For this reason you must ensure that any statements in the dump file creating partitioned tables do not also specify an unsupported storage engine. You can do this either by removing any references to partitioning from CREATE TABLE statements that use a value for the STORAGE ENGINE option other than InnoDB, or by specifying the storage engine as InnoDB (or allowing InnoDB to be used by default).
For more information, see Partitioning Limitations Relating to Storage Engines.
File format configuration options 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, these options are no longer required.
The FILE_FORMAT column was removed from the INNODB_SYS_TABLES and INNODB_SYS_TABLESPACES Information Schema tables.
If there is full-text index on the table being altered, full-text data is inserted into full-text auxiliary tables as the ALTER TABLE ALGORITHM=COPY operation inserts rows into the new, uncommitted table. Previously, full-text data was only processed on transaction commit. (Bug #17479594)
With this change, moving a remote tablespace while the server is offline by manually modifying an .isl file is not supported.
With this change, all temporary tables are created in the shared temporary tablespace, ibtmp1.
The PER_TABLE_TABLESPACE and IS_COMPRESSED columns were removed from theINFORMATION_SCHEMA.INNODB_TEMP_TABLE_INFO.
On Windows, the innodb_flush_method setting no longer affects the innodb_use_native_aio setting. There are now two possible settings for innodb_flush_method on Windows, unbuffered (unbuffered I/O) and normal (buffered I/O). With this change, you can enable asynchronous I/O with buffered I/O, which is a new combination (innodb_use_native_aio=ONand innodb_flush_method=normal). The async_unbuffered setting was removed.
You can now set innodb_flush_method and innodb_change_buffering configuration options using numeric values.
Offline relocation of a file-per-table tablespace data file created outside of the MySQL data directory by modifying the.isl file is no longer supported.
For more information, see AUTO_INCREMENT Handling in InnoDB, and InnoDB AUTO_INCREMENT Counter Initialization. (Bug #199, Bug #13726455)
(Bug #18194384)
The ->> operator can be used in SQL statements wherever JSON_UNQUOTE(JSON_EXTRACT()) would be allowed. This includes (but is not limited to) SELECT lists, WHERE and HAVING clauses, and ORDER BY and GROUP BY clauses.
For more information, see Functions That Search JSON Values, and JSON Path Syntax. (Bug #78736, Bug #21980346)
(Bug #22884886)
For more information about these functions, see Miscellaneous Functions
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.
Bugs Fixed(略)
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。