0

My setup is as the following: MaxScale 2.1.4 -> Master -> 2 slaves (both MariaDB 10.2). *CentOS 7

Most of my queries are prepared statements so the master basically handles 90% of the queries right now.

I've enabled the hintfilter and tried to add a hint to a query:

/* maxscale route to server server2 */

Unfortunately, it still ends up on the master.

I understood that MaxScale 2.2 should introduce some auto solution for prepared statements. However, I need some temp solution(I'll try to look into ProxySQL if none is found).

Any help would be highly appreciated.

Jack
  • 81
  • 2
  • 5
  • Is it inside a transaction? If so, let's see the whole transaction. – Rick James Sep 09 '17 at 14:53
  • Just a single SQL statement (a simple one actually just as a test). Anyway, I've moved on to ProxySQL and it looks fantastic so far. Will revisit MaxScale once it's more complete. – Jack Sep 09 '17 at 22:24

1 Answers1

1

If you used the mysql command line client to test it, remember to enable SQL comments by using the -c flag.

Since MaxScale 2.0.1, the hint mechanism will override any decisions taken by the router itself if the router supports hints. The readwritesplit and schemarouter routers are currently the only routers that support routing hints so make sure you are using one of these routers.

markusjm
  • 2,358
  • 1
  • 11
  • 23