This is an automated email from the ASF dual-hosted git repository.

morningman pushed a commit to branch branch-1.2-lts
in repository https://gitbox.apache.org/repos/asf/doris.git

commit a58d8dea59252b6a7cdfa2c5d21fe3f256d2232b
Author: Yulei-Yang <[email protected]>
AuthorDate: Wed Mar 8 19:50:31 2023 +0800

    [fix](meta) fix catlog parameter when checking privilege of 
show_create_table stmt (#17445)
    
    the ctl parameter of show_create_table stmt is not set in checkTblPriv, 
this is not correct for multicatalog
---
 .../src/main/java/org/apache/doris/analysis/ShowCreateTableStmt.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/analysis/ShowCreateTableStmt.java 
b/fe/fe-core/src/main/java/org/apache/doris/analysis/ShowCreateTableStmt.java
index 2bed873353..2efa9da36d 100644
--- 
a/fe/fe-core/src/main/java/org/apache/doris/analysis/ShowCreateTableStmt.java
+++ 
b/fe/fe-core/src/main/java/org/apache/doris/analysis/ShowCreateTableStmt.java
@@ -93,8 +93,8 @@ public class ShowCreateTableStmt extends ShowStmt {
         }
         tbl.analyze(analyzer);
 
-        if (!Env.getCurrentEnv().getAuth().checkTblPriv(ConnectContext.get(), 
tbl.getDb(), tbl.getTbl(),
-                                                                
PrivPredicate.SHOW)) {
+        if (!Env.getCurrentEnv().getAuth().checkTblPriv(ConnectContext.get(), 
tbl.getCtl(),
+                    tbl.getDb(), tbl.getTbl(), PrivPredicate.SHOW)) {
             
ErrorReport.reportAnalysisException(ErrorCode.ERR_TABLEACCESS_DENIED_ERROR, 
"SHOW CREATE TABLE",
                                                 
ConnectContext.get().getQualifiedUser(),
                                                 
ConnectContext.get().getRemoteIP(),


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

Reply via email to