You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "Yulei-Yang (via GitHub)" <gi...@apache.org> on 2023/03/09 12:41:08 UTC

[GitHub] [doris] Yulei-Yang opened a new pull request, #17612: [fix](priv) fix bug of grant priv on ctl.db.* not work

Yulei-Yang opened a new pull request, #17612:
URL: https://github.com/apache/doris/pull/17612

   currently, when use grant xxx_priv on ctl.db.* to user_a, it does not work. When user_a switch to ctl, he cannot see or use any database.
   
   # Proposed changes
   
   Issue Number: close #xxx
   
   ## Problem summary
   
   Describe your changes.
   
   ## Checklist(Required)
   
   * [ ] Does it affect the original behavior
   * [ ] Has unit tests been added
   * [ ] Has document been added or modified
   * [ ] Does it need to update dependencies
   * [x] Is this PR support rollback (If NO, please explain WHY)
   
   ## Further comments
   
   If this is a relatively large or complex change, kick off the discussion at [dev@doris.apache.org](mailto:dev@doris.apache.org) by explaining why you chose the solution you did and what alternatives you considered, etc...
   
   


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] Yulei-Yang commented on pull request #17612: [fix](priv) fix bug of grant priv on ctl.db.* not work

Posted by "Yulei-Yang (via GitHub)" <gi...@apache.org>.
Yulei-Yang commented on PR #17612:
URL: https://github.com/apache/doris/pull/17612#issuecomment-1463395817

   run feut


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] github-actions[bot] commented on pull request #17612: [fix](priv) fix bug of grant priv on ctl.db.* not work

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #17612:
URL: https://github.com/apache/doris/pull/17612#issuecomment-1461874271

   PR approved by anyone and no changes requested.


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] Yulei-Yang commented on pull request #17612: [fix](priv) fix bug of grant priv on ctl.db.* not work

Posted by "Yulei-Yang (via GitHub)" <gi...@apache.org>.
Yulei-Yang commented on PR #17612:
URL: https://github.com/apache/doris/pull/17612#issuecomment-1463113732

   run p0


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] Yulei-Yang commented on pull request #17612: [fix](priv) fix bug of grant priv on ctl.db.* not work

Posted by "Yulei-Yang (via GitHub)" <gi...@apache.org>.
Yulei-Yang commented on PR #17612:
URL: https://github.com/apache/doris/pull/17612#issuecomment-1461955413

   run p0


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] morningman merged pull request #17612: [fix](priv) fix bug of grant priv on ctl.db.* not work

Posted by "morningman (via GitHub)" <gi...@apache.org>.
morningman merged PR #17612:
URL: https://github.com/apache/doris/pull/17612


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] Yulei-Yang commented on pull request #17612: [fix](priv) fix bug of grant priv on ctl.db.* not available

Posted by "Yulei-Yang (via GitHub)" <gi...@apache.org>.
Yulei-Yang commented on PR #17612:
URL: https://github.com/apache/doris/pull/17612#issuecomment-1461664080

   ./run buildall


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] Yulei-Yang commented on pull request #17612: [fix](priv) fix bug of grant priv on ctl.db.* not work

Posted by "Yulei-Yang (via GitHub)" <gi...@apache.org>.
Yulei-Yang commented on PR #17612:
URL: https://github.com/apache/doris/pull/17612#issuecomment-1461986996

   run p0


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] Yulei-Yang commented on pull request #17612: [fix](priv) fix bug of grant priv on ctl.db.* not work

Posted by "Yulei-Yang (via GitHub)" <gi...@apache.org>.
Yulei-Yang commented on PR #17612:
URL: https://github.com/apache/doris/pull/17612#issuecomment-1463379754

   run beut


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] lide-reed commented on a diff in pull request #17612: [fix](priv) fix bug of grant priv on ctl.db.* not available

Posted by "lide-reed (via GitHub)" <gi...@apache.org>.
lide-reed commented on code in PR #17612:
URL: https://github.com/apache/doris/pull/17612#discussion_r1130725775


##########
fe/fe-core/src/main/java/org/apache/doris/mysql/privilege/DbPrivTable.java:
##########
@@ -42,7 +45,8 @@ public void getPrivs(String ctl, String db, PrivBitSet savedPrivs) {
             }
 
             // check db
-            if (!dbPrivEntry.isAnyDb() && !dbPrivEntry.getDbPattern().match(db)) {
+            if (!dbPrivEntry.isAnyDb() && !dbPrivEntry.getDbPattern().match(db) && !dbPrivEntry.getDbPattern()

Review Comment:
   Can you add a comment



-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] Yulei-Yang commented on pull request #17612: [fix](priv) fix bug of grant priv on ctl.db.* not available

Posted by "Yulei-Yang (via GitHub)" <gi...@apache.org>.
Yulei-Yang commented on PR #17612:
URL: https://github.com/apache/doris/pull/17612#issuecomment-1461764499

   run p0


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] github-actions[bot] commented on pull request #17612: [fix](priv) fix bug of grant priv on ctl.db.* not work

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #17612:
URL: https://github.com/apache/doris/pull/17612#issuecomment-1461874173

   PR approved by at least one committer and no changes requested.


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] Yulei-Yang commented on pull request #17612: [fix](priv) fix bug of grant priv on ctl.db.* not work

Posted by "Yulei-Yang (via GitHub)" <gi...@apache.org>.
Yulei-Yang commented on PR #17612:
URL: https://github.com/apache/doris/pull/17612#issuecomment-1463379916

   run feut


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] Yulei-Yang commented on pull request #17612: [fix](priv) fix bug of grant priv on ctl.db.* not work

Posted by "Yulei-Yang (via GitHub)" <gi...@apache.org>.
Yulei-Yang commented on PR #17612:
URL: https://github.com/apache/doris/pull/17612#issuecomment-1463696229

   run feut


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] Yulei-Yang commented on a diff in pull request #17612: [fix](priv) fix bug of grant priv on ctl.db.* not available

Posted by "Yulei-Yang (via GitHub)" <gi...@apache.org>.
Yulei-Yang commented on code in PR #17612:
URL: https://github.com/apache/doris/pull/17612#discussion_r1130736402


##########
fe/fe-core/src/main/java/org/apache/doris/mysql/privilege/DbPrivTable.java:
##########
@@ -42,7 +45,8 @@ public void getPrivs(String ctl, String db, PrivBitSet savedPrivs) {
             }
 
             // check db
-            if (!dbPrivEntry.isAnyDb() && !dbPrivEntry.getDbPattern().match(db)) {
+            if (!dbPrivEntry.isAnyDb() && !dbPrivEntry.getDbPattern().match(db) && !dbPrivEntry.getDbPattern()

Review Comment:
   fixed



-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] Yulei-Yang closed pull request #17612: [fix](priv) fix bug of grant priv on ctl.db.* not work

Posted by "Yulei-Yang (via GitHub)" <gi...@apache.org>.
Yulei-Yang closed pull request #17612: [fix](priv) fix bug of grant priv on ctl.db.* not work
URL: https://github.com/apache/doris/pull/17612


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org