【详述】问题详细描述
【背景】做过哪些操作?
【业务影响】
【StarRocks版本】2.2.1 147f178
BUG:
开启SQLBLACKLIST 不生效
开启SQLBLACKLIST 规则丢失
MySQL [test]> add sqlblacklist “select count(\*) from test.ods_user_all”;
Query OK, 0 rows affected (0.00 sec)
MySQL [test]> show sqlblacklist;
±-----±-------------------------+
| Id | Forbidden SQL |
±-----±-------------------------+
| 0 | select count(*) from .+ |
±-----±-------------------------+
1 row in set (0.00 sec)
MySQL [test]> add sqlblacklist “select count(\*) from test.ods_user_all”;
Query OK, 0 rows affected (0.00 sec)
MySQL [test]> show sqlblacklist;
±-----±-------------------------+
| Id | Forbidden SQL |
±-----±-------------------------+
| 0 | select count(*) from .+ |
±-----±-------------------------+
1 row in set (0.00 sec)
MySQL [test]> show sqlblacklist;
±-----±----------------------------------------+
| Id | Forbidden SQL |
±-----±----------------------------------------+
| 1 | select * from .+ |
| 2 | select count(*) from test.ods_user_all |
| 0 | select count(*) from .+ |
±-----±----------------------------------------+
3 rows in set (0.00 sec)
MySQL [test]> show sqlblacklist;
±-----±-------------------------+
| Id | Forbidden SQL |
±-----±-------------------------+
| 0 | select count(*) from .+ |
±-----±-------------------------+
1 row in set (0.00 sec)
MySQL [test]> show sqlblacklist;
±-----±----------------------------------------+
| Id | Forbidden SQL |
±-----±----------------------------------------+
| 1 | select count(*) from test.ods_user_all |
| 0 | select count(*) from .+ |
±-----±----------------------------------------+
2 rows in set (0.00 sec)
MySQL [test]> select count() from test.ods_user_all;
±-----------+
| count() |
±-----------+
| 8878624122 |
±-----------+
1 row in set (6.25 sec)
