Forum Discussion
myocella
Nimbostratus
Jan 22, 2009iRule to inspect MySQL statements
Greeting,
I would like to create iRule to apply a VS to redirect MySQL traffic
to a pool based on the SQL statement. Here is my iRule:
---------------8<-----------...
L4L7_53191
Nimbostratus
Oct 29, 2009Gang: I think that this is a *very* tricky problem to solve correctly. It's already been noted that we're really talking about implementing a full-blown mysql proxy in iRules, and it gets worse (depending upon your implementation, of course) - imagine a statement like (taken from a random search on google for "mysql update based on select":
UPDATE products p set p.product_model=(select categories_name from categories_description where categories_name like CONCAT(p.product_mode,'%'));
Which I believe will need (or should) hit the same instance for both the update and the nested select that the update is based on. This may or may not be the best example, but IMO it's extremely easy to write a brittle rule that could break things later on, barring some very specific architectural designs and policies that will ensure you won't run into a use case like this.
-Matt
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects