14 Commits

Author SHA1 Message Date
VilhoRaatikka
39679447c9 Bugzilla #455, MaxScale crashed due missing buffer type information in multi-buffer responses. 2014-07-03 19:20:45 +03:00
VilhoRaatikka
fcf67716fd Added mechanism for choosing slave for a query based on the current load in all connected slaves. Counting operations is not correctly done here. Reading values and choosing accordingly is done.
Fixed several things in session command reply processing.
2014-06-29 22:21:30 +03:00
VilhoRaatikka
1d1da398d4 Merge branch 'develop' into MAX-99
Conflicts:
	server/modules/routing/readwritesplit/readwritesplit.c
2014-06-25 17:50:29 +03:00
VilhoRaatikka
442ac7fefb Added GWBUF type GWBUF_TYPE_SINGLE_STMT to indicate that buffer only includes single complete stmt. Added macro for checking the flag and changed existing routines as necessary. 2014-06-24 21:51:54 +03:00
Mark Riddoch
a652e875b5 Support for multipacket statements
Remove double free in cloned DCB's
2014-06-24 17:59:29 +01:00
VilhoRaatikka
15ff1fd26a Fixed many error handling issues regading to timing and multiple threads.
Added flags to those backend references which have sent something to backend which causes the backend to send results or reply back. Didn't add removal of the flag since there's currently no way to tell whether response from backend contains anything else than session command reply - which aren't counted when BREF_WAITING_RESULT is set and cleared.
2014-06-12 23:22:51 +03:00
Mark Riddoch
509379df70 Fix for NULL buffer past to gwbuf_length 2014-05-28 11:00:50 +01:00
VilhoRaatikka
a3f7eebdc9 Extended session command support to cover COM_CHANGE_USER, and COM_INIT_DB.
This implementation doesn't guarantee execution order between session commands and queries
if other backend server lags behind in session command execution.

In poll.c : moved processing of EPOLLERR and EPOLLHUP after processing of EPOLLIN and EPOLLOUT.
This ensures that COM_QUIT messages are read and routed forward before signals arrive (from local client/backend).
2014-03-14 13:25:37 +02:00
VilhoRaatikka
cb6a976555 Router has now capability value which currently tells whether router session expects stream or individual, complete statements. With read con
nection router stream is used and with read/write split router individual statements are passed to router.
Added new function to ROUTER_OBJECT : uint8_t (*getCapabilities)(ROUTER *instance, void* router_session); which is implemented in every route
r.

Added support for multi-statement packets in rwsplit router. In other words, if network packet includes multiple mysql statements, they are separated and passed to router one by one.

Multi-packet statements (those which exceeds network packet boundaries) are _not_ supported yet.
2014-03-11 23:12:11 +02:00
VilhoRaatikka
c28892323a Added support for session commands to readwrite split router.
Added support for multi-statement packets.

This is an intermediate commit to save work. Code is not cleaned and there are debug prints and prototypes to be removed.
2014-03-07 20:53:33 +02:00
VilhoRaatikka
b673108276 Bug # 403 http://bugs.skysql.com/show_bug.cgi?id=403
Comparing the return value of atomic_add instead of buffer's reference count variable.
2014-02-12 18:55:44 +02:00
Mark Riddoch
ee7b799bf1 Bug 160 - fixed memory leaks with telnetd and debug CLI 2013-09-26 17:38:35 +02:00
vraatikka
4cf5b3293f Added check routine for gw_buffer. Only effective in debug build. 2013-09-17 15:10:16 +03:00
Timofey Turenko
a7c82310f9 moving files to /server to make merge possible 2013-07-28 05:31:11 +00:00