Re: [Sqlrelay-discussion] sqlrelay INSERTS going to "slave"
Brought to you by:
mused
|
From: Chris C. <cc...@gm...> - 2007-04-27 13:53:05
|
Sekou,
You need to tweak your regexes, those will never match your queries
try:
<query pattern="^\s*select.*from.*"/>
<query pattern="^\s*insert\s+into.*"/>
<query pattern="^\s*update.*"/>
<query pattern="^\s*delete\s+from.*"/>
<query pattern="^\s*drop\s+table.*"/>
<query pattern="^\s*create\s+table.*"/>
Also bear in mind that with that select rule, no select queries will
ever get sent to your slave.
- CC
On 4/27/07, Sekou Abodunrin <sek...@to...> wrote:
>
> Hi,
>
> I am running sqlrelay-0.38
> I have sqlrelay in routing and filtering mode. It is configured to route
> DML/DDL queries to "master" and other quries to "slave"
> all queries including INSERTS are going to the "slave" and nothing is going
> to "master"
>
> find below my router definition:
>
>
> <router>
> <!-- he haw haw sekou! this will send all DML/DDL
> queries to "master" -->
> <route host="" port="" socket="/tmp/master.socket"
> user="master" password="masterpass">
> <query pattern="^\s*select\s+.*\s+from\s+"/>
> <query pattern="^\s*insert\s+into\s+"/>
> <query pattern="^\s*update\s+"/>
> <query pattern="^\s*delete\s+from\s+"/>
> <query pattern="^\s*drop\s+table\s+"/>
> <query pattern="^\s*create\s+table\s+"/>
> </route>
> <!-- grab a doughnut ... this sends all other
> queries to "slave" -->
> <route host="" port="" socket="/tmp/slave.socket"
> user="slave" password="slavepass">
> <query pattern=".*"/>
> </route>
> </router>
>
> Any ideas?
>
> S. Sekou Abodunrin
>
>
> This email is confidential and may also be privileged. If you are not the intended recipient please notify us immediately by telephoning +44 (0)20 7452 5300 or email pos...@to.... You should not copy it or use it for any purpose nor disclose its contents to any other person. Touch Local cannot accept liability for statements made which are clearly the sender's own and are not made on behalf of the firm.
>
> Touch Local Limited
> Registered Number: 2885607
> VAT Number: GB896112114
> Cardinal Tower, 12 Farringdon Road, London EC1M 3NN
> +44 (0)20 7452 5300
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Sqlrelay-discussion mailing list
> Sql...@li...
> https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion
>
|