[fix](auth)fix show routine load db is null (#38574)
pick: https://github.com/apache/doris/pull/38365
This commit is contained in:
@ -125,8 +125,8 @@ public class ShowRoutineLoadStmt extends ShowStmt {
|
||||
}
|
||||
|
||||
private void checkLabelName(Analyzer analyzer) throws AnalysisException {
|
||||
String dbName = labelName == null ? null : labelName.getDbName();
|
||||
if (Strings.isNullOrEmpty(dbName)) {
|
||||
dbFullName = labelName == null ? null : labelName.getDbName();
|
||||
if (Strings.isNullOrEmpty(dbFullName)) {
|
||||
dbFullName = analyzer.getContext().getDatabase();
|
||||
if (Strings.isNullOrEmpty(dbFullName)) {
|
||||
ErrorReport.reportAnalysisException(ErrorCode.ERR_NO_DB_ERROR);
|
||||
|
||||
@ -141,7 +141,7 @@ public class ExportMgr {
|
||||
|
||||
public void checkCancelExportJobAuth(String ctlName, String dbName, List<ExportJob> jobs) throws AnalysisException {
|
||||
if (jobs.size() > 1) {
|
||||
if (Env.getCurrentEnv().getAccessManager()
|
||||
if (!Env.getCurrentEnv().getAccessManager()
|
||||
.checkDbPriv(ConnectContext.get(), ctlName, dbName,
|
||||
PrivPredicate.SELECT)) {
|
||||
ErrorReport.reportAnalysisException(ErrorCode.ERR_DB_ACCESS_DENIED_ERROR,
|
||||
@ -152,7 +152,7 @@ public class ExportMgr {
|
||||
if (tableName == null) {
|
||||
return;
|
||||
}
|
||||
if (Env.getCurrentEnv().getAccessManager()
|
||||
if (!Env.getCurrentEnv().getAccessManager()
|
||||
.checkTblPriv(ConnectContext.get(), ctlName, dbName,
|
||||
tableName.getTbl(),
|
||||
PrivPredicate.SELECT)) {
|
||||
|
||||
Reference in New Issue
Block a user