[MXS-18] bugzillaId-587: Hint filter don't work if listed before regex filter in configuration file Created: 2014-01-21  Updated: 2019-12-19  Resolved: 2015-03-18

Status: Closed
Project: MariaDB MaxScale
Component/s: hintfilter, Plugin, regexfilter
Affects Version/s: 1.0.1
Fix Version/s: 1.0.6

Type: Bug Priority: Major
Reporter: Timofey Turenko Assignee: Timofey Turenko
Resolution: Fixed Votes: 0
Labels: None
Environment:

Linux



 Description   

This is imported from bugzilla item http://bugs.mariadb.com/show_bug.cgi?id=587

The fix version in bugzilla is "develop in commit 42b52c6f5153b45a5b1998aca54ca48480ef7514"

Description Vilho Raatikka 2014-10-21 19:12:33 UTC
If filters and rwsplit are configured as follows, hints don't work.

[hints]
type=filter
module=hintfilter
 
[regex]
type=filter
module=regexfilter
match=fetch
replace=select
 
[RW Split Router]
type=service
router=readwritesplit
servers=server1,server2,server3,server4
max_slave_connections=100%
use_sql_variables_in=all
user=maxuser
passwd=maxpwd
filters=hints|regex
 

Changing filters=regex|hints makes it work. This is due to processing order. Regex filter drops hint off.



 Comments   
Comment by Dipti Joshi (Inactive) [ 2015-03-09 ]

These comments are imported from bugzilla

Comment 1 Vilho Raatikka 2014-10-23 18:08:07 UTC
buffer.c:gwbuf_make_contiguous: hint wasn't duplicated to new GWBUF struct. As a result hints were lost if query rewriting resulted in longer query than the original.

Comment 2 Timofey Turenko 2014-10-26 16:05:16 UTC
test added, closing

Comment 3 Timofey Turenko 2015-03-02 14:39:40 UTC
does not work if filters=regex|hints (test 'bug587_1')

Comment by Timofey Turenko [ 2015-03-18 ]

fixed

Generated at Thu Feb 08 03:56:10 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.