-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
grant table privileges faild after upgrade from v4.0.14 to v6.0.0 #33588
Labels
affects-5.3
This bug affects 5.3.x versions.
affects-5.4
This bug affects the 5.4.x(LTS) versions.
affects-6.0
severity/critical
sig/sql-infra
SIG: SQL Infra
type/bug
The issue is confirmed as a bug.
type/regression
Comments
v4.0.14 MySQL root@127.0.0.1:(none)> use mysql;
You are now connected to database "mysql" as user "root"
Time: 0.001s
MySQL root@127.0.0.1:mysql> show create table mysql.tables_priv\G
***************************[ 1. row ]***************************
Table | tables_priv
Create Table | CREATE TABLE `tables_priv` (
`Host` char(60) NOT NULL,
`DB` char(64) NOT NULL,
`User` char(32) NOT NULL,
`Table_name` char(64) NOT NULL,
`Grantor` char(77) DEFAULT NULL,
`Timestamp` timestamp DEFAULT CURRENT_TIMESTAMP,
`Table_priv` set('Select','Insert','Update','Delete','Create','Drop','Grant','Index','Alter','Create View','Show View','Trigger','References') DEFAULT NULL,
`Column_priv` set('Select','Insert','Update') DEFAULT NULL,
PRIMARY KEY (`Host`,`DB`,`User`,`Table_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin
1 row in set
Time: 0.012s
MySQL root@127.0.0.1:mysql> show create table mysql.columns_priv\G
***************************[ 1. row ]***************************
Table | columns_priv
Create Table | CREATE TABLE `columns_priv` (
`Host` char(60) NOT NULL,
`DB` char(64) NOT NULL,
`User` char(32) NOT NULL,
`Table_name` char(64) NOT NULL,
`Column_name` char(64) NOT NULL,
`Timestamp` timestamp DEFAULT CURRENT_TIMESTAMP,
`Column_priv` set('Select','Insert','Update') DEFAULT NULL,
PRIMARY KEY (`Host`,`DB`,`User`,`Table_name`,`Column_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin
1 row in set
Time: 0.001s
MySQL root@127.0.0.1:mysql> select tidb_version()\G
***************************[ 1. row ]***************************
tidb_version() | Release Version: v4.0.14
Edition: Community
Git Commit Hash: 4f919b07f8f013e48521894c70cb69004f43c622
Git Branch: heads/refs/tags/v4.0.14
UTC Build Time: 2021-07-26 10:53:29
GoVersion: go1.16.5
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false v6.0.0 tidb git:(release-6.0) ✗ mycli -u root -h 172.16.4.131 -P 4100
MySQL root@172.16.4.131:(none)> show create table mysql.tables_priv\G
***************************[ 1. row ]***************************
Table | tables_priv
Create Table | CREATE TABLE `tables_priv` (
`Host` char(255) NOT NULL,
`DB` char(64) NOT NULL,
`User` char(32) NOT NULL,
`Table_name` char(64) NOT NULL,
`Grantor` char(77) DEFAULT NULL,
`Timestamp` timestamp DEFAULT CURRENT_TIMESTAMP,
`Table_priv` set('Select','Insert','Update','Delete','Create','Drop','Grant','Index','Alter','Create View','Show View','Trigger','References') DEFAULT NULL,
`Column_priv` set('Select','Insert','Update') DEFAULT NULL,
PRIMARY KEY (`Host`,`DB`,`User`,`Table_name`) /*T![clustered_index] NONCLUSTERED */
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin
1 row in set
Time: 0.053s
MySQL root@172.16.4.131:(none)> show create table mysql.columns_priv\G
***************************[ 1. row ]***************************
Table | columns_priv
Create Table | CREATE TABLE `columns_priv` (
`Host` char(255) NOT NULL,
`DB` char(64) NOT NULL,
`User` char(32) NOT NULL,
`Table_name` char(64) NOT NULL,
`Column_name` char(64) NOT NULL,
`Timestamp` timestamp DEFAULT CURRENT_TIMESTAMP,
`Column_priv` set('Select','Insert','Update','References') DEFAULT NULL,
PRIMARY KEY (`Host`,`DB`,`User`,`Table_name`,`Column_name`) /*T![clustered_index] NONCLUSTERED */
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin
1 row in set
Time: 0.049s
MySQL root@172.16.4.131:(none)> select tidb_version()\G
***************************[ 1. row ]***************************
tidb_version() | Release Version: v6.0.0
Edition: Community
Git Commit Hash: 6f28ac47fa43565d57e47fd23946389cac4e3fd2
Git Branch: heads/refs/tags/v6.0.0
UTC Build Time: 2022-03-29 07:07:30
GoVersion: go1.18
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false
|
This was referenced Mar 30, 2022
This was referenced Mar 30, 2022
ti-chi-bot
pushed a commit
that referenced
this issue
Mar 30, 2022
ti-chi-bot
pushed a commit
that referenced
this issue
Apr 27, 2022
ti-chi-bot
pushed a commit
that referenced
this issue
Jun 17, 2022
/type regression |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
affects-5.3
This bug affects 5.3.x versions.
affects-5.4
This bug affects the 5.4.x(LTS) versions.
affects-6.0
severity/critical
sig/sql-infra
SIG: SQL Infra
type/bug
The issue is confirmed as a bug.
type/regression
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
2. What did you expect to see? (Required)
grant successfully after upgrade
3. What did you see instead (Required)
grant failed and report error
4. What is your TiDB version? (Required)
The text was updated successfully, but these errors were encountered: