4 Commits

Author SHA1 Message Date
VilhoRaatikka
183428c48b Fix to bug #470, http://bugs.skysql.com/show_bug.cgi?id=470, in hint_dup: the value field of the duplicated hint was not set. Instead data field was set twice. 2014-08-07 00:14:15 +03:00
VilhoRaatikka
b72e80b464 Fix for Bug #466, http://bugs.skysql.com/show_bug.cgi?id=466
hintparser.c:hint_parser:when string token is found, create a copy of the token value instead of copying the its address because token will be freed before the value is used.
	hint_next_token:didn't recognize '=' as TOK_EQUAL, fixed that. Read the code.
hint.c:hint_create_parameter: copy the pointer to parameter name instead of creating copy of it - pname is already copied from token before the call
readwritesplit.c:routeQuery:Hint name was copied when hint value was supposed to be copied, thus resulting invalid value for hinted parameter. Also fixed server type in trace log command.
skygw_debug.h:Added string for Relay server to macro STRSRVSTATUS.
2014-08-06 16:39:22 +03:00
VilhoRaatikka
4f3d746f4e MAX-157. Added support for hints in rwsplit router.
buffer.c: added memory release for hint of a GWBUF
hint.c: added bool hint_exists()
hint.h: added placeholder for hint type HINT_ROUTE_TO_ALL which doesn't have implementation yet.
filter/Makefile: fixed dependency issue
hintparser.c: added const char* token_get_keyword(), hint_parser:added NULL check, hint_next_token: fixed off-by-one bug
readwritesplit.h: added bitfield for hints' use, which includes route targets and flag for case where user hinted to route to named backend server.
readwritesplit.c: added function route_target_t get_route_target() for resolving route target based on 1) query type (from query_classifier) 2) transaction state (active/not) and 3) hints. Modified get_dcb, which is called in routeQuery to provide pointer to correct backend DCB. Now get_dcb also takes server unique name as a parameter if such a hint was found. for hints' use, which includes  enter the commit message for your changes.
2014-07-31 23:40:02 +03:00
Mark Riddoch
2dea68b9b3 Hint parsing 2014-07-25 16:33:49 +01:00