grant user privilege use "_" Wildcard characters which cover the specially user privilege
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Bug Report
Please answer these questions before submitting your issue. Thanks!
### 1. Minimal reproduce step (Required)
open a session A execute below sql:
CREATE DATABASE testDB_db01;
CREATE DATABASE testDB_db02;
CREATE DATABASE testDB1;
CREATE USER 'testUser'@'%' IDENTIFIED BY 'pingcap';
FLUSH PRIVILEGES;
GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER,INDEX ON testDB_db01.* TO 'testUser'@'%';
open another session B use user testUser execute below sql:
user testDB_db01;
CREATE TABLE user_1(id INT);
INSERT INTO user_1 VALUES(2);
comeback to session A execute below sql:
GRANT SELECT ON `testDB\_%`.* TO 'testUser'@'%';
comeback to session B execute below sql:
user testDB_db01;
CREATE TABLE user_2(id INT);
INSERT INTO user_1 VALUES(3);
### 2. What did you expect to see? (Required)
these sqls execute in the session B all return successfully;
### 3. What did you see instead (Required)
after execute "GRANT SELECT ON `testDB\_%`.* TO 'testUser'@'%';" this sql ,these sqls execute in the session B return fail;
### 4. What is your TiDB version? (Required)
5.4.3 and 6.5.0
Contributor guide
Assessment
This issue has not been assessed yet.