lsy3993 opened a new issue, #18379:
URL: https://github.com/apache/doris/issues/18379

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/doris/issues?q=is%3Aissue) and found no 
similar issues.
   
   
   ### Version
   
   Doris version is : 1.2.1, but the master code has the same problem.
   
   ### What's Wrong?
   
   // 1. we start a es 
   
   // 2. create es catalog
   CREATE CATALOG es PROPERTIES (    "type"="es",    
"hosts"="http://127.0.0.1:29200";);
   
   // 3. show es table
   mysql> switch es;
   Query OK, 0 rows affected (0.17 sec)
   mysql> show tables;
   +----------------------+
   | Tables_in_default_db |
   +----------------------+
   | test1                |
   | test2                |
   | test2_20220808       |
   +----------------------+
   
   
   // 4. create a user 'aaa'
   create user aaa IDENTIFIED BY '123456';
   
   
   // 5. use 2 ways to grant
   // 5a. no default_db
   grant SELECT_PRIV on `es`.`test1` to 'aaa'@'%';
   
   // 5b. use default_db
   grant SELECT_PRIV on `es`.`default_db`.`test1` to 'aaa'@'%';
   
   
   // 6. the grant operation is succeed, but we can not query it
   
   mysql -uaaa -p123456   -h10.16.10.14 -P19035
   
   switch es;
   
   mysql> show tables;
   Empty set (0.00 sec)
   
   mysql> select * from es.test1;
   ERROR 1049 (42000): errCode = 2, detailMessage = Unknown database 
'default_cluster:es'
   
   mysql> select * from es.default_db.test1;
   ERROR 1105 (HY000): errCode = 2, detailMessage = Unexpected exception: 
java.lang.NullPointerException
   
   
   
   ### What You Expected?
   
   grant es table, and query it successfully
   
   ### How to Reproduce?
   
   _No response_
   
   ### Anything Else?
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to