cambyzju commented on code in PR #49658:
URL: https://github.com/apache/doris/pull/49658#discussion_r2022222317


##########
fe/fe-core/src/main/java/org/apache/doris/mysql/privilege/UserProperty.java:
##########
@@ -349,6 +357,15 @@ public void update(List<Pair<String, String>> properties, 
boolean isReplay) thro
                 } catch (NumberFormatException e) {
                     throw new DdlException(PROP_USER_INSERT_TIMEOUT + " is not 
number");
                 }
+            } else if (keyArr[0].equalsIgnoreCase(PROP_DEFAULT_INIT_CATALOG)) {
+                if (keyArr.length != 1) {
+                    throw new DdlException(PROP_DEFAULT_INIT_CATALOG + " 
format error");
+                }
+                CatalogIf catalog = 
Env.getCurrentEnv().getCatalogMgr().getCatalog(value);
+                if (catalog == null) {

Review Comment:
   这个函数目前只是抛 DdlException 异常,通过:
   try {
       getCatalogOrAnalysisException()
   } catch {
       throw new DdlException
   }
   
   跟现在的判断 catalog 是否为 null,感觉差别不大。



-- 
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-unsubscr...@doris.apache.org

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


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

Reply via email to