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

jiafengzheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris-website.git


The following commit(s) were added to refs/heads/master by this push:
     new aeb44ad5ea6 Sql blacklist documentation fix
aeb44ad5ea6 is described below

commit aeb44ad5ea6bf1e6e3bdeedfddc540e9ba2f1f4e
Author: jiafeng.zhang <zhang...@gmail.com>
AuthorDate: Tue Sep 6 14:26:32 2022 +0800

    Sql blacklist documentation fix
    
    Sql blacklist documentation fix
---
 docs/admin-manual/sql-interception.md                   |  7 ++++++-
 .../Create/CREATE-SQL-BLOCK-RULE.md                     |  8 ++++++--
 .../current/admin-manual/sql-interception.md            |  7 ++++++-
 .../Create/CREATE-SQL-BLOCK-RULE.md                     | 17 ++++++++++-------
 4 files changed, 28 insertions(+), 11 deletions(-)

diff --git a/docs/admin-manual/sql-interception.md 
b/docs/admin-manual/sql-interception.md
index 5da44cf0b64..8fe18396c3a 100644
--- a/docs/admin-manual/sql-interception.md
+++ b/docs/admin-manual/sql-interception.md
@@ -48,13 +48,18 @@ SQL block rule CRUD
 ```sql
 CREATE SQL_BLOCK_RULE test_rule 
 PROPERTIES(
-  "sql"="select * from order_analysis",
+  "sql"="select \\* from order_analysis",
   "global"="false",
   "enable"="true",
   "sqlHash"=""
 )
 ```
+> Notes:
+>
+> That the sql statement here does not end with a semicolon
+
 When we execute the sql that we defined in the rule just now, an exception 
error will be returned. An example is as follows:
+
 ```sql
 mysql> select * from order_analysis;
 ERROR 1064 (HY000): errCode = 2, detailMessage = sql match regex sql block 
rule: order_analysis_rule
diff --git 
a/docs/sql-manual/sql-reference/Data-Definition-Statements/Create/CREATE-SQL-BLOCK-RULE.md
 
b/docs/sql-manual/sql-reference/Data-Definition-Statements/Create/CREATE-SQL-BLOCK-RULE.md
index 7fc35132011..c1552ce7492 100644
--- 
a/docs/sql-manual/sql-reference/Data-Definition-Statements/Create/CREATE-SQL-BLOCK-RULE.md
+++ 
b/docs/sql-manual/sql-reference/Data-Definition-Statements/Create/CREATE-SQL-BLOCK-RULE.md
@@ -64,14 +64,18 @@ Parameter Description:
     ```sql
     CREATE SQL_BLOCK_RULE test_rule
     PROPERTIES(
-    "sql"="select \\* from order_analysis;",
+    "sql"="select \\* from order_analysis",
     "global"="false",
     "enable"="true"
     );
     ````
 
+    >Notes:
+    >
+    >That the sql statement here does not end with a semicolon
+    
     When we execute the sql we just defined in the rule, an exception error 
will be returned. The example is as follows:
-
+    
     ```sql
     select * from order_analysis;
     ERROR 1064 (HY000): errCode = 2, detailMessage = sql match regex sql block 
rule: order_analysis_rule
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/admin-manual/sql-interception.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/admin-manual/sql-interception.md
index 3cc682f824b..e58e139cb28 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/admin-manual/sql-interception.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/admin-manual/sql-interception.md
@@ -48,13 +48,18 @@ under the License.
 ```sql
 CREATE SQL_BLOCK_RULE test_rule 
 PROPERTIES(
-  "sql"="select * from order_analysis",
+  "sql"="select \\* from order_analysis",
   "global"="false",
   "enable"="true",
   "sqlHash"=""
 )
 ```
+>注意:
+>
+>这里sql 语句最后不要带分号
+
 当我们去执行刚才我们定义在规则里的sql时就会返回异常错误,示例如下:
+
 ```sql
 mysql> select * from order_analysis;
 ERROR 1064 (HY000): errCode = 2, detailMessage = sql match regex sql block 
rule: order_analysis_rule
diff --git 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-reference/Data-Definition-Statements/Create/CREATE-SQL-BLOCK-RULE.md
 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-reference/Data-Definition-Statements/Create/CREATE-SQL-BLOCK-RULE.md
index fa73c57e8c0..7823902d282 100644
--- 
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-reference/Data-Definition-Statements/Create/CREATE-SQL-BLOCK-RULE.md
+++ 
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-reference/Data-Definition-Statements/Create/CREATE-SQL-BLOCK-RULE.md
@@ -49,7 +49,7 @@ CREATE SQL_BLOCK_RULE rule_name
 
 参数说明:
 
-- sql:匹配规则(基于正则匹配,特殊字符需要转译,如`select *`使用`select \\*`),可选,默认值为 "NULL"
+- sql:匹配规则(基于正则匹配,特殊字符需要转译,如`select *`使用`select \\*`),可选,默认值为 "NULL", 最后不要带分号
 - sqlHash: sql hash值,用于完全匹配,我们会在`fe.audit.log`打印这个值,可选,这个参数和sql只能二选一,默认值为 
"NULL"
 - partition_num: 一个扫描节点会扫描的最大partition数量,默认值为0L
 - tablet_num: 一个扫描节点会扫描的最大tablet数量,默认值为0L
@@ -68,14 +68,16 @@ CREATE SQL_BLOCK_RULE rule_name
        "global"="false",
        "enable"="true"
      );
-    ```
+     ```
 
-    当我们去执行刚才我们定义在规则里的sql时就会返回异常错误,示例如下:
+     
 
-    ```sql
-    mysql> select * from order_analysis;
-    ERROR 1064 (HY000): errCode = 2, detailMessage = sql match regex sql block 
rule: order_analysis_rule
-    ```
+     当我们去执行刚才我们定义在规则里的sql时就会返回异常错误,示例如下:
+
+     ```sql
+     mysql> select * from order_analysis;
+     ERROR 1064 (HY000): errCode = 2, detailMessage = sql match regex sql 
block rule: order_analysis_rule
+     ```
 
 2. 创建 test_rule2,将最大扫描的分区数量限制在30个,最大扫描基数限制在100亿行,示例如下:
 
@@ -90,6 +92,7 @@ CREATE SQL_BLOCK_RULE rule_name
     );
    Query OK, 0 rows affected (0.01 sec)
    ```
+   
 3. 创建包含特殊字符的 SQL BLOCK RULE:
 
     ```sql


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

Reply via email to