Closed newborn22 closed 5 months ago
ERROR 1105 (HY000): vttablet: rpc error: code = Unknown desc = action type: FAIL have no parameters to set
create filter if not exists (
name='test1',
desc='test description',
priority='1000',
status='ACTIVE'
)
with_pattern(
plans='Select,Insert',
fully_qualified_table_names='d1.t1',
query_regex='',
query_template='',
request_ip_regex='',
user_regex='',
leading_comment_regex='',
trailing_comment_regex='',
bind_var_conds=''
)
execute(
action='FAIL',
action_args=''
);
For thoses actions that do not require args, UserActionArgsToJSON
would return error.
mysql> create filter if not exists ( name='test1', desc='test description', priority='1000', status='ACTIVE' ) with_pattern( plans='Select,Insert', fully_qualified_table_names='d1.t1', query_regex='', query_template='', request_ip_regex='', user_regex='', leading_comment_regex='', trailing_comment_regex='', bind_var_conds='' ) execute( action='FAIL', action_args='' );
ERROR 1046 (3D000): VT09005: No database selected
I think we should allow users to create filter even if they didn't specify the database
create filter if not exists ( name='test1', desc='test description', priority='1000', status='ACTIVE' ) with_pattern( plans='Select,Insert', fully_qualified_table_names='d1.t1', query_regex='', query_template='', request_ip_regex='', user_regex='', leading_comment_regex='', trailing_comment_regex='', bind_var_conds='' ) execute( action='FAIL', action_args='' );
The if not exists
doesn't work
add more tests
Related Issue(s) & Descriptions
Checklist