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 privilege check compatibility, error is much too simple. #9191

Closed
AndrewDi opened this issue Jan 26, 2019 · 2 comments
Closed

MySQL privilege check compatibility, error is much too simple. #9191

AndrewDi opened this issue Jan 26, 2019 · 2 comments

Comments

@AndrewDi
Copy link
Contributor

Bug Report

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?
    If possible, provide a recipe for reproducing the error.
    Create a user testuser with CREATE privilege, but without SELECT privilege.
mysql> create table t11(a int,b int);                                                                                                                                                                    
Query OK, 0 rows affected (0.63 sec)                                                                                                                                                                     
                                                                                                                                                                                                         
mysql> select * from t11;
  1. What did you expect to see?
mysql> select * from t11;
ERROR 1142 (42000): SELECT command denied to user 'testuser'@'localhost' for table 't11' 
  1. What did you see instead?
mysql> select * from t11;                                                                                                                                                                                 
ERROR 1105 (HY000): privilege check fail
  1. What version of TiDB are you using (tidb-server -V or run select tidb_version(); on TiDB)?
    3.0 Beta
@AndrewDi AndrewDi changed the title MySQL privilege check compatibility, much too simple error return. MySQL privilege check compatibility, error is much too simple. Jan 26, 2019
@morgo
Copy link
Contributor

morgo commented Jan 26, 2019

This might be a sub-task of #8946

Context: In #8855 visitInfo was extended to allow a custom error to be attached. #8946 tracks cases where a nil error is still attached, which generates ERROR 1105 (HY000): privilege check fail.

@AndrewDi
Copy link
Contributor Author

Already fix...close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants