MXS-1066 Add query hint to route to last used server

Add new hint type and support for it in the readwritesplit router.
This commit is contained in:
Marko
2018-07-09 11:07:33 +03:00
parent e2fb0093b1
commit 2acf5f545e
8 changed files with 37 additions and 1 deletions

View File

@ -530,6 +530,11 @@ uint32_t QueryClassifier::get_route_target(uint8_t command, uint32_t qtype, HINT
ss_dassert(false);
break;
case HINT_ROUTE_TO_LAST_USED:
MXS_DEBUG("Hint: route to last used");
target = TARGET_LAST_USED;
break;
case HINT_PARAMETER:
if (strncasecmp((char*)pHint->data, "max_slave_replication_lag",
strlen("max_slave_replication_lag")) == 0)