tidb icon indicating copy to clipboard operation
tidb copied to clipboard

[bug] Inconsistent behavior of grant command between MySQL and TiDB

Open mengjinglei opened this issue 9 years ago • 4 comments

  1. What did you do? when trying to create different user and different databases, I encountered a inconsistent behavior of grant command between MySQL and TiDB.

To reproduce this, follow the steps below

  1. create database db123;
  2. grant select,insert,delete on db123.* to '123' identified by 'test';
  3. login with 123:test
  4. show databases; there are two databases information_schema, db123
  5. use information_schema; select * from tables;

tables that not belongs to user 123 appears in the result of last command;

while MySQL behaves normal, user 123 cannot see anything belongs to others.

  1. What version of TiDB are you using (tidb-server -V)?

Git Commit Hash: 37d8ea3e38209d0f49a0f46c649220f8877b9fd8 UTC Build Time: 2017-07-19 02:19:35

mengjinglei avatar Aug 24 '17 09:08 mengjinglei

@tiancaiamao PTAL

shenli avatar Aug 24 '17 09:08 shenli

Thanks for your feedback! We'll fix it later. @mengjinglei

tiancaiamao avatar Aug 24 '17 10:08 tiancaiamao

This was fixed in https://github.com/pingcap/tidb/pull/6426

I believe this issue can be closed :-)

morgo avatar Sep 15 '18 01:09 morgo

Closing since this is already fixed.

zhexuany avatar Sep 15 '18 02:09 zhexuany