57 Commits

Author SHA1 Message Date
vraatikka
3769a02957 query_classifier.cc
resolve_query_type, added GSYSVAR_FUNC type for functions that read system variables and can be executed in Maxscale instead of backend server.

dcb.c
	dcb_read, if read returns value <= 0 and if error is EAGAIN/EWOULDBLOCK so there was nothing to read in sthe socket, that is not an error because some other thread may have read the data that was expected to be available.

mysql_backend.c
	gw_read_backend_event, used dcb->authlock to ensure that dcb's protocol state is read and modified serially. This removes issues with false authentication failures which may happen when two threads modify and read the state without any control.

mysql_client.c 
	removed dead code.

readconnroute.c, readwritesplit.c
	removed invalid assert which assumed that spinlock can not have larger value than one when itis locked.
2013-10-31 22:24:51 +02:00
vraatikka
5e6b0a3b1a Included log_manager in query classifier's makefile, replaced fprintf's with log manager commands. 2013-10-28 10:44:05 +02:00
vraatikka
f32cfe8546 query_classifier.cc
resolve_query_type, traverse through the list of items of thd->free_list, identify functions and reason query type according to the function type. This phase can only increase the restrictiviness level of the query.

query_classifier.h
        Added new query type QUERY_TYPE_LOCAL_READ, for functions that can be executed in Maxscale. This type is the least restrict
ive query type. It is not used currently.

testmain.c
	Added a few test cases and fixed expected return values for query type tests.

readwritesplit.c
	polish

skygw_debug.h
	Added string macro for Item types.
2013-10-25 11:55:45 +03:00
vraatikka
241a0a6175 Used sizeof operator for calculating the length of a string. 2013-10-24 10:51:54 +03:00
Mark Riddoch
bce6f88efe Add depend make target and resolve conflict in query_classifier.cc 2013-07-19 15:05:21 +02:00
Massimiliano Pinto
b9098e04a9 Most fprintf commented 2013-07-18 14:06:15 +02:00
vraatikka
4854b56aba try to add query_classifier under skygteway 2013-06-17 18:19:46 +03:00