-
Notifications
You must be signed in to change notification settings - Fork 6k
Closed
Labels
affects-5.0This bug affects 5.0.x versions.This bug affects 5.0.x versions.affects-5.1This bug affects 5.1.x versions.This bug affects 5.1.x versions.affects-5.2This bug affects 5.2.x versions.This bug affects 5.2.x versions.affects-5.3This bug affects 5.3.x versions.This bug affects 5.3.x versions.affects-5.4This bug affects the 5.4.x(LTS) versions.This bug affects the 5.4.x(LTS) versions.good first issueDenotes an issue ready for a new contributor, according to the "help wanted" guidelines.Denotes an issue ready for a new contributor, according to the "help wanted" guidelines.help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.severity/majorsig/sql-infraSIG: SQL InfraSIG: SQL Infratype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.
Description
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
CREATE DATABASE IF NOT EXISTS tispark_test
;
CREATE TABLE IF NOT EXISTS tispark_test
.table_test
(i int, s varchar(128));
CREATE ROLE IF NOT EXISTS 'test_read', 'test_write';
GRANT SELECT ON tispark_test
.table_test
TO 'test_read'@'%';
GRANT UPDATE ON tispark_test
.table_test
TO 'test_write'@'%';
CREATE USER IF NOT EXISTS 'tispark_unit_test_user' IDENTIFIED BY '';
GRANT 'test_read','test_write' TO 'tispark_unit_test_user'@'%';
SHOW GRANTS FOR 'tispark_unit_test_user'@'%' USING 'test_read','test_write';
2. What did you expect to see? (Required)
3. What did you see instead (Required)
Actually, if I use command SET ROLE 'test_read', 'test_write'
, it still can select rows from table tispark_test
.table_test
. So I think it's a bug for SHOW GRANTS
4. What is your TiDB version? (Required)
Metadata
Metadata
Assignees
Labels
affects-5.0This bug affects 5.0.x versions.This bug affects 5.0.x versions.affects-5.1This bug affects 5.1.x versions.This bug affects 5.1.x versions.affects-5.2This bug affects 5.2.x versions.This bug affects 5.2.x versions.affects-5.3This bug affects 5.3.x versions.This bug affects 5.3.x versions.affects-5.4This bug affects the 5.4.x(LTS) versions.This bug affects the 5.4.x(LTS) versions.good first issueDenotes an issue ready for a new contributor, according to the "help wanted" guidelines.Denotes an issue ready for a new contributor, according to the "help wanted" guidelines.help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.severity/majorsig/sql-infraSIG: SQL InfraSIG: SQL Infratype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.