[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
This commit is contained in:
Yulei-Yang
2023-03-08 19:50:31 +08:00
committed by GitHub
parent 05b04e4c39
commit 75e4f86c2d

View File

@ -93,8 +93,8 @@ public class ShowCreateTableStmt extends ShowStmt {
}
tbl.analyze(analyzer);
if (!Env.getCurrentEnv().getAccessManager().checkTblPriv(ConnectContext.get(), tbl.getDb(), tbl.getTbl(),
PrivPredicate.SHOW)) {
if (!Env.getCurrentEnv().getAccessManager().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(),