Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MySQL 8.0 Compatibility #7968

Open
34 of 69 tasks
morgo opened this issue Oct 19, 2018 · 20 comments
Open
34 of 69 tasks

MySQL 8.0 Compatibility #7968

morgo opened this issue Oct 19, 2018 · 20 comments
Labels
compatibility-mysql8 This is a compatibility issue with MySQL 8.0(but NOT 5.7) feature/reviewing This feature request is reviewing by product managers type/enhancement The issue or PR belongs to an enhancement. type/feature-request Categorizes issue or PR as related to a new feature.

Comments

@morgo
Copy link
Contributor

morgo commented Oct 19, 2018

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)
@morgo morgo added the type/enhancement The issue or PR belongs to an enhancement. label Oct 19, 2018
@shenli
Copy link
Member

shenli commented Oct 20, 2018

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

@elvizlai
Copy link
Contributor

elvizlai commented Aug 5, 2019

is there any progress or plan about JSON_TABLE ?

@ghost ghost added the type/feature-request Categorizes issue or PR as related to a new feature. label Aug 6, 2020
@zz-jason zz-jason added the feature/reviewing This feature request is reviewing by product managers label Aug 10, 2020
@morgo
Copy link
Contributor Author

morgo commented 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
Copy link
Contributor

dveeden commented Jul 9, 2021

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)

@dveeden
Copy link
Contributor

dveeden commented Sep 9, 2021

Should we add utf8mb4_0900_ai_ci to the list as well?

@yahonda
Copy link
Member

yahonda commented 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
Copy link
Contributor

dveeden commented 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.

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

@dveeden
Copy link
Contributor

dveeden commented Jul 12, 2022

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

@bb7133
Copy link
Member

bb7133 commented Aug 3, 2022

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!

@SunRunAway
Copy link
Contributor

Should the full implementation of Dynamic Privileges be essential?

@dveeden
Copy link
Contributor

dveeden commented Aug 30, 2022

Should the full implementation of Dynamic Privileges be essential?

I don't think that is essential.

@jaggerwang
Copy link

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

@SunRunAway
Copy link
Contributor

SunRunAway commented 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
Copy link

jaggerwang commented Nov 7, 2022

@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.

@dveeden
Copy link
Contributor

dveeden commented Nov 29, 2022

Improvements in password management are tracked in #38923

@yahonda
Copy link
Member

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

@yahonda
Copy link
Member

yahonda commented 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

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

@yahonda
Copy link
Member

yahonda commented Dec 14, 2023

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

@dveeden
Copy link
Contributor

dveeden commented Dec 15, 2023

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.

@dveeden
Copy link
Contributor

dveeden commented Dec 15, 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

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
Labels
compatibility-mysql8 This is a compatibility issue with MySQL 8.0(but NOT 5.7) feature/reviewing This feature request is reviewing by product managers type/enhancement The issue or PR belongs to an enhancement. type/feature-request Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

9 participants