MXS 173 Deprecate DBFW rule limit_queries

Replaced by throttle filter
This commit is contained in:
Niclas Antti
2018-05-24 14:17:00 +03:00
parent 8145e1fd46
commit 55e1a39cc3
2 changed files with 18 additions and 3 deletions

View File

@ -101,9 +101,18 @@ namespace
class DbfwThread
{
public:
int& rule_version(const Dbfw* d) { return m_instance_data[d].rule_version; }
RuleList& rules(const Dbfw* d) { return m_instance_data[d].rules; }
UserMap& users(const Dbfw* d) { return m_instance_data[d].users; }
int& rule_version(const Dbfw* d)
{
return m_instance_data[d].rule_version;
}
RuleList& rules(const Dbfw* d)
{
return m_instance_data[d].rules;
}
UserMap& users(const Dbfw* d)
{
return m_instance_data[d].users;
}
private:
class Data
@ -941,6 +950,10 @@ void define_where_clause_rule(void* scanner)
*/
void define_limit_queries_rule(void* scanner, int max, int timeperiod, int holdoff)
{
MXS_WARNING("The Database Firewall rule 'limit_queries' has been deprecated"
" and will be removed in a later version of MaxScale. "
"Please use the Throttle Filter instead");
struct parser_stack* rstack = (struct parser_stack*)dbfw_yyget_extra((yyscan_t) scanner);
ss_dassert(rstack);
rstack->add(new LimitQueriesRule(rstack->name, max, timeperiod, holdoff));