Repository navigation
MySQL 8.0 Compatibility #7968
Copy link
Copy link
Open
Labels
compatibility-mysql80This is a compatibility issue with MySQL 8.0(but NOT 5.7)This is a compatibility issue with MySQL 8.0(but NOT 5.7)feature/reviewingThis feature request is reviewing by product managersThis feature request is reviewing by product managerstype/enhancementThe issue or PR belongs to an enhancement.The issue or PR belongs to an enhancement.type/feature-requestCategorizes issue or PR as related to a new feature.Categorizes issue or PR as related to a new feature.
Description
This issue is to track what is required to move from MySQL 5.7 to MySQL 8.0 compatibility.
See the complete list.
Essential
- Common Table Expressions (regular and recursive) support common table expression (CTE) #17472
- Window Functions Support window functions for TiDB #4807 docs/design: add proposal for window functions #8117
- utf8mb4 as default (*: change default charset and collation from 'utf8 utf8_bin' to 'utf8mb4 utf8mb4_bin' #7965)
- Role Based Authentication
- Support utf8mb4_0900_ai_ci when new collation is enabled Support utf8mb4_0900_ai_ci when new collation is enabled #37566
Nice to Have
8.0.11 and before
-
NOWAIT - Invisible Indexes UCP: Support Invisible Indexes #9246
-
SET_VARoptimizer hint Support Variable-Setting HintSET_VAR#18748 -
information_schema.keywordstable. Example here. Add information_schema.keywords #48801 -
SHUTDOWNcommand Support SHUTDOWN SQL command (and protocol cmd) #5046 - Improved Regular expression support support regular expression related functions #23881
- Maintain information about password history *: support password reuse policy #39162
- Resource Management Global Resource Quota Control #38825
-
MAX_EXECUTION_TIMEhint Feature Request: Support MAX_EXECUTION_TIME #7008 - Non-binary utf8mb4 collations, such as utf8mb4_0900_ai_ci https://github.com/pingcap/tidb/pull/33212/files
- helper functions uuid_to_bin and bin_to_uuid Support
bin-to-uuidanduuid-to-bin#20119 - support is_uuid function #30295
-
caching_sha2_passwordAuthentication Plugin Support for caching_sha2_password #9411 -
JSON_TABLEfunction + add remaining JSON functions that were backported to 5.7 -
SKIP LOCKEDSupportSKIP LOCKEDSyntax #18207 -
RESTARTcommand Support for 'RESTART' statement #26016 - Cleanup
SHOW VARIABLESoutput (remove query cache etc.) - Remove removed functions (insecure crypto etc)
- GIS Support Support for SPATIAL functions, data types and indexes #6347
- Support ascending or descending index #2519
- Descending Indexes +
GROUP BYno longer implyingORDER BY
- Descending Indexes +
- Functional Indexes, aka expression indexes in TiDB Make Expression Index generally available #18008
- Index Skip Scan
- support more clear combinations of UNION and INTO
- SQL Mode
TIME_TRUNCATE_FRACTIONALhttps://dev.mysql.com/doc/refman/8.0/en/sql-mode.html#sqlmode_time_truncate_fractional Support sql_mode TIME_TRUNCATE_FRACTIONAL #29406 - Support MySQL 8.0 bitwise behavior bitwise operations with binary args behavior changes by mysql 5.7 and 8.0 both #30637
- Support Partitioning management DDL
ALTER TABLE t REMOVE PARTITIONINGSupport ALTER TABLE t REMOVE PARTITIONING #42616 - Support Partitioning management DDL
ALTER TABLE t PARTITION BY ...Support ALTER TABLE t REMOVE PARTITIONING #42616 - New multi table
DROP TABLEbehavior When DROP TABLE with multiple tables listed, and one of them does not exist, TiDB still drops all the remaining tables #64218
8.0.13
- Option to require tables to have a primary key (8.0.13) Add support for sql_require_primary_key #28544
- Default values for
BLOB/TEXT+ default value as function (part 1:RAND()) Incompatible with MySQL 8.0 about create table with default expression #10377 - Default values for
BLOB/TEXT+ default value as function (part 2:UUID()) support specifying expr uuid() as column default value #33870 - Default values for
BLOB/TEXT+ default value as function (part 3) Default value for TEXT, BLOB or JSON columns #45506 - Require current password to be specified to change password (8.0.13)
8.0.14
- Support Lateral derived tables #40328
- Lateral derived tables Details
- Admin-only TCP/IP port
- Support RETAIN CURRENT PASSWORD aka dual passwords #60587
- Two passwords per account Details
8.0.15
- Check Constraints (from 8.0.15) https://github.com/pingcap/tidb/projects/46 Support
CHECKconstraint #41711
8.0.17
- utf8mb4_0900_bin TiDB should support collation
utf8mb4_0900_bin#46268 - multi-valued indexes on json arrays / json_overlaps() and member of() support multi-valued index #39592
- JSON schema validation with
JSON_SCHEMA_VALID()#52779
8.0.18
- Create user/alter user/set password can generate random passwords for you.
8.0.19
- Table constructors. i.e.
TABLE t ORDER BY c LIMIT 10 OFFSET 3- 8.0.19 Support VALUES and TABLE statements syntax #19934 - Make integer display with optional util: rewrite parser warings for integer display width #18775
- Lock accounts after too many failed logins Support Failed-Login Tracking and Temporary Account Locking #38938
- New syntax for INSERT ON DUPLICATE KEY UPDATE https://dev.mysql.com/worklog/task/?id=6312 Support MySQL 8.0.19 feature - aliases in the values and the set clause of insert into ... on duplicate key update #51650
- Row-value constructors. i.e.
VALUES ROW(1, "foo", 3.2)-8.0.19 VALUES statement is not supported #21486 - Support TIMESTAMP with explicit time zone Support TIMESTAMP with explicit time zone #51742
8.0.20
- New Optimizer hints: join_index, no_join_index, group_index, no_group_index, order_index, no_order_index, index, no_index.
8.0.21
- User attributes Support commenting in
CREATE USERandALTER USERstatements #38172 - JSON_VALUE function (8.0.21)
-
CREATE TABLE ... START TRANSACTIONsupport mysql8.0 create table with start transaction feature #52477
8.0.22
8.0.23
8.0.28
- Deprecated TLSv1.0 and TLSv1.1 The minimum TLS version should comply with IETF RFC 8996 #36036
- Support wider range of UNIX_TIMESTAMP Support wider range of UNIX_TIMESTAMP, as MySQL 8.0.28 #30133
8.0.30
- Generated Invisible Primary Key #59253
- KDF, salt and iterations support for
AES_ENCRYPT()andAES_DECRYPT().
8.0.31
-
INTERSECTSupportEXCEPT/INTERSECTOperators #18031 -
EXCEPTSupportEXCEPT/INTERSECTOperators #18031 - Support for EXCEPT ALL #66392
8.0.34
-
CURRENT_USER()as default value for VARCHAR and TEXT columns in CREATE TABLE statements Default value for TEXT, BLOB or JSON columns #45506
8.0.35
8.0.36
8.0.37
Cleanup
- Remove variables that have been removed.
- Remove features that have been removed (this will require several sub-tasks)
- Add deprecation warnings for deprecated variables
- Add deprecation warnings for deprecated features
Not Applicable
- New Data Dictionary
- Performance Schema enhancements
- Replication enhancements
- InnoDB enhancements
SET PERSIST(settings automatically save cluster-wide)- Log services (
log_error_servicesetc)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
compatibility-mysql80This is a compatibility issue with MySQL 8.0(but NOT 5.7)This is a compatibility issue with MySQL 8.0(but NOT 5.7)feature/reviewingThis feature request is reviewing by product managersThis feature request is reviewing by product managerstype/enhancementThe issue or PR belongs to an enhancement.The issue or PR belongs to an enhancement.type/feature-requestCategorizes issue or PR as related to a new feature.Categorizes issue or PR as related to a new feature.
Activity
shenli commentedon Oct 20, 2018
@morgo Nice work! We will add it to our roadmap.
/cc @winkyao @zz-jason @jackysp
elvizlai commentedon Aug 5, 2019
is there any progress or plan about
JSON_TABLE?morgo commentedon Mar 30, 2021
I moved skip-locked to the essential list. At the time this list was created, the default was optimistic locking. But since it is now pessmistic, it is highly desirable.
dveeden commentedon Jul 9, 2021
User attributes might also be something to add
dveeden commentedon Sep 9, 2021
Should we add
utf8mb4_0900_ai_cito the list as well?parser: add collations from MySQL 8.0 (#33212)
yahonda commentedon May 16, 2022
Would you consider to add #32118 to this list?
I think it needs supported because it blocks using MySQL Connector/J 8.
dveeden commentedon May 16, 2022
I don't think that really should block Connector/J 8.0. However I think fixing that soon-ish would be good anyway.
dveeden commentedon Jul 12, 2022
Maybe we should add pingcap/dm#1950 to this list? or is this strictly for tidb-server?
bb7133 commentedon Aug 3, 2022
@yahonda @dveeden , I think this is a 'nice to have' compatibility improvement. Personally I'm really looking forward to close it, thanks, Daniel!
SunRunAway commentedon Aug 22, 2022
Should the full implementation of Dynamic Privileges be essential?
dveeden commentedon Aug 30, 2022
I don't think that is essential.
jaggerwang commentedon Nov 7, 2022
Multi-valued indexes on json arrays and descending indexes are exactly what we need, is there any plan for these two features?
SunRunAway commentedon Nov 7, 2022
@jaggerwang
AFAIK, Multi-valued indexes are planned in early next year /cc @bb7133
For descending indexes, could you describe more about your scenarios?
jaggerwang commentedon Nov 7, 2022
@SunRunAway For descending indexes, suppose we have a table named
fileto store a filesystem's meta info.We have the following sql to query file list order by filename ASC or DESC, directories should before files.
To accelerate query, we created an union index
(type, filename), but the index is not working well when order by filename DESC, about 2 to 3 times slower.dveeden commentedon Nov 29, 2022
Improvements in password management are tracked in #38923
yahonda commentedon Mar 10, 2023
I've found
last_insert_id()behavior differences between MySQL 5.7 and 8.0. TiDB 6.6.0 behaves same as MySQL 5.7. #42084parser: Update ServerVersion to 8.0.11 (#42560)
*: Update version in version_comment (#43425)
parser: Update ServerVersion to 8.0.11 (#46155)
yahonda commentedon Dec 14, 2023
It looks like TiDB does not support this feature available since MySQL 8.0.13 yet. This checkbox is checked somehow.
Default values for BLOB/TEXT + default value as function (8.0.13) #10377
This example comes from the https://dev.mysql.com/doc/refman/8.0/en/data-type-defaults.html
yahonda commentedon Dec 14, 2023
It is not a big deal though
utf8mb4_0900_bincollation has been introduced since MySQL 8.0.17. Here it is listed as "8.0.11 and before"https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-17.html
mysql/mysql-server@c7934d119aeb
dveeden commentedon Dec 15, 2023
Yes indeed. I've fixed that.
dveeden commentedon Dec 15, 2023
Yes it looks like this was marked as completed after only part of this had been implemented. I think #45506 covers the second part. I've update the description to reflect this.
privilege: quote account names with backticks in SHOW output (#70774)