Yulei-Yang commented on code in PR #19540:
URL: https://github.com/apache/doris/pull/19540#discussion_r1211035368


##########
fe/fe-core/src/main/java/org/apache/doris/analysis/CreateSqlBlockRuleStmt.java:
##########
@@ -116,6 +118,11 @@ public void analyze(Analyzer analyzer) throws 
UserException {
         // check properties
         CreateSqlBlockRuleStmt.checkCommonProperties(properties);
         setProperties(properties);
+
+        // avoid a rule block any ddl for itself
+        if (StringUtils.isNotEmpty(sql) && 
Pattern.compile(sql).matcher(this.ruleName).find()) {

Review Comment:
   if a sql_block_rule named block_rule_delete with sql "delete" is created, 
then any update to this block_rule will be blocked by itself, like "DROP 
SQL_BLOCK_RULE block_rule_delete", coz sql block rule name is a part of sql now.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to