Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Won't Fix
-
2.0.4
-
None
-
OS : CentOS 6.8
MySQL 5.6.33
Description
I set dbfwfilter in Maxscale as follows.
- # vi /etc/maxscale.cnf
~
[DBFW_goods]
type=filter
module=dbfwfilter
action=block
rules=/var/log/maxscale/rules.xxxxx.txt
~
[MasterRoute]
type=service
router=readconnroute
#router_options=slave_selection_criteria=LEAST_CURRENT_OPERATIONS
servers=writeserver
user=maxscale
passwd=*****************
filters=DBFW_xxxxx
~
[root@session1 maxscale]# cat rules.goods.txt
rule safe_drop deny regex '.*drop.*table.*xxxxx'
users %@% match all rules safe_drop
The following error occurs on the maxscale log.
2017-06-07 16:00:31 warning: dbfwfilter: Query could not be tokenized and will hence be rejected:
(select
a.no, a.subject, a.contents, a.image_type,
(select ifnull(replace(img, '_org.', '_270.'), '') from curating_image where c_no = a.no and rep_yn = 'Y' limit 0, 1) as img
from curating a
where a.use_yn = 'Y' and ifnull(if(a.start_date = '','0000000000',a.start_date),'0000000000') <= date_format(now(), '%Y%m%d%H')
and ifnull(if(a.end_date='','9999999999',a.end_date),'9999999999') >= date_format(now(), '%Y%m%d%H')
and a.image_type = 'A'
order by a.notice_yn desc, a.rt desc
limit 45, 15)
union all
(select
a.no, a.subject, a.contents, a.image_type,
(select ifnull(replace(img, '_org.', '_270.'), '') from curating_image where c_no = a.no and rep_yn = 'Y' limit 0, 1) as img
from curating a
where a.use_yn = 'Y' and ifnull(if(a.start_date = '','0000000000',a.start_date),'0000000000') <= date_format(now(), '%Y%m%d%H')
and ifnull(if(a.end_date='','9999999999',a.end_date),'9999999999') >= date_format(now(), '%Y%m%d%H')
and a.image_type = 'B'
order by a.notice_yn desc, a.rt desc
limit 18, 6)
failed. Access denied for user 'user3'@'192.168.0.198' to database 'svcdb': dbfwfilter: Query could not be tokenized and will hence be rejected.<br>
1141: Access denied for user 'user3'@'192.168.0.198' to database 'svcdb': dbfwfilter: Query could not be tokenized and will hence be rejected.<br>
It seems that dbfwfilter-related errors are occurring, and the query does not execute.