Comments - Named Server Filter

1 year, 10 months ago Richard Lee

Lovely thank you, looks like that will tide me over to figure out why my filter isn't working.
Are the forward slashes still not compatible with NamedServerFilter when defining the match in the configuration file?

Still not getting anything diverted with various attempts. Trying to redirect anything SELECT-ing from tables starting with "Finished". ie: FinishedPieces or FinishedPacks.

I've tried the following based on this:

SELECT.*FinishedPacks
^SELECT.*FinishedPacks
*FROM FinishedPacks
FinishedPacks

Note: i'm updating the filter from the web UI

What other conditions would prevent a filter / hint from being considered by the Read-Write-Service?

 
1 year, 10 months ago Markus Mäkelä

I tested the filter by creating it with GUI and using match01=SELECT.*FinishedPacks and target01=->master and it appears to work correctly:

info: > Autocommit: [enabled], trx is [not open], cmd: (0x03) COM_QUERY, plen: 44, type: QUERY_TYPE_READ, stmt: SELECT * FROM FinishedPacks WHERE 1 = 1, Hint: HINT_ROUTE_TO_MASTER
info: Route query to master: server1 <
info: Reply complete from 'server1' (Error: 1146, 42S02 Table 'test.FinishedPacks' doesn't exist)
info: > Autocommit: [enabled], trx is [not open], cmd: (0x03) COM_QUERY, plen: 49, type: QUERY_TYPE_READ, stmt: SELECT * FROM FinishedOtherPacks WHERE 1 = 1
info: Route query to slave: server2 <
info: Reply complete from 'server2' (Error: 1146, 42S02 Table 'test.FinishedOtherPacks' doesn't exist)
 
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.