Skip to content

MySQL 8.0 Compatibility #7968

Open
Open

Description

@morgo

This issue is to track what is required to move from MySQL 5.7 to MySQL 8.0 compatibility.

See the complete list.

Essential

Nice to Have

8.0.11 and before

8.0.13

8.0.14

8.0.15

8.0.17

8.0.18

  • Create user/alter user/set password can generate random passwords for you.

8.0.19

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

8.0.22

8.0.23

8.0.28

8.0.30

8.0.31

8.0.34

8.0.35

8.0.36

8.0.37

Cleanup

Not Applicable

  • New Data Dictionary
  • Performance Schema enhancements
  • Replication enhancements
  • InnoDB enhancements
  • SET PERSIST (settings automatically save cluster-wide)
  • Log services (log_error_services etc)

Activity

  1. shenli commented on Oct 20, 2018

    @shenli
    Member

    @morgo Nice work! We will add it to our roadmap.
    /cc @winkyao @zz-jason @jackysp

  2. elvizlai commented on Aug 5, 2019

    @elvizlai
    Contributor

    is there any progress or plan about JSON_TABLE ?

  3. ghost added
    type/feature-requestCategorizes issue or PR as related to a new feature.
    on Aug 6, 2020
  4. morgo commented on Mar 30, 2021

    @morgo
    ContributorAuthor

    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.

  5. dveeden commented on Jul 9, 2021

    @dveeden
    Contributor

    User attributes might also be something to add

    mysql 8.0.22 > CREATE USER 'foo'@'%' IDENTIFIED BY 'affalfajljfjlk' COMMENT 'Support ticket #123';
    Query OK, 0 rows affected (0.01 sec)
    
    mysql 8.0.22 > CREATE USER 'bar'@'%' IDENTIFIED BY 'affalfajljfjlk' ATTRIBUTE '{"ticket": 123, "full_name": "John Doe"}';
    Query OK, 0 rows affected (0.03 sec)
    
    mysql 8.0.22 > select User_attributes from mysql.user where user in ('foo','bar');
    +--------------------------------------------------------+
    | User_attributes                                        |
    +--------------------------------------------------------+
    | {"metadata": {"ticket": 123, "full_name": "John Doe"}} |
    | {"metadata": {"comment": "Support ticket #123"}}       |
    +--------------------------------------------------------+
    2 rows in set (0.01 sec)
    
  6. dveeden commented on Sep 9, 2021

    @dveeden
    Contributor

    Should we add utf8mb4_0900_ai_ci to the list as well?

  7. yahonda commented on May 16, 2022

    @yahonda
    Member

    Would you consider to add #32118 to this list?
    I think it needs supported because it blocks using MySQL Connector/J 8.

  8. dveeden commented on May 16, 2022

    @dveeden
    Contributor

    Would you consider to add #32118 to this list? I think it needs supported because it blocks using MySQL Connector/J 8.

    I don't think that really should block Connector/J 8.0. However I think fixing that soon-ish would be good anyway.

  9. dveeden commented on Jul 12, 2022

    @dveeden
    Contributor

    Maybe we should add pingcap/dm#1950 to this list? or is this strictly for tidb-server?

  10. bb7133 commented on Aug 3, 2022

    @bb7133
    Member

    Would you consider to add #32118 to this list?

    @yahonda @dveeden , I think this is a 'nice to have' compatibility improvement. Personally I'm really looking forward to close it, thanks, Daniel!

  11. SunRunAway commented on Aug 22, 2022

    @SunRunAway
    Contributor

    Should the full implementation of Dynamic Privileges be essential?

  12. dveeden commented on Aug 30, 2022

    @dveeden
    Contributor

    Should the full implementation of Dynamic Privileges be essential?

    I don't think that is essential.

  13. jaggerwang commented on Nov 7, 2022

    @jaggerwang

    Multi-valued indexes on json arrays and descending indexes are exactly what we need, is there any plan for these two features?

  14. SunRunAway commented on Nov 7, 2022

    @SunRunAway
    Contributor

    @jaggerwang
    AFAIK, Multi-valued indexes are planned in early next year /cc @bb7133
    For descending indexes, could you describe more about your scenarios?

  15. jaggerwang commented on Nov 7, 2022

    @jaggerwang

    @SunRunAway For descending indexes, suppose we have a table named file to store a filesystem's meta info.

    Name Type Desc
    id int ID
    type int 0 for directory, 1 for file
    filename string File or directory name
    created_at datetime Create time

    We have the following sql to query file list order by filename ASC or DESC, directories should before files.

    # Order by filename ASC
    select * from file order by type asc, filename asc limit 100;
    
    # Order by filename DESC
    select * from file order by type asc, filename desc limit 100;

    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.

  16. dveeden commented on Nov 29, 2022

    @dveeden
    Contributor

    Improvements in password management are tracked in #38923

  17. yahonda commented on Mar 10, 2023

    @yahonda
    Member

    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. #42084

  18. yahonda commented on Dec 14, 2023

    @yahonda
    Member

    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

    • TiDB 7.5.0
    my:root@127.0.0.1:4000=> use test;
    USE
    my:root@127.0.0.1:4000=> CREATE TABLE t2 (b BLOB DEFAULT ('abc'));
    error: mysql: 1064: You have an error in your SQL syntax; check the manual that corresponds to your TiDB version for the right syntax to use line 1 column 38 near "'abc'));"
    my:root@127.0.0.1:4000=> select tidb_version();
                          tidb_version()
    -----------------------------------------------------------
     Release Version: v7.5.0                                  +
     Edition: Community                                       +
     Git Commit Hash: 069631e2ecfedc000ffb92c67207bea81380f020+
     Git Branch: heads/refs/tags/v7.5.0                       +
     UTC Build Time: 2023-11-24 08:41:52                      +
     GoVersion: go1.21.3                                      +
     Race Enabled: false                                      +
     Check Table Before Drop: false                           +
     Store: tikv
    (1 row)
    
    my:root@127.0.0.1:4000=>
    • MySQL 8.2.0
    mysql> CREATE TABLE t2 (b BLOB DEFAULT ('abc'));
    Query OK, 0 rows affected (0.12 sec)
    
    mysql> show create table t2;
    +-------+---------------------------------------------------------------------------------------------------------------------------+
    | Table | Create Table                                                                                                              |
    +-------+---------------------------------------------------------------------------------------------------------------------------+
    | t2    | CREATE TABLE `t2` (
      `b` blob DEFAULT (_utf8mb4'abc')
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci |
    +-------+---------------------------------------------------------------------------------------------------------------------------+
    1 row in set (0.00 sec)
    
    mysql> insert into t2 values;
    ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
    mysql> insert into t2 values();
    Query OK, 1 row affected (0.01 sec)
    
    mysql> select * from t2;
    +------------+
    | b          |
    +------------+
    | 0x616263   |
    +------------+
    1 row in set (0.00 sec)
    
    mysql> select version();
    +-----------+
    | version() |
    +-----------+
    | 8.2.0     |
    +-----------+
    1 row in set (0.01 sec)
    
    mysql>
  19. yahonda commented on Dec 14, 2023

    @yahonda
    Member

    It is not a big deal though utf8mb4_0900_bin collation 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

  20. dveeden commented on Dec 15, 2023

    @dveeden
    Contributor

    It is not a big deal though utf8mb4_0900_bin collation 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

    Yes indeed. I've fixed that.

  21. dveeden commented on Dec 15, 2023

    @dveeden
    Contributor

    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

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    compatibility-mysql80This is a compatibility issue with MySQL 8.0(but NOT 5.7)feature/reviewingThis feature request is reviewing by product managerstype/enhancementThe issue or PR belongs to an enhancement.type/feature-requestCategorizes issue or PR as related to a new feature.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions